changeset 10537:281e26d7f325

Merge
author michaelm
date Wed, 30 Oct 2013 18:38:20 +0000
parents 7bc67bed3c14 (current diff) 2a714dabb624 (diff)
children 348ffbd19feb
files make/sun/awt/FILES_c_macosx.gmk make/sun/awt/FILES_export_macosx.gmk makefiles/GendataBreakIterator.gmk makefiles/GendataFontConfig.gmk makefiles/GendataHtml32dtd.gmk makefiles/GendataTZDB.gmk makefiles/GendataTimeZone.gmk makefiles/GenerateJavaSources.gmk makefiles/GensrcBuffer.gmk makefiles/GensrcCLDR.gmk makefiles/GensrcCharacterData.gmk makefiles/GensrcCharsetCoder.gmk makefiles/GensrcCharsetMapping.gmk makefiles/GensrcExceptions.gmk makefiles/GensrcIcons.gmk makefiles/GensrcJDWP.gmk makefiles/GensrcJObjC.gmk makefiles/GensrcLocaleDataMetaInfo.gmk makefiles/GensrcMisc.gmk makefiles/GensrcProperties.gmk makefiles/GensrcSwing.gmk makefiles/GensrcX11Wrappers.gmk src/macosx/classes/com/apple/resources/MacOSXResourceBundle.java src/macosx/native/com/apple/resources/MacOSXResourceBundle.m src/share/classes/java/lang/invoke/MagicLambdaImpl.java src/share/classes/java/net/URLPermission.java src/share/demo/jfc/Notepad/resources/Notepad_fr.properties src/share/demo/jfc/Notepad/resources/Notepad_sv.properties src/solaris/doc/sun/man/man1/ja/javaws.1 src/solaris/doc/sun/man/man1/javaws.1 test/java/net/NetworkInterface/MemLeakTest.java test/jdk/lambda/vm/DefaultMethodsTest.java test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh test/sun/tools/jstatd/jpsOutput1.awk test/sun/tools/jstatd/jstatGcutilOutput1.awk test/sun/tools/jstatd/jstatdDefaults.sh test/sun/tools/jstatd/jstatdExternalRegistry.sh test/sun/tools/jstatd/jstatdPort.sh test/sun/tools/jstatd/jstatdServerName.sh test/sun/tools/jstatd/jstatdUsage1.sh test/sun/tools/jstatd/usage.out
diffstat 789 files changed, 32099 insertions(+), 20532 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Oct 30 18:37:50 2013 +0000
+++ b/.hgtags	Wed Oct 30 18:38:20 2013 +0000
@@ -233,3 +233,5 @@
 946f3fd5f8bf0ccd180c258d25e5837fa1bf004c jdk8-b109
 54e099776f08430d3a7f4feabd9f2ba886b55320 jdk8-b110
 719befd87c7b96ae103c05730ca555227bfc0116 jdk8-b111
+f002f5f3a16cca62e139cb8eed05ffaeb373587d jdk8-b112
+5b4261b4b72af53e8e178933ef6bc6c7f8cdbc60 jdk8-b113
--- a/make/com/sun/jmx/Makefile	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/com/sun/jmx/Makefile	Wed Oct 30 18:38:20 2013 +0000
@@ -130,11 +130,13 @@
 	$(RMIC) -classpath "$(CLASSDESTDIR)"    \
                 -d $(CLASSDESTDIR)              \
                 -iiop -v1.2                     \
+                -emitPermissionCheck            \
                 $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
 	$(RMIC) $(HOTSPOT_INTERPRETER_FLAG) -classpath "$(CLASSDESTDIR)"    \
                 -d $(CLASSDESTDIR)              \
                 -iiop -v1.2                     \
                 -standardPackage                \
+                -emitPermissionCheck            \
                 $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
 	@$(java-vm-cleanup)
 
--- a/make/common/Defs-macosx.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/common/Defs-macosx.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -85,6 +85,100 @@
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
+# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
+# enabled with debug info files ZIP'ed to save space. For VARIANT !=
+# OPT builds, FDS is always enabled, after all a debug build without
+# debug info isn't very useful. The ZIP_DEBUGINFO_FILES option only has
+# meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a VARIANT == OPT build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a VARIANT != OPT build,
+# the FULL_DEBUG_SYMBOLS environment variable will be 0, but the
+# ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If the same
+# variable name is used, then different values can be picked up by
+# different parts of the build. Just to be clear, we only need two
+# variable names because the incoming option value can be overridden
+# in some situations, e.g., a VARIANT != OPT build.
+
+ifeq ($(VARIANT), OPT)
+  FULL_DEBUG_SYMBOLS ?= 1
+  ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+else
+  # debug variants always get Full Debug Symbols (if available)
+  ENABLE_FULL_DEBUG_SYMBOLS = 1
+endif
+_JUNK_ := $(shell \
+  echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
+# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  ifeq ($(OS_NAME),darwin)
+    # MacOS X doesn't use OBJCOPY or STRIP_POLICY
+    OBJCOPY=
+    STRIP_POLICY=
+    ZIP_DEBUGINFO_FILES ?= 1
+  else
+    ifndef CROSS_COMPILE_ARCH
+      # Default OBJCOPY comes from GNU Binutils on Linux:
+      DEF_OBJCOPY=/usr/bin/objcopy
+    else
+      # Assume objcopy is part of the cross-compilation toolkit
+      DEF_OBJCOPY=$(COMPILER_PATH)/objcopy
+    endif
+    OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+    ifneq ($(ALT_OBJCOPY),)
+      _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+      # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+      OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+    endif
+
+    # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
+    # JDK build to import .debuginfo or .diz files from the HotSpot build.
+    # However, adding FDS support to the JDK build will occur in phases
+    # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
+    # and PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS) is used to indicate that a
+    # particular library or program supports FDS.
+
+    ifeq ($(OBJCOPY),)
+      _JUNK_ := $(shell \
+        echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo" \
+          "files. You may need to set ALT_OBJCOPY.")
+      ENABLE_FULL_DEBUG_SYMBOLS=0
+    else
+      _JUNK_ := $(shell \
+        echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+
+      # Library stripping policies for .debuginfo configs:
+      #   all_strip - strips everything from the library
+      #   min_strip - strips most stuff from the library; leaves
+      #               minimum symbols
+      #   no_strip  - does not strip the library at all
+      #
+      # Oracle security policy requires "all_strip". A waiver was granted
+      # on 2011.09.01 that permits using "min_strip" in the Java JDK and
+      # Java JRE.
+      #
+      # Currently, STRIP_POLICY is only used when Full Debug Symbols
+      # is enabled.
+      STRIP_POLICY ?= min_strip
+
+      _JUNK_ := $(shell \
+        echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+
+      ZIP_DEBUGINFO_FILES ?= 1
+    endif
+  endif
+
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
+endif
+
 #
 # Default optimization
 #
--- a/make/common/Defs.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/common/Defs.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2012, 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
@@ -508,12 +508,18 @@
 # Convenient macros
 #
 
-# Prepare $@ target, remove old one and making sure directory exists
+# Prepare $@ target, remove old one and making sure containing dir exists
 define prep-target
 $(MKDIR) -p $(@D)
 $(RM) $@
 endef
 
+# Prepare $@ target dir, remove old one and making sure containing dir exists
+define prep-target-dir
+$(MKDIR) -p $(@D)
+$(RM) -r $@
+endef
+
 # Simple install of $< file to $@
 define install-file
 $(prep-target)
@@ -616,6 +622,26 @@
 fi
 endef
 
+# MacOS X strongly discourages 'cp -r' and provides 'cp -R' instead.
+# May need to have a MacOS X specific definition of install-import-dir
+# sometime in the future.
+define install-import-dir
+@$(ECHO) "ASSEMBLY_IMPORT: $@"
+$(prep-target-dir)
+$(CP) -r $< $@
+endef
+
+ifeq ($(PLATFORM), macosx)
+# On MacOS X, debug info is in .dSYM directories
+define install-import-debuginfo
+$(install-import-dir)
+endef
+else
+define install-import-debuginfo
+$(install-import-file)
+endef
+endif
+
 define install-import-file
 $(install-importonly-file)
 endef
--- a/make/common/shared/Compiler-msvc.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/common/shared/Compiler-msvc.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -53,7 +53,7 @@
   
   # The VS2010 compiler is the same one used on both 32bit and 64bit
   ifeq ($(CC_MAJORVER), 16)
-    COMPILER_NAME=Microsoft Visual Studio 10 (16.00.30319.01)
+    COMPILER_NAME=Microsoft Visual Studio 10 (16.00.40219.01)
     COMPILER_VERSION=VS2010
     ifeq ($(WINDOWSSDKDIR),)
       WINDOWSSDKDIR := $(error WINDOWSSDKDIR cannot be empty here)
--- a/make/common/shared/Defs-versions.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/common/shared/Defs-versions.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -86,19 +86,17 @@
 # REQUIRED_MAKE_VER
 #   The minimum version of GNU make.
 #
-# REQUIRED_MKS_VER
-#   Windows only: If MKS used instead of CYGWIN, the minimum version of MKS.
-#
 # REQUIRED_OS_VARIANT_NAME
 #   The OS variation name required.
 #     Solaris: Solaris or OpenSolaris
-#     Windows: Windows2000, WindowsXP, Windows2003, etc.
+#     Windows: Windows2000, WindowsXP, Windows2003, Windows2008R2, etc.
 #     Linux: Fedora, RedHat, SuSE, Ubuntu, etc.
 #
 # REQUIRED_OS_VARIANT_VERSION
 #   The version number associated with the above OS variant name.
 #     Solaris: output of uname -r
-#     Windows: 5.0 for Windows2000, 5.1 for WindowsXP, 5.2 for Windows2003, etc.
+#     Windows: 5.0 for Windows2000, 5.1 for WindowsXP,
+#              5.2 for Windows2003, 6.1 for Windows2008R2, etc.
 #     Linux: number for the variant, e.g. 9 for Fedora 9
 #
 # REQUIRED_OS_VERSION
@@ -180,21 +178,15 @@
 # Windows specific
 ifeq ($(PLATFORM), windows)
   REQUIRED_OS_NAME            = Windows
-  ifeq ($(ARCH_DATA_MODEL),64)
-    REQUIRED_OS_VERSION       = 5.2
-    REQUIRED_OS_VARIANT_NAME  = Windows2003
-  else
-    REQUIRED_OS_VERSION       = 5.1
-    REQUIRED_OS_VARIANT_NAME  = WindowsXP
-  endif
+  REQUIRED_OS_VERSION         = 6.1
+  REQUIRED_OS_VARIANT_NAME    = Windows2008R2
   REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION)
   REQUIRED_CYGWIN_VER         = 4.0
-  REQUIRED_MKS_VER            = 6.1
   ifeq ($(CC_VERSION),msvc)
     REQUIRED_COMPILER_NAME    = Visual Studio 10
     REQUIRED_COMPILER_VERSION = VS2010
-    REQUIRED_CC_VER           = 16.00.30319.01
-    REQUIRED_LINK_VER         = 10.00.30319.01
+    REQUIRED_CC_VER           = 16.00.40219.01
+    REQUIRED_LINK_VER         = 10.00.40219.01
   endif
   ifeq ($(CC_VERSION),gcc)
     REQUIRED_CC_VER           = 3.4.3
--- a/make/common/shared/Sanity.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/common/shared/Sanity.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -121,11 +121,13 @@
 endif
 
 ifeq ($(PLATFORM), windows)
-  # Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2
+  # Windows 2000 is 5.0, Windows XP is 5.1,
+  # Windows 2003 is 5.2, Windows 7 and 2008R2 are 6.1
   #    Assume 5.0 (Windows 2000) if systeminfo does not help
   WINDOWS_MAPPING-5.0 := Windows2000
   WINDOWS_MAPPING-5.1 := WindowsXP
   WINDOWS_MAPPING-5.2 := Windows2003
+  WINDOWS_MAPPING-6.1 := Windows2008R2
   # What kind of system we are using (Variation is the common name)
   _OS_VERSION := \
     $(shell systeminfo 2> $(DEV_NULL) | \
@@ -180,7 +182,6 @@
 	sane-linux \
 	sane-cygwin \
 	sane-cygwin-shell \
-	sane-mks \
 	sane-arch_data_model \
 	sane-os_patch_level \
 	sane-classpath \
@@ -317,7 +318,7 @@
 endif # OPENJDK
 
 ifeq ($(PLATFORM), windows)
-  sane-os_version:: sane-cygwin sane-mks sane-cygwin-shell
+  sane-os_version:: sane-cygwin sane-cygwin-shell
 endif
 
 ######################################################
@@ -387,22 +388,6 @@
 endif
 
 ######################################################
-# Check the Windows mks version
-######################################################
-ifeq ($(PLATFORM), windows)
-    MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER))
-sane-mks:
-  ifdef USING_MKS
-    ifeq ($(MKS_CHECK),missing)
-	@$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER))
-    endif
-    ifeq ($(MKS_CHECK),older)
-	@$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER))
-    endif
-  endif
-endif
-
-######################################################
 # Get list of installed patches (this file has a particular format)
 ######################################################
 $(INSTALL_PATCHES_FILE):
--- a/make/java/management/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/java/management/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -57,7 +57,7 @@
 	    Java_sun_management_GcInfoBuilder_fillGcAttributeInfo;
 	    Java_sun_management_GcInfoBuilder_getLastGcInfo0;
 	    Java_sun_management_GcInfoBuilder_getNumGcExtAttributes;
-	    Java_sun_management_HotSpotDiagnostic_dumpHeap;
+	    Java_sun_management_HotSpotDiagnostic_dumpHeap0;
 	    Java_sun_management_HotspotThread_getInternalThreadCount;
 	    Java_sun_management_HotspotThread_getInternalThreadTimes0;
 	    Java_sun_management_MemoryImpl_getMemoryManagers0;
--- a/make/java/redist/Makefile	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/java/redist/Makefile	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -60,15 +60,24 @@
 JVMDB_NAME             = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
 JVMDTRACE_NAME         = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
 
-JVM_DEBUGINFO_NAME       = $(LIB_PREFIX)jvm.debuginfo
 JVM_DIZ_NAME             = $(LIB_PREFIX)jvm.diz
-LIBJSIG_DEBUGINFO_NAME   = $(LIB_PREFIX)jsig.debuginfo
 LIBJSIG_DIZ_NAME         = $(LIB_PREFIX)jsig.diz
-JVMDB_DEBUGINFO_NAME     = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
 JVMDB_DIZ_NAME           = $(LIB_PREFIX)jvm$(DB_SUFFIX).diz
-JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
 JVMDTRACE_DIZ_NAME       = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).diz
 
+ifeq ($(PLATFORM), macosx)
+  # Note: *.dSYM is a directory
+  JVM_DEBUGINFO_NAME       = $(LIB_PREFIX)jvm.dSYM
+  LIBJSIG_DEBUGINFO_NAME   = $(LIB_PREFIX)jsig.dSYM
+  JVMDB_DEBUGINFO_NAME     = $(LIB_PREFIX)jvm$(DB_SUFFIX).dSYM
+  JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).dSYM
+else
+  JVM_DEBUGINFO_NAME       = $(LIB_PREFIX)jvm.debuginfo
+  LIBJSIG_DEBUGINFO_NAME   = $(LIB_PREFIX)jsig.debuginfo
+  JVMDB_DEBUGINFO_NAME     = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
+  JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
+endif
+
 CLASSSHARINGDATA_DIR   = $(BUILDDIR)/tools/sharing
 
 # Needed to do file copy
@@ -441,7 +450,7 @@
 	$(install-import-file)
   else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
   endif
 endif
 
@@ -459,7 +468,7 @@
 	$(install-import-file)
   else
 $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
   endif
 endif
 
@@ -471,8 +480,8 @@
 
   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 # We don't create a symlink to a libjsig.diz file, but we do put
-# the libjsig.debuginfo symlink into a libjsig.diz file. The aurora
-# system does not like dangling symlinks.
+# the $(LIBJSIG_DEBUGINFO_NAME) symlink into a libjsig.diz file.
+# The aurora system does not like dangling symlinks.
     ifeq ($(ZIP_DEBUGINFO_FILES),1)
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DIZ_NAME) \
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DIZ_NAME):
@@ -496,8 +505,8 @@
 
   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 # We don't create a symlink to a libjsig.diz file, but we do put
-# the libjsig.debuginfo symlink into a libjsig.diz file. The aurora
-# system does not like dangling symlinks.
+# the $(LIBJSIG_DEBUGINFO_NAME) symlink into a libjsig.diz file.
+# The aurora system does not like dangling symlinks.
     ifeq ($(ZIP_DEBUGINFO_FILES),1)
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DIZ_NAME):
 	@$(prep-target)
@@ -531,10 +540,10 @@
 	$(install-import-file)
   else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
   endif
 endif
 
@@ -556,10 +565,10 @@
 	$(install-import-file)
     else
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
     endif
   endif
 endif
@@ -581,10 +590,10 @@
 	$(install-import-file)
   else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
   endif
 endif
 
@@ -613,13 +622,13 @@
 	$(install-import-file)
   else
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)
-	$(install-import-file)
+	$(install-import-debuginfo)
   endif
 endif
 
--- a/make/jprt.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/jprt.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -33,9 +33,7 @@
 
 # Standard list of jprt build targets for this source tree
 jprt.build.targets=                                         	\
-    solaris_sparc_5.10-{product|fastdebug},                 	\
     solaris_sparcv9_5.10-{product|fastdebug}, 			\
-    solaris_i586_5.10-{product|fastdebug}, 			\
     solaris_x64_5.10-{product|fastdebug}, 			\
     linux_i586_2.6-{product|fastdebug}, 			\
     linux_x64_2.6-{product|fastdebug}, 				\
@@ -48,9 +46,7 @@
 
 # Test target list (no fastdebug & limited c2 testing)
 jprt.my.test.target.set= \
-    solaris_sparc_5.10-product-c1-TESTNAME,                     \
     solaris_sparcv9_5.10-product-c2-TESTNAME,                   \
-    solaris_i586_5.10-product-c1-TESTNAME,                      \
     solaris_x64_5.10-product-c2-TESTNAME,                       \
     linux_i586_2.6-product-{c1|c2}-TESTNAME,                    \
     linux_x64_2.6-product-c2-TESTNAME,                          \
@@ -112,9 +108,7 @@
 
 # JCK test targets in test/Makefile (no windows)
 jprt.my.jck.test.target.set=					\
-    solaris_sparc_5.10-product-c1-JCK7TESTRULE, 		\
     solaris_sparcv9_5.10-product-c2-JCK7TESTRULE, 		\
-    solaris_i586_5.10-product-c1-JCK7TESTRULE, 			\
     solaris_x64_5.10-product-c2-JCK7TESTRULE, 			\
     linux_i586_2.6-product-c1-JCK7TESTRULE, 			\
     linux_x64_2.6-product-c2-JCK7TESTRULE
--- a/make/sun/awt/FILES_c_macosx.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1995, 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.  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.
-#
-
-FILES_AWT_objc = \
-        $(TARGDIR)MacOSXResourceBundle.m
-
--- a/make/sun/awt/FILES_export_macosx.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1995, 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.  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.
-#
-
-# FILES_export definitions for Mac OS X
-
-FILES_export += \
-	com/apple/resources/MacOSXResourceBundle.java
--- a/make/sun/awt/Makefile	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/awt/Makefile	Wed Oct 30 18:38:20 2013 +0000
@@ -145,8 +145,6 @@
 #
 # Files
 #
-include FILES_c_macosx.gmk
-include FILES_export_macosx.gmk
 
 FILES_objc = $(FILES_AWT_objc)
 OTHER_LDLIBS = -lmlib_image $(JVMLIB) $(LIBM) \
--- a/make/sun/javazic/tzdata/VERSION	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/VERSION	Wed Oct 30 18:38:20 2013 +0000
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2013d
+tzdata2013g
--- a/make/sun/javazic/tzdata/africa	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/africa	Wed Oct 30 18:38:20 2013 +0000
@@ -881,13 +881,23 @@
 # transitions would be 2013-07-07 and 2013-08-10; see:
 # http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10
 
-# From Paul Eggert (2013-07-03):
+# From Steffen Thorsen (2013-09-28):
+# Morocco extends DST by one month, on very short notice, just 1 day
+# before it was going to end.  There is a new decree (2.13.781) for
+# this, where DST from now on goes from last Sunday of March at 02:00
+# to last Sunday of October at 03:00, similar to EU rules.  Official
+# source (French):
+# http://www.maroc.gov.ma/fr/actualites/lhoraire-dete-gmt1-maintenu-jusquau-27-octobre-2013
+# Another source (specifying the time for start and end in the decree):
+# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html
+
+# From Paul Eggert (2013-09-30):
 # To estimate what the Moroccan government will do in future years,
-# transition dates for 2014 through 2021 were determined by running
+# transition dates for 2014 through 2037 were determined by running
 # the following program under GNU Emacs 24.3:
 #
 # (let ((islamic-year 1435))
-#   (while (< islamic-year 1444)
+#   (while (< islamic-year 1460)
 #     (let ((a
 #	     (calendar-gregorian-from-absolute
 #	      (calendar-islamic-to-absolute (list 9 1 islamic-year))))
@@ -902,13 +912,14 @@
 #	  (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
 #     (setq islamic-year (+ 1 islamic-year))))
 #
-# with the results hand-edited for 2020-2022, when the normal spring-forward
-# date falls during the estimated Ramadan.
-#
-# From 2023 through 2038 Ramadan is not predicted to overlap with
-# daylight saving time.  Starting in 2039 there will be overlap again,
+# with spring-forward transitions removed for 2023-2025, when the
+# normal spring-forward date falls during the estimated Ramadan; with
+# all transitions removed for 2026-2035, where the estimated Ramadan
+# falls entirely outside daylight-saving time; and with fall-back
+# transitions removed for 2036-2037, where the normal fall-back
+# date falls during the estimated Ramadan.  Problems continue after that,
 # but 32-bit time_t values roll around in 2038 so for now do not worry
-# about dates after 2038.
+# about dates after 2037.
 
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 
@@ -935,12 +946,14 @@
 Rule	Morocco	2010	only	-	Aug	 8	 0:00	0	-
 Rule	Morocco	2011	only	-	Apr	 3	 0:00	1:00	S
 Rule	Morocco	2011	only	-	Jul	 31	 0	0	-
-Rule	Morocco	2012	2019	-	Apr	 lastSun 2:00	1:00	S
-Rule	Morocco	2012	max	-	Sep	 lastSun 3:00	0	-
+Rule	Morocco	2012	2013	-	Apr	 lastSun 2:00	1:00	S
+Rule	Morocco	2012	only	-	Sep	 30	 3:00	0	-
 Rule	Morocco	2012	only	-	Jul	 20	 3:00	0	-
 Rule	Morocco	2012	only	-	Aug	 20	 2:00	1:00	S
 Rule	Morocco	2013	only	-	Jul	  7	 3:00	0	-
 Rule	Morocco	2013	only	-	Aug	 10	 2:00	1:00	S
+Rule	Morocco	2013	2035	-	Oct	 lastSun 3:00	0	-
+Rule	Morocco	2014	2022	-	Mar	 lastSun 2:00	1:00	S
 Rule	Morocco	2014	only	-	Jun	 29	 3:00	0	-
 Rule	Morocco	2014	only	-	Jul	 29	 2:00	1:00	S
 Rule	Morocco	2015	only	-	Jun	 18	 3:00	0	-
@@ -953,10 +966,21 @@
 Rule	Morocco	2018	only	-	Jun	 15	 2:00	1:00	S
 Rule	Morocco	2019	only	-	May	  6	 3:00	0	-
 Rule	Morocco	2019	only	-	Jun	  5	 2:00	1:00	S
+Rule	Morocco	2020	only	-	Apr	 24	 3:00	0	-
 Rule	Morocco	2020	only	-	May	 24	 2:00	1:00	S
+Rule	Morocco	2021	only	-	Apr	 13	 3:00	0	-
 Rule	Morocco	2021	only	-	May	 13	 2:00	1:00	S
+Rule	Morocco	2022	only	-	Apr	  3	 3:00	0	-
 Rule	Morocco	2022	only	-	May	  3	 2:00	1:00	S
-Rule	Morocco	2023	max	-	Apr	 lastSun 2:00	1:00	S
+Rule	Morocco	2023	only	-	Apr	 22	 2:00	1:00	S
+Rule	Morocco	2024	only	-	Apr	 10	 2:00	1:00	S
+Rule	Morocco	2025	only	-	Mar	 31	 2:00	1:00	S
+Rule	Morocco	2026	max	-	Mar	 lastSun 2:00	1:00	S
+Rule	Morocco	2036	only	-	Oct	 21	 3:00	0	-
+Rule	Morocco	2037	only	-	Oct	 11	 3:00	0	-
+Rule	Morocco	2038	only	-	Sep	 30	 3:00	0	-
+Rule	Morocco	2038	only	-	Oct	 30	 2:00	1:00	S
+Rule	Morocco	2038	max	-	Oct	 lastSun 3:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
@@ -1123,9 +1147,7 @@
 			3:00	-	EAT
 
 # South Sudan
-Zone	Africa/Juba	2:06:24 -	LMT	1931
-			2:00	Sudan	CA%sT	2000 Jan 15 12:00
-			3:00	-	EAT
+Link Africa/Khartoum Africa/Juba
 
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--- a/make/sun/javazic/tzdata/antarctica	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/antarctica	Wed Oct 30 18:38:20 2013 +0000
@@ -39,9 +39,9 @@
 #
 # Except for the French entries,
 # I made up all time zone abbreviations mentioned here; corrections welcome!
-# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
+# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited.
 
-# These rules are stolen from the `southamerica' file.
+# These rules are stolen from the 'southamerica' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	ArgAQ	1964	1966	-	Mar	 1	0:00	0	-
 Rule	ArgAQ	1964	1966	-	Oct	15	0:00	1:00	S
@@ -251,9 +251,10 @@
 # Scott Island (never inhabited)
 #
 # year-round base
-# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo.
+# Scott Base, Ross Island, since 1957-01.
+# See Pacific/Auckland.
 #
-# These rules for New Zealand are stolen from the `australasia' file.
+# These rules for New Zealand are stolen from the 'australasia' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NZAQ	1974	only	-	Nov	 3	2:00s	1:00	D
 Rule	NZAQ	1975	1988	-	Oct	lastSun	2:00s	1:00	D
@@ -291,11 +292,11 @@
 # From Lee Hotz (2001-03-08):
 # I queried the folks at Columbia who spent the summer at Vostok and this is
 # what they had to say about time there:
-# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo)
+# "in the US Camp (East Camp) we have been on New Zealand (McMurdo)
 # time, which is 12 hours ahead of GMT. The Russian Station Vostok was
 # 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead
 # of GMT). This is a time zone I think two hours east of Moscow. The
-# natural time zone is in between the two: 8 hours ahead of GMT.''
+# natural time zone is in between the two: 8 hours ahead of GMT."
 #
 # From Paul Eggert (2001-05-04):
 # This seems to be hopelessly confusing, so I asked Lee Hotz about it
@@ -360,16 +361,8 @@
 			-4:00	ChileAQ	CL%sT
 #
 #
-# McMurdo, Ross Island, since 1955-12
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Antarctica/McMurdo	0	-	zzz	1956
-			12:00	NZAQ	NZ%sT
-#
-# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20
-#
-# From Paul Eggert (1996-09-03):
-# Normally it wouldn't have a separate entry, since it's like the
-# larger Antarctica/McMurdo since 1970, but it's too famous to omit.
+# McMurdo Station, Ross Island, since 1955-12
+# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20
 #
 # From Chris Carrier (1996-06-27):
 # Siple, the first commander of the South Pole station,
@@ -391,4 +384,4 @@
 # we have to go around and set them back 5 minutes or so.
 # Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
 #
-Link	Antarctica/McMurdo	Antarctica/South_Pole
+# See 'australasia' for Antarctica/McMurdo.
--- a/make/sun/javazic/tzdata/asia	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/asia	Wed Oct 30 18:38:20 2013 +0000
@@ -29,7 +29,7 @@
 # go ahead and edit the file (and please send any changes to
 # tz@iana.org for general use in the future).
 
-# From Paul Eggert (2013-02-21):
+# From Paul Eggert (2013-08-11):
 #
 # A good source for time zone historical data outside the U.S. is
 # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -67,11 +67,11 @@
 #	4:00 GST	Gulf*
 #	5:30 IST	India
 #	7:00 ICT	Indochina*
-#	7:00 WIT	west Indonesia
-#	8:00 CIT	central Indonesia
+#	7:00 WIB	west Indonesia (Waktu Indonesia Barat)
+#	8:00 WITA	central Indonesia (Waktu Indonesia Tengah)
 #	8:00 CST	China
 #	9:00 CJT	Central Japanese Time (1896/1937)*
-#	9:00 EIT	east Indonesia
+#	9:00 WIT	east Indonesia (Waktu Indonesia Timur)
 #	9:00 JST  JDT	Japan
 #	9:00 KST  KDT	Korea
 #	9:30 CST	(Australian) Central Standard Time
@@ -779,7 +779,7 @@
 			8:00	-	TLT	1942 Feb 21 23:00 # E Timor Time
 			9:00	-	JST	1945 Sep 23
 			9:00	-	TLT	1976 May  3
-			8:00	-	CIT	2000 Sep 17 00:00
+			8:00	-	WITA	2000 Sep 17 00:00
 			9:00	-	TLT
 
 # India
@@ -816,36 +816,53 @@
 # (Hollandia).  For now, assume all Indonesian locations other than Jayapura
 # switched on 1945-09-23.
 #
+# From Paul Eggert (2013-08-11):
+# Normally the tz database uses English-language abbreviations, but in
+# Indonesia it's typical to use Indonesian-language abbreviations even
+# when writing in English.  For example, see the English-language
+# summary published by the Time and Frequency Laboratory of the
+# Research Center for Calibration, Instrumentation and Metrology,
+# Indonesia, <http://time.kim.lipi.go.id/time-eng.php> (2006-09-29).
+# The abbreviations are:
+#
+# WIB  - UTC+7 - Waktu Indonesia Barat (Indonesia western time)
+# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time)
+# WIT  - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time)
+#
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+# Java, Sumatra
 Zone Asia/Jakarta	7:07:12 -	LMT	1867 Aug 10
 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13,
 # but this must be a typo.
-			7:07:12	-	JMT	1923 Dec 31 23:47:12 # Jakarta
+			7:07:12	-	BMT	1923 Dec 31 23:47:12 # Batavia
 			7:20	-	JAVT	1932 Nov	 # Java Time
-			7:30	-	WIT	1942 Mar 23
+			7:30	-	WIB	1942 Mar 23
 			9:00	-	JST	1945 Sep 23
-			7:30	-	WIT	1948 May
-			8:00	-	WIT	1950 May
-			7:30	-	WIT	1964
-			7:00	-	WIT
+			7:30	-	WIB	1948 May
+			8:00	-	WIB	1950 May
+			7:30	-	WIB	1964
+			7:00	-	WIB
+# west and central Borneo
 Zone Asia/Pontianak	7:17:20	-	LMT	1908 May
 			7:17:20	-	PMT	1932 Nov    # Pontianak MT
-			7:30	-	WIT	1942 Jan 29
+			7:30	-	WIB	1942 Jan 29
 			9:00	-	JST	1945 Sep 23
-			7:30	-	WIT	1948 May
-			8:00	-	WIT	1950 May
-			7:30	-	WIT	1964
-			8:00	-	CIT	1988 Jan  1
-			7:00	-	WIT
+			7:30	-	WIB	1948 May
+			8:00	-	WIB	1950 May
+			7:30	-	WIB	1964
+			8:00	-	WITA	1988 Jan  1
+			7:00	-	WIB
+# Sulawesi, Lesser Sundas, east and south Borneo
 Zone Asia/Makassar	7:57:36 -	LMT	1920
 			7:57:36	-	MMT	1932 Nov    # Macassar MT
-			8:00	-	CIT	1942 Feb  9
+			8:00	-	WITA	1942 Feb  9
 			9:00	-	JST	1945 Sep 23
-			8:00	-	CIT
+			8:00	-	WITA
+# Maluku Islands, West Papua, Papua
 Zone Asia/Jayapura	9:22:48 -	LMT	1932 Nov
-			9:00	-	EIT	1944 Sep  1
+			9:00	-	WIT	1944 Sep  1
 			9:30	-	CST	1964
-			9:00	-	EIT
+			9:00	-	WIT
 
 # Iran
 
@@ -1387,9 +1404,11 @@
 # until about the same time next year (at least).
 # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950
 #
-# From Paul Eggert (2012-10-25):
-# For now, assume this is just a one-year measure.  If it becomes
-# permanent, we should move Jordan from EET to AST effective tomorrow.
+# From Paul Eggert (2013-09-21):
+# It's looking like this change will be permanent; see
+# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20)
+# <http://www.albawaba.com/business/jordan-winter-electricity--472005>.
+# So move Jordan to UTC+3 as of the abovementioned date.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Jordan	1973	only	-	Jun	6	0:00	1:00	S
@@ -1415,15 +1434,15 @@
 Rule	Jordan	1999	only	-	Jul	 1	0:00s	1:00	S
 Rule	Jordan	1999	2002	-	Sep	lastFri	0:00s	0	-
 Rule	Jordan	2000	2001	-	Mar	lastThu	0:00s	1:00	S
-Rule	Jordan	2002	max	-	Mar	lastThu	24:00	1:00	S
+Rule	Jordan	2002	2012	-	Mar	lastThu	24:00	1:00	S
 Rule	Jordan	2003	only	-	Oct	24	0:00s	0	-
 Rule	Jordan	2004	only	-	Oct	15	0:00s	0	-
 Rule	Jordan	2005	only	-	Sep	lastFri	0:00s	0	-
-Rule	Jordan	2006	2011	-	Oct	lastFri	0:00s	0	-
-Rule	Jordan	2013	max	-	Oct	lastFri	0:00s	0	-
+Rule	Jordan	2006	2012	-	Oct	lastFri	0:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Amman	2:23:44 -	LMT	1931
-			2:00	Jordan	EE%sT
+			2:00	Jordan	EE%sT	2012 Oct 26 0:00s
+			3:00	-	AST
 
 
 # Kazakhstan
@@ -2303,9 +2322,18 @@
 # http://www.samanews.com/index.php?act=Show&id=154120
 # http://safa.ps/details/news/99844/%D8%B1%D8%A7%D9%85-%D8%A7%D9%84%D9%84%D9%87-%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-29-%D8%A7%D9%84%D8%AC%D8%A7%D8%B1%D9%8A.html
 
-# From Paul Eggert (2013-04-15):
+# From Steffen Thorsen (2013-09-24):
+# The Gaza and West Bank are ending DST Thursday at midnight
+# (2013-09-27 00:00:00) (one hour earlier than last year...).
+# This source in English, says "that winter time will go into effect
+# at midnight on Thursday in the West Bank and Gaza Strip":
+# http://english.wafa.ps/index.php?action=detail&id=23246
+# official source...:
+# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252
+
+# From Paul Eggert (2013-09-24):
 # For future dates, guess the last Thursday in March at 24:00 through
-# the first Friday on or after September 21 at 01:00.  This is consistent with
+# the first Friday on or after September 21 at 00:00.  This is consistent with
 # the predictions in today's editions of the following URLs,
 # which are for Gaza and Hebron respectively:
 # http://www.timeanddate.com/worldclock/timezone.html?n=702
@@ -2336,7 +2364,8 @@
 Rule Palestine	2011	only	-	Aug	30	0:00	1:00	S
 Rule Palestine	2011	only	-	Sep	30	0:00	0	-
 Rule Palestine	2012	max	-	Mar	lastThu	24:00	1:00	S
-Rule Palestine	2012	max	-	Sep	Fri>=21	1:00	0	-
+Rule Palestine	2012	only	-	Sep	21	1:00	0	-
+Rule Palestine	2013	max	-	Sep	Fri>=21	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
--- a/make/sun/javazic/tzdata/australasia	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/australasia	Wed Oct 30 18:38:20 2013 +0000
@@ -375,16 +375,25 @@
 # today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st
 # October 2012 and end at 3 am on Sunday 20th January 2013.
 # http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
+
+# From the Fijian Government Media Center (2013-08-30) via David Wheeler:
+# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
+# on Sunday 19th January, 2014....  move clocks forward by one hour from 2am
+# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
 #
-# From Paul Eggert (2012-08-31):
-# For now, guess a pattern of the penultimate Sundays in October and January.
+# From Paul Eggert (2013-09-09):
+# For now, guess that Fiji springs forward the Sunday before the fourth
+# Monday in October.  This matches both recent practice and
+# timeanddate.com's current spring-forward prediction.
+# For the January 2014 transition we guessed right while timeanddate.com
+# guessed wrong, so leave the fall-back prediction alone.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
 Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
-Rule	Fiji	2010	max	-	Oct	Sun>=18	2:00	1:00	S
+Rule	Fiji	2010	max	-	Oct	Sun>=21	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
 Rule	Fiji	2012	max	-	Jan	Sun>=18	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -510,6 +519,7 @@
 Zone Pacific/Chatham	12:13:48 -	LMT	1957 Jan  1
 			12:45	Chatham	CHA%sT
 
+Link Pacific/Auckland Antarctica/McMurdo
 
 # Auckland Is
 # uninhabited; Maori and Moriori, colonial settlers, pastoralists, sealers,
@@ -759,7 +769,7 @@
 # 1886-1891; Baker was similar but exact dates are not known.
 # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944;
 # uninhabited thereafter.
-# Howland observed Hawaii Standard Time (UTC-10:30) in 1937;
+# Howland observed Hawaii Standard Time (UT-10:30) in 1937;
 # see page 206 of Elgen M. Long and Marie K. Long,
 # Amelia Earhart: the Mystery Solved, Simon & Schuster (2000).
 # So most likely Howland and Baker observed Hawaii Time from 1935
@@ -772,8 +782,17 @@
 # no information; was probably like Pacific/Kiritimati
 
 # Johnston
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Johnston	-10:00	-	HST
+#
+# From Paul Eggert (2013-09-03):
+# In his memoirs of June 6th to October 4, 1945
+# <http://www.315bw.org/Herb_Bach.htm> (2005), Herbert C. Bach writes,
+# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM
+# Johnston time, 1:30 AM Kwajalein time."  This was in June 1945, and
+# confirms that Johnston kept the same time as Honolulu in summer 1945.
+# We have no better information, so for now, assume this has been true
+# indefinitely into the past.
+#
+# See 'northamerica' for Pacific/Johnston.
 
 # Kingman
 # uninhabited
--- a/make/sun/javazic/tzdata/backward	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/backward	Wed Oct 30 18:38:20 2013 +0000
@@ -45,15 +45,17 @@
 Link	America/Argentina/Mendoza	America/Mendoza
 Link	America/Rio_Branco	America/Porto_Acre
 Link	America/Argentina/Cordoba	America/Rosario
-Link	America/St_Thomas	America/Virgin
+Link	America/Denver		America/Shiprock
+Link	America/Port_of_Spain	America/Virgin
+Link	Pacific/Auckland	Antarctica/South_Pole
 Link	Asia/Ashgabat		Asia/Ashkhabad
+Link	Asia/Kolkata		Asia/Calcutta
 Link	Asia/Chongqing		Asia/Chungking
 Link	Asia/Dhaka		Asia/Dacca
 Link	Asia/Kathmandu		Asia/Katmandu
-Link	Asia/Kolkata		Asia/Calcutta
 Link	Asia/Macau		Asia/Macao
+Link	Asia/Ho_Chi_Minh	Asia/Saigon
 Link	Asia/Jerusalem		Asia/Tel_Aviv
-Link	Asia/Ho_Chi_Minh	Asia/Saigon
 Link	Asia/Thimphu		Asia/Thimbu
 Link	Asia/Makassar		Asia/Ujung_Pandang
 Link	Asia/Ulaanbaatar	Asia/Ulan_Bator
@@ -111,10 +113,10 @@
 Link	Pacific/Chatham		NZ-CHAT
 Link	America/Denver		Navajo
 Link	Asia/Shanghai		PRC
+Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Pacific/Pago_Pago	Pacific/Samoa
+Link	Pacific/Chuuk		Pacific/Truk
 Link	Pacific/Chuuk		Pacific/Yap
-Link	Pacific/Chuuk		Pacific/Truk
-Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Europe/Warsaw		Poland
 Link	Europe/Lisbon		Portugal
 Link	Asia/Taipei		ROC
--- a/make/sun/javazic/tzdata/etcetera	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/etcetera	Wed Oct 30 18:38:20 2013 +0000
@@ -54,9 +54,9 @@
 # even though this is the opposite of what many people expect.
 # POSIX has positive signs west of Greenwich, but many people expect
 # positive signs east of Greenwich.  For example, TZ='Etc/GMT+4' uses
-# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC
+# the abbreviation "GMT+4" and corresponds to 4 hours behind UT
 # (i.e. west of Greenwich) even though many people would expect it to
-# mean 4 hours ahead of UTC (i.e. east of Greenwich).
+# mean 4 hours ahead of UT (i.e. east of Greenwich).
 #
 # In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
 # TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
--- a/make/sun/javazic/tzdata/europe	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/europe	Wed Oct 30 18:38:20 2013 +0000
@@ -65,7 +65,7 @@
 #	</a> (1998-09-21, in Portuguese)
 
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #                   std dst  2dst
@@ -119,7 +119,7 @@
 # and a sketch map showing some of the sightlines involved. One paragraph
 # of the text said:
 #
-# `An old stone obelisk marking a forgotten terrestrial meridian stands
+# 'An old stone obelisk marking a forgotten terrestrial meridian stands
 # beside the river at Kew. In the 18th century, before time and longitude
 # was standardised by the Royal Observatory in Greenwich, scholars observed
 # this stone and the movement of stars from Kew Observatory nearby. They
@@ -163,7 +163,7 @@
 # From Paul Eggert (2003-09-27):
 # Summer Time was first seriously proposed by William Willett (1857-1915),
 # a London builder and member of the Royal Astronomical Society
-# who circulated a pamphlet ``The Waste of Daylight'' (1907)
+# who circulated a pamphlet "The Waste of Daylight" (1907)
 # that proposed advancing clocks 20 minutes on each of four Sundays in April,
 # and retarding them by the same amount on four Sundays in September.
 # A bill was drafted in 1909 and introduced in Parliament several times,
@@ -188,10 +188,10 @@
 #	</a>
 
 # From Paul Eggert (1996-09-03):
-# The OED Supplement says that the English originally said ``Daylight Saving''
+# The OED Supplement says that the English originally said "Daylight Saving"
 # when they were debating the adoption of DST in 1908; but by 1916 this
 # term appears only in quotes taken from DST's opponents, whereas the
-# proponents (who eventually won the argument) are quoted as using ``Summer''.
+# proponents (who eventually won the argument) are quoted as using "Summer".
 
 # From Arthur David Olson (1989-01-19):
 #
@@ -231,9 +231,9 @@
 # which could not be said to run counter to any official description.
 
 # From Paul Eggert (2000-10-02):
-# Howse writes (p 157) `DBST' too, but `BDST' seems to have been common
+# Howse writes (p 157) 'DBST' too, but 'BDST' seems to have been common
 # and follows the more usual convention of putting the location name first,
-# so we use `BDST'.
+# so we use 'BDST'.
 
 # Peter Ilieve (1998-04-19) described at length
 # the history of summer time legislation in the United Kingdom.
@@ -454,6 +454,8 @@
 Rule	GB-Eire 1990	1995	-	Oct	Sun>=22	1:00u	0	GMT
 # Summer Time Order 1997 (S.I. 1997/2982)
 # See EU for rules starting in 1996.
+#
+# Use Europe/London for Jersey, Guernsey, and the Isle of Man.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/London	-0:01:15 -	LMT	1847 Dec  1 0:00s
@@ -820,7 +822,7 @@
 			1:00	EU	CE%sT
 
 # Bosnia and Herzegovina
-# see Serbia
+# See Europe/Belgrade.
 
 # Bulgaria
 #
@@ -848,10 +850,10 @@
 			2:00	EU	EE%sT
 
 # Croatia
-# see Serbia
+# See Europe/Belgrade.
 
 # Cyprus
-# Please see the `asia' file for Asia/Nicosia.
+# Please see the 'asia' file for Asia/Nicosia.
 
 # Czech Republic
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -868,6 +870,7 @@
 			1:00	C-Eur	CE%sT	1944 Sep 17 2:00s
 			1:00	Czech	CE%sT	1979
 			1:00	EU	CE%sT
+# Use Europe/Prague also for Slovakia.
 
 # Denmark, Faroe Islands, and Greenland
 
@@ -1031,12 +1034,12 @@
 # From Peter Ilieve (1996-10-28):
 # [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s,
 # but a relative confirms that Estonia still switches at 02:00s, writing:]
-# ``I do not [know] exactly but there are some little different
+# "I do not [know] exactly but there are some little different
 # (confusing) rules for International Air and Railway Transport Schedules
 # conversion in Sunday connected with end of summer time in Estonia....
 # A discussion is running about the summer time efficiency and effect on
 # human physiology.  It seems that Estonia maybe will not change to
-# summer time next spring.''
+# summer time next spring."
 
 # From Peter Ilieve (1998-11-04), heavily edited:
 # <a href="http://trip.rk.ee/cgi-bin/thw?${BASE}=akt&${OOHTML}=rtd&TA=1998&TO=1&AN=1390">
@@ -1091,7 +1094,7 @@
 # Well, here in Helsinki we're just changing from summer time to regular one,
 # and it's supposed to change at 4am...
 
-# From Janne Snabb (2010-0715):
+# From Janne Snabb (2010-07-15):
 #
 # I noticed that the Finland data is not accurate for years 1981 and 1982.
 # During these two first trial years the DST adjustment was made one hour
@@ -1148,7 +1151,7 @@
 
 
 #
-# Shank & Pottenger seem to use `24:00' ambiguously; resolve it with Whitman.
+# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	France	1916	only	-	Jun	14	23:00s	1:00	S
 Rule	France	1916	1919	-	Oct	Sun>=1	23:00s	0	-
@@ -1438,7 +1441,7 @@
 # <a href="http://toi.iriti.cnr.it/uk/ienitlt.html">
 # Day-light Saving Time in Italy (2006-02-03)
 # </a>
-# (`FP' below), taken from an Italian National Electrotechnical Institute
+# ('FP' below), taken from an Italian National Electrotechnical Institute
 # publication. When the three sources disagree, guess who's right, as follows:
 #
 # year	FP	Shanks&P. (S)	Whitman (W)	Go with:
@@ -1584,10 +1587,22 @@
 			2:00	EU	EE%sT
 
 # Liechtenstein
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Europe/Vaduz	0:38:04 -	LMT	1894 Jun
-			1:00	-	CET	1981
-			1:00	EU	CE%sT
+
+# From Paul Eggert (2013-09-09):
+# Shanks & Pottenger say Vaduz is like Zurich.
+
+# From Alois Treindl (2013-09-18):
+# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf
+# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942.
+# I ... translate only the last two paragraphs:
+#    ... during second world war, in the years 1941 and 1942, Liechtenstein
+#    introduced daylight saving time, adapting to Switzerland.  From 1943 on
+#    central European time was in force throughout the year.
+#    From a report of the duke's government to the high council,
+#    regarding the introduction of a time law, of 31 May 1977.
+
+Link Europe/Zurich Europe/Vaduz
+
 
 # Lithuania
 
@@ -1675,7 +1690,7 @@
 			1:00	EU	CE%sT
 
 # Macedonia
-# see Serbia
+# See Europe/Belgrade.
 
 # Malta
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -1768,7 +1783,7 @@
 			1:00	EU	CE%sT
 
 # Montenegro
-# see Serbia
+# See Europe/Belgrade.
 
 # Netherlands
 
@@ -1883,7 +1898,7 @@
 # before 1895, and therefore probably changed the local time somewhere
 # between 1895 and 1925 (inclusive).
 
-# From Paul Eggert (2001-05-01):
+# From Paul Eggert (2013-09-04):
 #
 # Actually, Jan Mayen was never occupied by Germany during World War II,
 # so it must have diverged from Oslo time during the war, as Oslo was
@@ -1894,7 +1909,7 @@
 # 1941 with a small Norwegian garrison and continued operations despite
 # frequent air ttacks from Germans.  In 1943 the Americans established a
 # radiolocating station on the island, called "Atlantic City".  Possibly
-# the UTC offset changed during the war, but I think it unlikely that
+# the UT offset changed during the war, but I think it unlikely that
 # Jan Mayen used German daylight-saving rules.
 #
 # Svalbard is more complicated, as it was raided in August 1941 by an
@@ -1907,9 +1922,8 @@
 # the German armed forces at the Svalbard weather station code-named
 # Haudegen did not surrender to the Allies until September 1945.
 #
-# All these events predate our cutoff date of 1970.  Unless we can
-# come up with more definitive info about the timekeeping during the
-# war years it's probably best just do...the following for now:
+# All these events predate our cutoff date of 1970, so use Europe/Oslo
+# for these regions.
 Link	Europe/Oslo	Arctic/Longyearbyen
 
 # Poland
@@ -2167,7 +2181,7 @@
 # so we (Novosibirsk) simply did not switch.
 #
 # From Andrey A. Chernov (1996-10-04):
-# `MSK' and `MSD' were born and used initially on Moscow computers with
+# 'MSK' and 'MSD' were born and used initially on Moscow computers with
 # UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group)....
 # The next step was the UUCP network, the Relcom predecessor
 # (used mainly for mail), and MSK/MSD was actively used there.
@@ -2466,6 +2480,9 @@
 			11:00	Russia	ANA%sT	2011 Mar 27 2:00s
 			12:00	-	ANAT
 
+# San Marino
+# See Europe/Rome.
+
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Belgrade	1:22:00	-	LMT	1884
@@ -2488,7 +2505,7 @@
 Link Europe/Prague Europe/Bratislava
 
 # Slovenia
-# see Serbia
+# See Europe/Belgrade.
 
 # Spain
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -2622,7 +2639,7 @@
 # and their performance improved enormously.  Communities began to keep
 # mean time in preference to apparent time -- Geneva from 1780 ....
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# From Whitman (who writes ``Midnight?''):
+# From Whitman (who writes "Midnight?"):
 # Rule	Swiss	1940	only	-	Nov	 2	0:00	1:00	S
 # Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
 # From Shanks & Pottenger:
@@ -2667,23 +2684,53 @@
 # The 1940 rules must be deleted.
 #
 # One further detail for Switzerland, which is probably out of scope for
-# most users of tzdata:
-# The zone file
-# Zone    Europe/Zurich   0:34:08 -       LMT     1848 Sep 12
-#                          0:29:44 -       BMT     1894 Jun #Bern Mean Time
-#                          1:00    Swiss   CE%sT   1981
-#                          1:00    EU      CE%sT
+# most users of tzdata: The [Europe/Zurich zone] ...
 # describes all of Switzerland correctly, with the exception of
 # the Cantone Geneve (Geneva, Genf). Between 1848 and 1894 Geneve did not
 # follow Bern Mean Time but kept its own local mean time.
 # To represent this, an extra zone would be needed.
+#
+# From Alois Treindl (2013-09-11):
+# The Federal regulations say
+# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html
+# ... the meridian for Bern mean time ... is 7 degrees 26'22.50".
+# Expressed in time, it is 0h29m45.5s.
+
+# From Pierre-Yves Berger (2013-09-11):
+# the "Circulaire du conseil federal" (December 11 1893)
+# <http://www.amtsdruckschriften.bar.admin.ch/viewOrigDoc.do?id=10071353> ...
+# clearly states that the [1894-06-01] change should be done at midnight
+# but if no one is present after 11 at night, could be postponed until one
+# hour before the beginning of service.
+
+# From Paul Eggert (2013-09-11):
+# Round BMT to the nearest even second, 0:29:46.
+#
+# We can find no reliable source for Shanks's assertion that all of Switzerland
+# except Geneva switched to Bern Mean Time at 00:00 on 1848-09-12.  This book:
+#
+#	Jakob Messerli. Gleichmassig, punktlich, schnell: Zeiteinteilung und
+#	Zeitgebrauch in der Schweiz im 19. Jahrhundert. Chronos, Zurich 1995,
+#	ISBN 3-905311-68-2, OCLC 717570797.
+#
+# suggests that the transition was more gradual, and that the Swiss did not
+# agree about civil time during the transition.  The timekeeping it gives the
+# most detail for is postal and telegraph time: here, federal legislation (the
+# "Bundesgesetz uber die Erstellung von elektrischen Telegraphen") passed on
+# 1851-11-23, and an official implementation notice was published 1853-07-16
+# (Bundesblatt 1853, Bd. II, S. 859).  On p 72 Messerli writes that in
+# practice since July 1853 Bernese time was used in "all postal and telegraph
+# offices in Switzerland from Geneva to St. Gallen and Basel to Chiasso"
+# (Google translation).  For now, model this transition as occurring on
+# 1853-07-16, though it probably occurred at some other date in Zurich, and
+# legal civil time probably changed at still some other transition date.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Swiss	1941	1942	-	May	Mon>=1	1:00	1:00	S
 Rule	Swiss	1941	1942	-	Oct	Mon>=1	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Europe/Zurich	0:34:08 -	LMT	1848 Sep 12
-			0:29:44	-	BMT	1894 Jun # Bern Mean Time
+Zone	Europe/Zurich	0:34:08 -	LMT	1853 Jul 16 # See above comment.
+			0:29:46	-	BMT	1894 Jun # Bern Mean Time
 			1:00	Swiss	CE%sT	1981
 			1:00	EU	CE%sT
 
@@ -2907,7 +2954,7 @@
 # From Paul Eggert (2006-03-22):
 # The _Economist_ (1994-05-28, p 45) reports that central Crimea switched
 # from Kiev to Moscow time sometime after the January 1994 elections.
-# Shanks (1999) says ``date of change uncertain'', but implies that it happened
+# Shanks (1999) says "date of change uncertain", but implies that it happened
 # sometime between the 1994 DST switches.  Shanks & Pottenger simply say
 # 1994-09-25 03:00, but that can't be right.  For now, guess it
 # changed in May.
@@ -2921,6 +2968,9 @@
 			3:00	-	MSK	1997 Mar lastSun 1:00u
 			2:00	EU	EE%sT
 
+# Vatican City
+# See Europe/Rome.
+
 ###############################################################################
 
 # One source shows that Bulgaria, Cyprus, Finland, and Greece observe DST from
--- a/make/sun/javazic/tzdata/iso3166.tab	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/iso3166.tab	Wed Oct 30 18:38:20 2013 +0000
@@ -32,7 +32,7 @@
 # 1.  ISO 3166-1 alpha-2 country code, current as of
 #     ISO 3166-1 Newsletter VI-15 (2013-05-10).  See: Updates on ISO 3166
 #   http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
-# 2.  The usual English name for the country,
+# 2.  The usual English name for the coded region,
 #     chosen so that alphabetic sorting of subsets produces helpful lists.
 #     This is not the same as the English name in the ISO 3166 tables.
 #
@@ -46,7 +46,7 @@
 # to take or endorse any position on legal or territorial claims.
 #
 #country-
-#code	country name
+#code	name of country, territory, area, or subdivision
 AD	Andorra
 AE	United Arab Emirates
 AF	Afghanistan
@@ -76,7 +76,7 @@
 BM	Bermuda
 BN	Brunei
 BO	Bolivia
-BQ	Bonaire, St Eustatius & Saba
+BQ	Caribbean Netherlands
 BR	Brazil
 BS	Bahamas
 BT	Bhutan
--- a/make/sun/javazic/tzdata/leapseconds	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/leapseconds	Wed Oct 30 18:38:20 2013 +0000
@@ -20,18 +20,24 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#
-# <pre>
-# This file is in the public domain, so clarified as of
-# 2009-05-17 by Arthur David Olson.
 
 # Allowance for leapseconds added to each timezone file.
 
+# This file is in the public domain.
+
+# This file is generated automatically from the data in the public-domain
+# leap-seconds.list file available from most NIST time servers.
+# If the URL <ftp://time.nist.gov/pub/leap-seconds.list> does not work,
+# you should be able to pick up leap-seconds.list from a secondary NIST server.
+# For more about leap-seconds.list, please see
+# The NTP Timescale and Leap Seconds
+# <http://www.eecis.udel.edu/~mills/leap.html>.
+
 # The International Earth Rotation Service periodically uses leap seconds
 # to keep UTC to within 0.9 s of UT1
 # (which measures the true angular orientation of the earth in space); see
 # Terry J Quinn, The BIPM and the accurate measure of time,
-# Proc IEEE 79, 7 (July 1991), 894-905.
+# Proc IEEE 79, 7 (July 1991), 894-905 <http://dx.doi.org/10.1109/5.84965>.
 # There were no leap seconds before 1972, because the official mechanism
 # accounting for the discrepancy between atomic time and the earth's rotation
 # did not exist until the early 1970s.
@@ -42,8 +48,8 @@
 # or
 #	Leap	YEAR	MON	DAY	23:59:59	-	R/S
 
-# If the leapsecond is Rolling (R) the given time is local time
-# If the leapsecond is Stationary (S) the given time is UTC
+# If the leapsecond is Rolling (R) the given time is local time.
+# If the leapsecond is Stationary (S) the given time is UTC.
 
 # Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
 Leap	1972	Jun	30	23:59:60	+	S
@@ -71,53 +77,3 @@
 Leap	2005	Dec	31	23:59:60	+	S
 Leap	2008	Dec	31	23:59:60	+	S
 Leap	2012	Jun	30	23:59:60	+	S
-
-# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
-#
-# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
-#
-#
-# SERVICE DE LA ROTATION TERRESTRE
-# OBSERVATOIRE DE PARIS
-# 61, Av. de l'Observatoire 75014 PARIS (France)
-# Tel.      : 33 (0) 1 40 51 22 26
-# FAX       : 33 (0) 1 40 51 22 91
-# e-mail    : (E-Mail Removed)
-# http://hpiers.obspm.fr/eop-pc
-#
-# Paris, 5 January 2012
-#
-#
-# Bulletin C 43
-#
-# To authorities responsible
-# for the measurement and
-# distribution of time
-#
-#
-# UTC TIME STEP
-# on the 1st of July 2012
-#
-#
-# A positive leap second will be introduced at the end of June 2012.
-# The sequence of dates of the UTC second markers will be:
-#
-#                          2012 June 30,     23h 59m 59s
-#                          2012 June 30,     23h 59m 60s
-#                          2012 July  1,      0h  0m  0s
-#
-# The difference between UTC and the International Atomic Time TAI is:
-#
-# from 2009 January 1, 0h UTC, to 2012 July 1  0h UTC  : UTC-TAI = - 34s
-# from 2012 July 1,    0h UTC, until further notice    : UTC-TAI = - 35s
-#
-# Leap seconds can be introduced in UTC at the end of the months of December
-# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
-# six months, either to announce a time step in UTC or to confirm that there
-# will be no time step at the next possible date.
-#
-#
-# Daniel GAMBIS
-# Head
-# Earth Orientation Center of IERS
-# Observatoire de Paris, France
--- a/make/sun/javazic/tzdata/northamerica	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/northamerica	Wed Oct 30 18:38:20 2013 +0000
@@ -43,7 +43,7 @@
 # Howse writes (pp 121-125) that time zones were invented by
 # Professor Charles Ferdinand Dowd (1825-1904),
 # Principal of Temple Grove Ladies' Seminary (Saratoga Springs, NY).
-# His pamphlet ``A System of National Time for Railroads'' (1870)
+# His pamphlet "A System of National Time for Railroads" (1870)
 # was the result of his proposals at the Convention of Railroad Trunk Lines
 # in New York City (1869-10).  His 1870 proposal was based on Washington, DC,
 # but in 1872-05 he moved the proposed origin to Greenwich.
@@ -63,8 +63,8 @@
 
 # From Paul Eggert (2001-03-06):
 # Daylight Saving Time was first suggested as a joke by Benjamin Franklin
-# in his whimsical essay ``An Economical Project for Diminishing the Cost
-# of Light'' published in the Journal de Paris (1784-04-26).
+# in his whimsical essay "An Economical Project for Diminishing the Cost
+# of Light" published in the Journal de Paris (1784-04-26).
 # Not everyone is happy with the results:
 #
 #	I don't really care how time is reckoned so long as there is some
@@ -190,8 +190,8 @@
 #    of the Aleutian islands.   No DST.
 
 # From Paul Eggert (1995-12-19):
-# The tables below use `NST', not `NT', for Nome Standard Time.
-# I invented `CAWT' for Central Alaska War Time.
+# The tables below use 'NST', not 'NT', for Nome Standard Time.
+# I invented 'CAWT' for Central Alaska War Time.
 
 # From U. S. Naval Observatory (1989-01-19):
 # USA  EASTERN       5 H  BEHIND UTC    NEW YORK, WASHINGTON
@@ -260,9 +260,9 @@
 # H.R. 6, Energy Policy Act of 2005, SEC. 110. DAYLIGHT SAVINGS.
 #   (a) Amendment- Section 3(a) of the Uniform Time Act of 1966 (15
 #   U.S.C. 260a(a)) is amended--
-#     (1) by striking `first Sunday of April' and inserting `second
+#     (1) by striking 'first Sunday of April' and inserting 'second
 #     Sunday of March'; and
-#     (2) by striking `last Sunday of October' and inserting `first
+#     (2) by striking 'last Sunday of October' and inserting 'first
 #     Sunday of November'.
 #   (b) Effective Date- Subsection (a) shall take effect 1 year after the
 #   date of enactment of this Act or March 1, 2007, whichever is later.
@@ -623,6 +623,8 @@
 			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
+Link Pacific/Honolulu Pacific/Johnston
+
 # Now we turn to US areas that have diverged from the consensus since 1970.
 
 # Arizona mostly uses MST.
@@ -659,8 +661,9 @@
 # Navajo Nation participates in the Daylight Saving Time policy, due to its
 # large size and location in three states."  (The "only" means that other
 # tribal nations don't use DST.)
-
-Link America/Denver America/Shiprock
+#
+# From Paul Eggert (2013-08-26):
+# See America/Denver for a zone appropriate for the Navajo Nation.
 
 # Southern Idaho (Ada, Adams, Bannock, Bear Lake, Bingham, Blaine,
 # Boise, Bonneville, Butte, Camas, Canyon, Caribou, Cassia, Clark,
@@ -700,13 +703,13 @@
 #   and Switzerland counties have their own time zone histories as noted below.
 #
 # Shanks partitioned Indiana into 345 regions, each with its own time history,
-# and wrote ``Even newspaper reports present contradictory information.''
+# and wrote "Even newspaper reports present contradictory information."
 # Those Hoosiers!  Such a flighty and changeable people!
 # Fortunately, most of the complexity occurred before our cutoff date of 1970.
 #
 # Other than Indianapolis, the Indiana place names are so nondescript
-# that they would be ambiguous if we left them at the `America' level.
-# So we reluctantly put them all in a subdirectory `America/Indiana'.
+# that they would be ambiguous if we left them at the 'America' level.
+# So we reluctantly put them all in a subdirectory 'America/Indiana'.
 
 # From Paul Eggert (2005-08-16):
 # http://www.mccsc.edu/time.html says that Indiana will use DST starting 2006.
@@ -970,8 +973,8 @@
 # This story is too entertaining to be false, so go with Howse over Shanks.
 #
 # From Paul Eggert (2001-03-06):
-# Garland (1927) writes ``Cleveland and Detroit advanced their clocks
-# one hour in 1914.''  This change is not in Shanks.  We have no more
+# Garland (1927) writes "Cleveland and Detroit advanced their clocks
+# one hour in 1914."  This change is not in Shanks.  We have no more
 # info, so omit this for now.
 #
 # Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
@@ -1011,7 +1014,7 @@
 # occupied 1857/1900 by the Navassa Phosphate Co
 # US lighthouse 1917/1996-09
 # currently uninhabited
-# see Mark Fineman, ``An Isle Rich in Guano and Discord'',
+# see Mark Fineman, "An Isle Rich in Guano and Discord",
 # _Los Angeles Times_ (1998-11-10), A1, A10; it cites
 # Jimmy Skaggs, _The Great Guano Rush_ (1994).
 
@@ -1045,7 +1048,7 @@
 #	Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
 #	<http://www.jstor.org/stable/1774359>.
 #
-# See the `europe' file for Greenland.
+# See the 'europe' file for Greenland.
 
 # Canada
 
@@ -1246,7 +1249,7 @@
 
 # most of east Labrador
 
-# The name `Happy Valley-Goose Bay' is too long; use `Goose Bay'.
+# The name 'Happy Valley-Goose Bay' is too long; use 'Goose Bay'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Goose_Bay	-4:01:40 -	LMT	1884 # Happy Valley-Goose Bay
 			-3:30:52 -	NST	1918
@@ -1363,25 +1366,27 @@
 
 # Quebec
 
-# From Paul Eggert (2006-07-09):
-# Shanks & Pottenger write that since 1970 most of Quebec has been
-# like Montreal.
+# From Paul Eggert (2013-08-30):
+# Since 1970 most of Quebec has been like Toronto.
+# However, because earlier versions of the tz database mistakenly relied on data
+# from Shanks & Pottenger saying that Quebec differed from Ontario after 1970,
+# a separate entry was created for most of Quebec.  We're loath to lose
+# its pre-1970 info, even though the tz database is normally limited to
+# zones that differ after 1970, so keep this otherwise out-of-scope entry.
 
-# From Paul Eggert (2006-06-27):
 # Matthews and Vincent (1998) also write that Quebec east of the -63
 # meridian is supposed to observe AST, but residents as far east as
 # Natashquan use EST/EDT, and residents east of Natashquan use AST.
-# In "Official time in Quebec" the Quebec department of justice writes in
-# http://www.justice.gouv.qc.ca/english/publications/generale/temps-regl-1-a.htm
-# that "The residents of the Municipality of the
-# Cote-Nord-du-Golfe-Saint-Laurent and the municipalities of Saint-Augustin,
-# Bonne-Esperance and Blanc-Sablon apply the Official Time Act as it is
-# written and use Atlantic standard time all year round. The same applies to
-# the residents of the Native facilities along the lower North Shore."
-# <http://www.assnat.qc.ca/eng/37legislature2/Projets-loi/Publics/06-a002.htm>
+# The Quebec department of justice writes in
+# "The situation in Minganie and Basse-Cote-Nord"
+# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm
+# that the coastal strip from just east of Natashquan to Blanc-Sablon
+# observes Atlantic standard time all year round.
+# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
 # says this common practice was codified into law as of 2007.
 # For lack of better info, guess this practice began around 1970, contra to
 # Shanks & Pottenger who have this region observing AST/ADT.
+# for post-1970 data America/Puerto_Rico.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mont	1917	only	-	Mar	25	2:00	1:00	D
@@ -1425,7 +1430,6 @@
 			-5:00	Mont	E%sT	1974
 			-5:00	Canada	E%sT
 
-
 # Ontario
 
 # From Paul Eggert (2006-07-09):
@@ -1644,7 +1648,7 @@
 			-6:00	-	CST	1910
 			-5:00	-	EST	1942
 			-5:00	Canada	E%sT	1970
-			-5:00	Mont	E%sT	1973
+			-5:00	Toronto	E%sT	1973
 			-5:00	-	EST	1974
 			-5:00	Canada	E%sT
 Zone America/Nipigon	-5:53:04 -	LMT	1895
@@ -2231,7 +2235,7 @@
 # From Paul Eggert (1996-06-12):
 # For an English translation of the decree, see
 # <a href="http://mexico-travel.com/extra/timezone_eng.html">
-# ``Diario Oficial: Time Zone Changeover'' (1996-01-04).
+# "Diario Oficial: Time Zone Changeover" (1996-01-04).
 # </a>
 
 # From Rives McDow (1998-10-08):
@@ -2568,9 +2572,7 @@
 ###############################################################################
 
 # Anguilla
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Anguilla	-4:12:16 -	LMT	1912 Mar 2
-			-4:00	-	AST
+# See 'southamerica'.
 
 # Antigua and Barbuda
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -2639,13 +2641,13 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Atlantic/Bermuda	-4:19:18 -	LMT	1930 Jan  1 2:00    # Hamilton
 			-4:00	-	AST	1974 Apr 28 2:00
-			-4:00	Bahamas	A%sT	1976
+			-4:00	Canada	A%sT	1976
 			-4:00	US	A%sT
 
 # Cayman Is
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Cayman	-5:25:32 -	LMT	1890		# Georgetown
-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
 			-5:00	-	EST
 
 # Costa Rica
@@ -2660,7 +2662,7 @@
 # go with Shanks & Pottenger.
 Rule	CR	1991	only	-	Jul	 1	0:00	0	S
 Rule	CR	1992	only	-	Mar	15	0:00	0	S
-# There are too many San Joses elsewhere, so we'll use `Costa Rica'.
+# There are too many San Joses elsewhere, so we'll use 'Costa Rica'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Costa_Rica	-5:36:13 -	LMT	1890		# San Jose
 			-5:36:13 -	SJMT	1921 Jan 15 # San Jose Mean Time
@@ -2892,9 +2894,7 @@
 			-5:00	Cuba	C%sT
 
 # Dominica
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Dominica	-4:05:36 -	LMT	1911 Jul 1 0:01		# Roseau
-			-4:00	-	AST
+# See 'southamerica'.
 
 # Dominican Republic
 
@@ -2943,18 +2943,10 @@
 			-6:00	Salv	C%sT
 
 # Grenada
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	America/Grenada	-4:07:00 -	LMT	1911 Jul	# St George's
-			-4:00	-	AST
-
 # Guadeloupe
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Guadeloupe	-4:06:08 -	LMT	1911 Jun 8	# Pointe a Pitre
-			-4:00	-	AST
 # St Barthelemy
-Link America/Guadeloupe	America/St_Barthelemy
 # St Martin (French part)
-Link America/Guadeloupe	America/Marigot
+# See 'southamerica'.
 
 # Guatemala
 #
@@ -3097,17 +3089,12 @@
 # Great Swan I ceded by US to Honduras in 1972
 
 # Jamaica
-
-# From Bob Devine (1988-01-28):
-# Follows US rules.
-
-# From U. S. Naval Observatory (1989-01-19):
-# JAMAICA             5 H  BEHIND UTC
-
-# From Shanks & Pottenger:
+# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
+# unspecified official document, and says "This time is used throughout the
+# island".  Go with Milne.  Round to the nearest second as required by zic.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	America/Jamaica	-5:07:12 -	LMT	1890		# Kingston
-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
+Zone	America/Jamaica	-5:07:11 -	LMT	1890		# Kingston
+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
 			-5:00	-	EST	1974 Apr 28 2:00
 			-5:00	US	E%sT	1984
 			-5:00	-	EST
@@ -3121,12 +3108,7 @@
 			-4:00	-	AST
 
 # Montserrat
-# From Paul Eggert (2006-03-22):
-# In 1995 volcanic eruptions forced evacuation of Plymouth, the capital.
-# world.gazetteer.com says Cork Hill is the most populous location now.
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Montserrat	-4:08:52 -	LMT	1911 Jul 1 0:01   # Cork Hill
-			-4:00	-	AST
+# See 'southamerica'.
 
 # Nicaragua
 #
@@ -3200,7 +3182,7 @@
 			-5:00	-	EST
 
 # Puerto Rico
-# There are too many San Juans elsewhere, so we'll use `Puerto_Rico'.
+# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Puerto_Rico -4:24:25 -	LMT	1899 Mar 28 12:00    # San Juan
 			-4:00	-	AST	1942 May  3
@@ -3208,18 +3190,11 @@
 			-4:00	-	AST
 
 # St Kitts-Nevis
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/St_Kitts	-4:10:52 -	LMT	1912 Mar 2	# Basseterre
-			-4:00	-	AST
-
 # St Lucia
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/St_Lucia	-4:04:00 -	LMT	1890		# Castries
-			-4:04:00 -	CMT	1912	    # Castries Mean Time
-			-4:00	-	AST
+# See 'southamerica'.
 
 # St Pierre and Miquelon
-# There are too many St Pierres elsewhere, so we'll use `Miquelon'.
+# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Miquelon	-3:44:40 -	LMT	1911 May 15	# St Pierre
 			-4:00	-	AST	1980 May
@@ -3227,10 +3202,7 @@
 			-3:00	Canada	PM%sT
 
 # St Vincent and the Grenadines
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/St_Vincent	-4:04:56 -	LMT	1890		# Kingstown
-			-4:04:56 -	KMT	1912	   # Kingstown Mean Time
-			-4:00	-	AST
+# See 'southamerica'.
 
 # Turks and Caicos
 #
@@ -3260,15 +3232,9 @@
 Rule	TC	2007	max	-	Nov	Sun>=1	2:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Grand_Turk	-4:44:32 -	LMT	1890
-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
 			-5:00	TC	E%sT
 
 # British Virgin Is
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Tortola	-4:18:28 -	LMT	1911 Jul    # Road Town
-			-4:00	-	AST
-
 # Virgin Is
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/St_Thomas	-4:19:44 -	LMT	1911 Jul    # Charlotte Amalie
-			-4:00	-	AST
+# See 'southamerica'.
--- a/make/sun/javazic/tzdata/southamerica	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/southamerica	Wed Oct 30 18:38:20 2013 +0000
@@ -474,6 +474,17 @@
 # rules...San Luis is still using "Western ARgentina Time" and it got
 # stuck on Summer daylight savings time even though the summer is over.
 
+# From Paul Eggert (2013-09-05):
+# Perhaps San Luis operates on the legal fiction that it is at UTC-4
+# with perpetual summer time, but ordinary usage typically seems to
+# just say it's at UTC-3; see, for example,
+# <http://es.wikipedia.org/wiki/Hora_oficial_argentina>.
+# We've documented similar situations as being plain changes to
+# standard time, so let's do that here too.  This does not change UTC
+# offsets, only tm_isdst and the time zone abbreviations.  One minor
+# plus is that this silences a zic complaint that there's no POSIX TZ
+# setting for time stamps past 2038.
+
 # From Paul Eggert (2013-02-21):
 # Milne says Cordoba time was -4:16:48.2.  Round to the nearest second.
 
@@ -611,7 +622,7 @@
 # San Luis (SL)
 
 Rule	SanLuis	2008	2009	-	Mar	Sun>=8	0:00	0	-
-Rule	SanLuis	2007	2009	-	Oct	Sun>=8	0:00	1:00	S
+Rule	SanLuis	2007	2008	-	Oct	Sun>=8	0:00	1:00	S
 
 Zone America/Argentina/San_Luis -4:25:24 - LMT	1894 Oct 31
 			-4:16:48 -	CMT	1920 May
@@ -627,7 +638,8 @@
 			-3:00	-	ART	2004 May 31
 			-4:00	-	WART	2004 Jul 25
 			-3:00	Arg	AR%sT	2008 Jan 21
-			-4:00	SanLuis	WAR%sT
+			-4:00	SanLuis	WAR%sT	2009 Oct 11
+			-3:00	-	ART
 #
 # Santa Cruz (SC)
 Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
@@ -654,10 +666,7 @@
 			-3:00	-	ART
 
 # Aruba
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	America/Aruba	-4:40:24 -	LMT	1912 Feb 12	# Oranjestad
-			-4:30	-	ANT	1965 # Netherlands Antilles Time
-			-4:00	-	AST
+Link America/Curacao America/Aruba
 
 # Bolivia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -859,6 +868,12 @@
 # Tocantins state will have DST.
 # http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
 
+# From Steffen Thorsen (2013-09-20):
+# Tocantins in Brazil is very likely not to observe DST from October....
+# http://conexaoto.com.br/2013/09/18/ministerio-confirma-que-tocantins-esta-fora-do-horario-de-verao-em-2013-mas-falta-publicacao-de-decreto
+# We will keep this article updated when this is confirmed:
+# http://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01)
 # Decree <a href="http://pcdsh01.on.br/HV21896.htm">21,896</a> (1932-01-10)
@@ -1078,7 +1093,8 @@
 			-3:00	-	BRT	1995 Sep 14
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT	2012 Oct 21
-			-3:00	Brazil	BR%sT
+			-3:00	Brazil	BR%sT	2013 Sep
+			-3:00	-	BRT
 #
 # Alagoas (AL), Sergipe (SE)
 Zone America/Maceio	-2:22:52 -	LMT	1914
@@ -1373,12 +1389,12 @@
 			-4:00	-	AST
 
 # From Arthur David Olson (2011-06-15):
-# At least for now, use links for places with new iso3166 codes.
+# use links for places with new iso3166 codes.
 # The name "Lower Prince's Quarter" is both longer than fourteen charaters
 # and contains an apostrophe; use "Lower_Princes" below.
 
-Link	America/Curacao	America/Lower_Princes # Sint Maarten
-Link	America/Curacao	America/Kralendijk # Bonaire, Sint Estatius and Saba
+Link	America/Curacao	America/Lower_Princes	# Sint Maarten
+Link	America/Curacao	America/Kralendijk	# Caribbean Netherlands
 
 # Ecuador
 #
@@ -1519,10 +1535,16 @@
 			-4:00	-	GYT
 
 # Paraguay
+#
 # From Paul Eggert (2006-03-22):
 # Shanks & Pottenger say that spring transitions are from 01:00 -> 02:00,
 # and autumn transitions are from 00:00 -> 23:00.  Go with pre-1999
 # editions of Shanks, and with the IATA, who say transitions occur at 00:00.
+#
+# From Waldemar Villamayor-Venialbo (2013-09-20):
+# No time of the day is established for the adjustment, so people normally
+# adjust their clocks at 0 hour of the given dates.
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Para	1975	1988	-	Oct	 1	0:00	1:00	S
 Rule	Para	1975	1978	-	Mar	 1	0:00	0	-
@@ -1656,6 +1678,19 @@
 Zone America/Port_of_Spain -4:06:04 -	LMT	1912 Mar 2
 			-4:00	-	AST
 
+Link America/Port_of_Spain America/Anguilla
+Link America/Port_of_Spain America/Dominica
+Link America/Port_of_Spain America/Grenada
+Link America/Port_of_Spain America/Guadeloupe
+Link America/Port_of_Spain America/Marigot
+Link America/Port_of_Spain America/Montserrat
+Link America/Port_of_Spain America/St_Barthelemy
+Link America/Port_of_Spain America/St_Kitts
+Link America/Port_of_Spain America/St_Lucia
+Link America/Port_of_Spain America/St_Thomas
+Link America/Port_of_Spain America/St_Vincent
+Link America/Port_of_Spain America/Tortola
+
 # Uruguay
 # From Paul Eggert (1993-11-18):
 # Uruguay wins the prize for the strangest peacetime manipulation of the rules.
@@ -1673,7 +1708,7 @@
 # Whitman gives 1937 Oct 3; go with Shanks & Pottenger.
 Rule	Uruguay	1937	1940	-	Oct	lastSun	 0:00	0:30	HS
 # Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13,
-# and 1943 Apr 13 ``to present time''; go with Shanks & Pottenger.
+# and 1943 Apr 13 "to present time"; go with Shanks & Pottenger.
 Rule	Uruguay	1941	only	-	Aug	 1	 0:00	0:30	HS
 Rule	Uruguay	1942	only	-	Jan	 1	 0:00	0	-
 Rule	Uruguay	1942	only	-	Dec	14	 0:00	1:00	S
--- a/make/sun/javazic/tzdata/zone.tab	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/sun/javazic/tzdata/zone.tab	Wed Oct 30 18:38:20 2013 +0000
@@ -26,27 +26,30 @@
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
-# From Paul Eggert (2013-05-27):
+# From Paul Eggert (2013-08-14):
 #
-# This file contains a table with the following columns:
-# 1.  ISO 3166 2-character country code.  See the file `iso3166.tab'.
-#     This identifies a country that overlaps the zone.  The country may
-#     overlap other zones and the zone may overlap other countries.
-# 2.  Latitude and longitude of the zone's principal location
+# This file contains a table where each row stands for an area that is
+# the intersection of a region identified by a country code and of a
+# zone where civil clocks have agreed since 1970.  The columns of the
+# table are as follows:
+#
+# 1.  ISO 3166 2-character country code.  See the file 'iso3166.tab'.
+# 2.  Latitude and longitude of the area's principal location
 #     in ISO 6709 sign-degrees-minutes-seconds format,
 #     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
 #     first latitude (+ is north), then longitude (+ is east).
-#     This location need not lie within the column-1 country.
 # 3.  Zone name used in value of TZ environment variable.
 #     Please see the 'Theory' file for how zone names are chosen.
+#     If multiple zones overlap a country, each has a row in the
+#     table, with column 1 being duplicated.
 # 4.  Comments; present if and only if the country has multiple rows.
 #
 # Columns are separated by a single tab.
 # The table is sorted first by country, then an order within the country that
 # (1) makes some geographical sense, and
-# (2) puts the most populous zones first, where that does not contradict (1).
+# (2) puts the most populous areas first, where that does not contradict (1).
 #
-# Lines beginning with `#' are comments.
+# Lines beginning with '#' are comments.
 #
 # This table is intended as an aid for users, to help them select time
 # zone data appropriate for their practical needs.  It is not intended
@@ -62,8 +65,7 @@
 AL	+4120+01950	Europe/Tirane
 AM	+4011+04430	Asia/Yerevan
 AO	-0848+01314	Africa/Luanda
-AQ	-7750+16636	Antarctica/McMurdo	McMurdo Station, Ross Island
-AQ	-9000+00000	Antarctica/South_Pole	Amundsen-Scott Station, South Pole
+AQ	-7750+16636	Antarctica/McMurdo	McMurdo, South Pole, Scott (New Zealand time)
 AQ	-6734-06808	Antarctica/Rothera	Rothera Station, Adelaide Island
 AQ	-6448-06406	Antarctica/Palmer	Palmer Station, Anvers Island
 AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
@@ -143,8 +145,7 @@
 CA	+4606-06447	America/Moncton	Atlantic Time - New Brunswick
 CA	+5320-06025	America/Goose_Bay	Atlantic Time - Labrador - most locations
 CA	+5125-05707	America/Blanc-Sablon	Atlantic Standard Time - Quebec - Lower North Shore
-CA	+4531-07334	America/Montreal	Eastern Time - Quebec - most locations
-CA	+4339-07923	America/Toronto	Eastern Time - Ontario - most locations
+CA	+4339-07923	America/Toronto	Eastern Time - Ontario & Quebec - most locations
 CA	+4901-08816	America/Nipigon	Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
@@ -255,7 +256,7 @@
 IS	+6409-02151	Atlantic/Reykjavik
 IT	+4154+01229	Europe/Rome
 JE	+4912-00207	Europe/Jersey
-JM	+1800-07648	America/Jamaica
+JM	+175805-0764736	America/Jamaica
 JO	+3157+03556	Asia/Amman
 JP	+353916+1394441	Asia/Tokyo
 KE	-0117+03649	Africa/Nairobi
@@ -444,8 +445,7 @@
 US	+471551-1014640	America/North_Dakota/Beulah	Central Time - North Dakota - Mercer County
 US	+394421-1045903	America/Denver	Mountain Time
 US	+433649-1161209	America/Boise	Mountain Time - south Idaho & east Oregon
-US	+364708-1084111	America/Shiprock	Mountain Time - Navajo
-US	+332654-1120424	America/Phoenix	Mountain Standard Time - Arizona
+US	+332654-1120424	America/Phoenix	Mountain Standard Time - Arizona (except Navajo)
 US	+340308-1181434	America/Los_Angeles	Pacific Time
 US	+611305-1495401	America/Anchorage	Alaska Time
 US	+581807-1342511	America/Juneau	Alaska Time - Alaska panhandle
--- a/make/tools/manifest.mf	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/tools/manifest.mf	Wed Oct 30 18:38:20 2013 +0000
@@ -1,6 +1,6 @@
 Manifest-Version: 1.0
 Specification-Title: Java Platform API Specification
-Specification-Version: 1.7
+Specification-Version: 1.8
 Specification-Vendor: Oracle Corporation
 Implementation-Title: Java Runtime Environment
 Implementation-Version: @@RELEASE@@
--- a/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java	Wed Oct 30 18:38:20 2013 +0000
@@ -173,6 +173,12 @@
      */
     private HashMap<String, HashSet<String>> knownPrefixMap = new HashMap<>();
 
+    /**
+     * Special value for the HashSet to indicate that there are classes in
+     * the top-level package.
+     */
+    private static final String TOP_LEVEL = "TOP";
+
     /*
      * A class for mapping package prefixes to the number of
      * levels of package elements to include.
@@ -212,7 +218,7 @@
 
 
     /*
-     * We add maximum 5 second level entries to "sun", "java" and
+     * We add maximum 5 second level entries to "sun", "jdk", "java" and
      * "javax" entries. Tune this parameter to get a balance on the
      * cold start and footprint.
      */
@@ -223,6 +229,7 @@
     JarMetaIndex(String fileName) throws IOException {
         jar = new JarFile(fileName);
         knownPrefixMap.put("sun", new HashSet<String>());
+        knownPrefixMap.put("jdk", new HashSet<String>());
         knownPrefixMap.put("java", new HashSet<String>());
         knownPrefixMap.put("javax", new HashSet<String>());
     }
@@ -336,12 +343,12 @@
             return false;
         }
 
-        String secondPkgElement = name.substring(firstSlashIndex + 1,
-                                                 name.indexOf("/",
-                                                              firstSlashIndex + 1));
-
         /* Add the second level package name to the corresponding hashset. */
-        if (secondPkgElement != null) {
+        int secondSlashIndex = name.indexOf("/", firstSlashIndex+1);
+        if (secondSlashIndex == -1) {
+            pkgSet.add(TOP_LEVEL);
+        } else {
+            String secondPkgElement = name.substring(firstSlashIndex+1, secondSlashIndex);
             pkgSet.add(secondPkgElement);
         }
 
@@ -368,8 +375,9 @@
             if (setSize == 0) {
                 continue;
             }
-            else if (setSize > JarMetaIndex.MAX_PKGS_WITH_KNOWN_PREFIX) {
-                indexSet.add(key + "/");
+            if (setSize > JarMetaIndex.MAX_PKGS_WITH_KNOWN_PREFIX ||
+                pkgSetStartsWithKey.contains(TOP_LEVEL)) {
+                 indexSet.add(key + "/");
             } else {
                 /* If the set contains less than MAX_PKGS_WITH_KNOWN_PREFIX, add
                  * them to the indexSet of the MetaIndex object.
--- a/make/tools/src/build/tools/tzdb/TzdbZoneRulesCompiler.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/make/tools/src/build/tools/tzdb/TzdbZoneRulesCompiler.java	Wed Oct 30 18:38:20 2013 +0000
@@ -618,6 +618,11 @@
         // remove ROC, which is not supported in j.u.tz
         builtZones.remove("ROC");
         links.remove("ROC");
+        // remove EST, HST and MST. They are supported via
+        // the short-id mapping
+        builtZones.remove("EST");
+        builtZones.remove("HST");
+        builtZones.remove("MST");
     }
 
     /**
--- a/makefiles/BuildJdk.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/BuildJdk.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -47,13 +47,13 @@
 
 import: import-only
 import-only:
-#       Import (corba jaxp jaxws langtools hotspot)
+        # Import (corba jaxp jaxws langtools hotspot)
 	+$(MAKE) -f Import.gmk
 
 gensrc: import gensrc-only
 gensrc-only:
-	+$(MAKE) -f GenerateJavaSources.gmk
-#       Ok, now gensrc is fully populated.
+	+$(MAKE) -f GenerateSources.gmk
+        # Ok, now gensrc is fully populated.
 
 gendata: gensrc gendata-only
 gendata-only:
@@ -62,8 +62,8 @@
 classes: gendata classes-only
 classes-only:
 	+$(MAKE) -f CompileJavaClasses.gmk
-#       The classes are now built and
-#       any javah files have now been generated.
+        # The classes are now built and
+        # any javah files have now been generated.
 
 libs: classes libs-only
 libs-only:
@@ -71,23 +71,23 @@
 
 launchers: libs launchers-only
 launchers-only:
-#       Finally compile the launchers.
+        # Finally compile the launchers.
 	+$(MAKE) -f CompileLaunchers.gmk
 
 genclasses: launchers genclasses-only
 genclasses-only:
-#	Generate classes that have other sources. Needs
-#       to execute launchers.
+        # Generate classes that have other sources. Needs
+        # to execute launchers.
 	+$(MAKE) -f GenerateClasses.gmk
 
 jdk: genclasses
-#       Now we have a complete jdk, which you can run.
-#       It is not yet wrapped up as an installed image.
+        # Now we have a complete jdk, which you can run.
+        # It is not yet wrapped up as an installed image.
 
 demos:
-#       The demos are compiled against this jdk.
+        # The demos are compiled against this jdk.
 	+$(MAKE) -f CompileDemos.gmk
-#	Now copy the sample sources into the jdk.
+        # Now copy the sample sources into the jdk.
 	+$(MAKE) -f CopySamples.gmk
 
 # Create the final jdk and jre images, to be wrapped up
@@ -96,9 +96,9 @@
 images:
 	+$(MAKE) PROFILE="" -f CreateJars.gmk
 	+$(MAKE) PROFILE="" -f Images.gmk
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	+$(MAKE) -f Bundles.gmk
-endif
+        ifeq ($(OPENJDK_TARGET_OS), macosx)
+	  +$(MAKE) -f Bundles.gmk
+        endif
 
 overlay-images:
 	+$(MAKE) -f CompileLaunchers.gmk OVERLAY_IMAGES=true
@@ -114,8 +114,8 @@
 sign-jars:
 	+$(MAKE) -f SignJars.gmk
 
-BINARIES:=$(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
-INSTALLDIR:=openjdk-$(RELEASE)
+BINARIES := $(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
+INSTALLDIR := openjdk-$(RELEASE)
 
 # Install the jdk image, in a very crude way. Not taking into
 # account, how to install properly on macosx or windows etc.
@@ -126,8 +126,8 @@
 	$(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
 	$(CP) -rp $(JDK_IMAGE_DIR)/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
 	$(MKDIR) -p $(INSTALL_PREFIX)/bin
-	$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
-	$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
+	$(RM) $(addprefix $(INSTALL_PREFIX)/bin/, $(BINARIES))
+	$(foreach b, $(BINARIES), $(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
 
 # The all target builds the JDK, but not the images
 all: jdk
--- a/makefiles/Bundles.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/Bundles.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -31,108 +31,108 @@
 # Only macosx has bundles defined.
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-bundles: jre-bundle jdk-bundle
+  bundles: jre-bundle jdk-bundle
 
-# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
+  # JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
 
-MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
+  MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
 
-# All these OPENJDK checks are needed since there is no coherency between
-# these values in open and closed. Should probably be fixed.
-ifndef OPENJDK
+  # All these OPENJDK checks are needed since there is no coherency between
+  # these values in open and closed. Should probably be fixed.
+  ifndef OPENJDK
     BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
-else
+  else
     BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE)
-endif
-BUNDLE_ID_JRE := $(BUNDLE_ID).jre
-BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
+  endif
+  BUNDLE_ID_JRE := $(BUNDLE_ID).jre
+  BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
 
-BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
-BUNDLE_NAME_JRE := $(BUNDLE_NAME)
-BUNDLE_NAME_JDK := $(BUNDLE_NAME)
+  BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
+  BUNDLE_NAME_JRE := $(BUNDLE_NAME)
+  BUNDLE_NAME_JDK := $(BUNDLE_NAME)
 
-ifndef OPENJDK
+  ifndef OPENJDK
     BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
-else
+  else
     BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) ($(JDK_VERSION))
-endif
-BUNDLE_INFO_JRE := $(BUNDLE_INFO)
-BUNDLE_INFO_JDK := $(BUNDLE_INFO)
+  endif
+  BUNDLE_INFO_JRE := $(BUNDLE_INFO)
+  BUNDLE_INFO_JDK := $(BUNDLE_INFO)
 
-BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
-BUNDLE_VERSION := $(JDK_VERSION)
-ifeq ($(COMPANY_NAME),N/A)
+  BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
+  BUNDLE_VERSION := $(JDK_VERSION)
+  ifeq ($(COMPANY_NAME), N/A)
     BUNDLE_VENDOR := UNDEFINED
-else
+  else
     BUNDLE_VENDOR := $(COMPANY_NAME)
-endif
+  endif
 
 
-JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
-JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
+  JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
+  JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
 
-JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
-JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
+  JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
+  JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
 
-# The old builds implementation of this did not preserve symlinks so
-# make sure they are followed and the contents copied instead.
-# To fix this, remove -L
-# Copy empty directories (jre/lib/applet).
-$(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
+  # The old builds implementation of this did not preserve symlinks so
+  # make sure they are followed and the contents copied instead.
+  # To fix this, remove -L
+  # Copy empty directories (jre/lib/applet).
+  $(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -L '$<' '$@'; fi
 
-$(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
+  $(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -L '$<' '$@'; fi
 
-$(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
+  $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
 	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../Home/jre/lib/jli/libjli.dylib $@
 
-$(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
+  $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
 	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../Home/lib/jli/libjli.dylib $@
 
-$(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
+  $(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
 	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
-	$(SED)  -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
-		-e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
-		-e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
-		-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
-		-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
-		-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
-		< $(MACOSX_SRC)/bundle/JDK-Info.plist > $@
+	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
+	    -e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
+	    -e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
+	    -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
+	    -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
+	    -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
+	    < $(MACOSX_SRC)/bundle/JDK-Info.plist > $@
 
-$(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
+  $(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
 	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
-	$(SED)  -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
-		-e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
-		-e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
-		-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
-		-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
-		-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
-		< $(MACOSX_SRC)/bundle/JRE-Info.plist > $@
+	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
+	    -e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
+	    -e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
+	    -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
+	    -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
+	    -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
+	    < $(MACOSX_SRC)/bundle/JRE-Info.plist > $@
 
-jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
-		$(JDK_BUNDLE_DIR)/Info.plist
+  jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
+      $(JDK_BUNDLE_DIR)/Info.plist
 	$(SETFILE) -a B $(dir $(JDK_BUNDLE_DIR))
 
-jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
-		$(JRE_BUNDLE_DIR)/Info.plist
+  jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
+      $(JRE_BUNDLE_DIR)/Info.plist
 	$(SETFILE) -a B $(dir $(JRE_BUNDLE_DIR))
 
 else # Not macosx
 
-bundles:
+  bundles:
 	$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
 
 endif # macosx
--- a/makefiles/CompileDemos.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/CompileDemos.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -35,10 +35,10 @@
 include Setup.gmk
 
 # Prepare the find cache. Only used if running on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src))
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
 
 # Append demo goals to this variable.
-BUILD_DEMOS=
+BUILD_DEMOS =
 
 # The demo structure and contents should really be cleaned up.
 # Now every other demo has its own quirks where to put the
@@ -47,13 +47,13 @@
 ##################################################################################################
 
 define SetupAppletDemo
-     $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1,\
-                SETUP:=GENERATE_USINGJDKBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/src/$3share/demo/applets/$1,\
-		BIN:=$(JDK_OUTPUTDIR)/demo/applets/$1,\
-		COPY:=.html .java .xyz .obj .au .gif,\
-		DISABLE_SJAVAC:=$2))
-     BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
+  $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
+      SETUP := GENERATE_USINGJDKBYTECODE, \
+      SRC := $(JDK_TOPDIR)/src/$3share/demo/applets/$1, \
+      BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \
+      COPY := .html .java .xyz .obj .au .gif, \
+      DISABLE_SJAVAC := $2))
+      BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
 endef
 
 $(eval $(call SetupAppletDemo,ArcTest))
@@ -71,91 +71,91 @@
 $(eval $(call SetupAppletDemo,SpreadSheet))
 
 ifndef OPENJDK
-    $(eval $(call SetupAppletDemo,Animator,,closed/))
-    $(eval $(call SetupAppletDemo,GraphLayout,true,closed/))
-    $(eval $(call SetupAppletDemo,JumpingBox,,closed/))
-    $(eval $(call SetupAppletDemo,TicTacToe,,closed/))
+  $(eval $(call SetupAppletDemo,Animator,,closed/))
+  $(eval $(call SetupAppletDemo,GraphLayout,true,closed/))
+  $(eval $(call SetupAppletDemo,JumpingBox,,closed/))
+  $(eval $(call SetupAppletDemo,TicTacToe,,closed/))
 endif
 
 ##################################################################################################
 
-PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj
+PATTERNS_TO_COPY = .html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj
 
 define SetupDemo
-    # Param 1 = Name of the demo
-    # Param 2 = Subdirectory of the demo below the demo directory.
-    # Param 3 = Additional javac flags.
-    # Param 4 = The main class for the jar.
-    # Param 5 = Additional source directory.
-    # Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed)
-    # Param 7 = List of files to copy
-    # Param 8 = Base name of jar file. Defaults to $1
-    # Param 9 = Exclude list
-    # Param 10 = Extra copy patterns
-    # Param 11 = Extra manifest attribute
-    # Param 12 = Suffix for compiler setup name
+  # Param 1 = Name of the demo
+  # Param 2 = Subdirectory of the demo below the demo directory.
+  # Param 3 = Additional javac flags.
+  # Param 4 = The main class for the jar.
+  # Param 5 = Additional source directory.
+  # Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed)
+  # Param 7 = List of files to copy
+  # Param 8 = Base name of jar file. Defaults to $1
+  # Param 9 = Exclude list
+  # Param 10 = Extra copy patterns
+  # Param 11 = Extra manifest attribute
+  # Param 12 = Suffix for compiler setup name
 
-    # In some demos the source is found in a subdir called src.
-    $1_MAIN_SRC:=$$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src)
-    ifeq ($$($1_MAIN_SRC),)
-        $1_MAIN_SRC:=$(JDK_TOPDIR)/src/$6share/demo/$2/$1
-    endif
+  # In some demos the source is found in a subdir called src.
+  $1_MAIN_SRC := $$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src)
+  ifeq ($$($1_MAIN_SRC), )
+    $1_MAIN_SRC := $(JDK_TOPDIR)/src/$6share/demo/$2/$1
+  endif
 
-    ifneq ($8,)
-        $1_JARFILE := $8.jar
-    else
-        $1_JARFILE := $1.jar
-    endif
+  ifneq ($8, )
+    $1_JARFILE := $8.jar
+  else
+    $1_JARFILE := $1.jar
+  endif
 
-    ifeq ($(findstring $1,Laffy SwingSet3),)
-        $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1,\
-                SETUP:=GENERATE_USINGJDKBYTECODE,\
-                ADD_JAVAC_FLAGS:=$3,\
-		SRC:=$$($1_MAIN_SRC) $5,\
-		BIN:=$(JDK_OUTPUTDIR)/democlasses/$2/$1,\
-		COPY:=$(PATTERNS_TO_COPY) $(10),\
-		JAR:=$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE),\
-		JARMAIN:=$4,\
-		MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf,\
-		EXTRA_MANIFEST_ATTR:=$(11),\
-		SRCZIP:=$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip,\
-		EXCLUDE_FILES:=$9,\
-		DISABLE_SJAVAC:=$(12)))
+  ifeq ($(findstring $1,Laffy SwingSet3), )
+    $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1, \
+        SETUP := GENERATE_USINGJDKBYTECODE, \
+        ADD_JAVAC_FLAGS := $3, \
+        SRC := $$($1_MAIN_SRC) $5, \
+        BIN := $(JDK_OUTPUTDIR)/democlasses/$2/$1, \
+        COPY := $(PATTERNS_TO_COPY) $(10), \
+        JAR := $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE), \
+        JARMAIN := $4, \
+        MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
+        EXTRA_MANIFEST_ATTR := $(11), \
+        SRCZIP := $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip, \
+        EXCLUDE_FILES := $9, \
+        DISABLE_SJAVAC := $(12)))
 
-        BUILD_DEMOS +=  $$(BUILD_DEMO_$1) \
-			$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \
-			$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip 
-    endif
+    BUILD_DEMOS += $$(BUILD_DEMO_$1) \
+        $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \
+        $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip
+  endif
 
-    # Copy files.
-    $1_COPY_TARGETS :=  $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%,\
-			$(JDK_OUTPUTDIR)/demo/$2/$1/%,\
-			$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/,$7)))
-    ifneq ($7,)
-        $(JDK_OUTPUTDIR)/demo/$2/$1/% : $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%
-		$$(call install-file)
-		$(CHMOD) -f ug+w $$@
+  # Copy files.
+  $1_COPY_TARGETS := $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%, \
+      $(JDK_OUTPUTDIR)/demo/$2/$1/%, \
+      $$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/, $7)))
+  ifneq ($7, )
+    $(JDK_OUTPUTDIR)/demo/$2/$1/%: $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%
+	$$(call install-file)
+	$(CHMOD) -f ug+w $$@
 
-        BUILD_DEMOS += $$($1_COPY_TARGETS)
-    endif
+    BUILD_DEMOS += $$($1_COPY_TARGETS)
+  endif
 
 endef
 
 $(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html))
-$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services : \
-			$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \
-			$(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
+$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \
+    $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \
+    $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
 	(cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \
-		$(MKDIR) -p _the.tmp/META-INF/services && \
-		$(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
-		cd _the.tmp && \
-		$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
-		cd META-INF/services && \
-		$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
+	$(MKDIR) -p _the.tmp/META-INF/services && \
+	$(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
+	cd _the.tmp && \
+	$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
+	cd META-INF/services && \
+	$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
 	$(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp
 	$(TOUCH) $@
 
-BUILD_DEMOS+=$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
+BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
 
 $(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html XYZApp.java))
 $(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html ThreeD.java))
@@ -175,193 +175,194 @@
 $(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java,,,,Main-Class: \n))
 
 ifndef OPENJDK
-    $(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*))
-    $(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*))
+  $(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*))
+  $(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*))
 
-    $(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
-    $(eval $(call SetupDemo,Stylepad,jfc,,Stylepad,\
-		$(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt))
-    $(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT,\
-		SplashScreen-Image: resources/images/splash.png,true))
+  $(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
+  $(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \
+      $(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt))
+  $(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \
+      SplashScreen-Image: resources/images/splash.png,true))
 
-    BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%,\
-			$(JDK_OUTPUTDIR)/demo/nbproject/%,\
-			$(call CacheFind,$(JDK_TOPDIR)/src/closed/share/demo/nbproject))
-    $(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
-		$(call install-file)
-		$(CHMOD) -f ug+w $@
+  BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%, \
+      $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+      $(call CacheFind, $(JDK_TOPDIR)/src/closed/share/demo/nbproject))
+
+  $(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
 endif
 
 ##################################################################################################
 
-# In the old makefiles, j2dbench was not compiled. 
-#$(eval $(call SetupDemo,J2DBench,java2d,/src,,j2dbench/J2DBench))
+# In the old makefiles, j2dbench was not compiled.
+#$(eval $(call SetupDemo,J2DBench, java2d, /src, , j2dbench/J2DBench))
 
 # JVMTI demos are a bit strange and share some files, but be careful the
-#    shared files are just the *.c and *.h files, not the README or sample
-#    makefiles. So we always exclude the README.txt and sample.makefile.txt
-#    from the extra sources.
+# shared files are just the *.c and *.h files, not the README or sample
+# makefiles. So we always exclude the README.txt and sample.makefile.txt
+# from the extra sources.
 define SetupJVMTIDemo
-     # Param 1 = Name of the demo
-     # Param 2 = add these directories to the includes, default is agent_util
-     # Param 3 = extra CFLAGS
-     # Param 4 = C or C++ (defaults to C)
-     # Param 5 = libs for posix
-     # Param 6 = libs for windows
-     # Param 7 = libs for solaris
-     BUILD_DEMO_JVMTI_$1_EXTRA_SRC:= \
-        $$(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/$1) \
-	$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2))
-     BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE:= \
-	$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2)/README.txt) \
-	$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2)/sample.makefile.txt)
-     BUILD_DEMO_JVMTI_$1_EXTRA_INC:=$$(addprefix -I,$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
-     BUILD_DEMO_JVMTI_$1_LANG:=C
-     ifneq (,$4)
-         BUILD_DEMO_JVMTI_$1_LANG:=$4
-     endif
-     ifeq (C++,$4)
-         $1_EXTRA_CXX:=$(LDFLAGS_CXX_JDK) $(LIBCXX)
-     endif
+  # Param 1 = Name of the demo
+  # Param 2 = add these directories to the includes, default is agent_util
+  # Param 3 = extra CFLAGS
+  # Param 4 = C or C++ (defaults to C)
+  # Param 5 = libs for posix
+  # Param 6 = libs for windows
+  # Param 7 = libs for solaris
+  BUILD_DEMO_JVMTI_$1_EXTRA_SRC := \
+      $$(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/$1) \
+      $$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2))
+  BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE := \
+      $$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)/README.txt) \
+      $$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)/sample.makefile.txt)
+  BUILD_DEMO_JVMTI_$1_EXTRA_INC := $$(addprefix -I, $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
+  BUILD_DEMO_JVMTI_$1_LANG := C
+  ifneq (, $4)
+    BUILD_DEMO_JVMTI_$1_LANG := $4
+  endif
+  ifeq (C++, $4)
+    $1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX)
+  endif
 
-     $1_CXXFLAGS:=$(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \
-		  $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \
-		  $(CXXFLAGS_DEBUG_SYMBOLS)
-     ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH),waiters-sparc)
-         $1_FILTER:=-xregs=no%appl
-         $1_CXXFLAGS:=$$(filter-out $$($1_FILTER),$$($1_CXXFLAGS))
-     endif
+  $1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \
+      $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \
+      $(CXXFLAGS_DEBUG_SYMBOLS)
+  ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH), waiters-sparc)
+    $1_FILTER := -xregs=no%appl
+    $1_CXXFLAGS := $$(filter-out $$($1_FILTER), $$($1_CXXFLAGS))
+  endif
 
-     # Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the
-     # eval call below, the comma gets expanded too early.
-     BUILD_DEMO_JVMTI_$1_CFLAGS:=$(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \
-		-I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
+  # Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the
+  # eval call below, the comma gets expanded too early.
+  BUILD_DEMO_JVMTI_$1_CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \
+      -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
 
-     # Remove the -incremental:no setting to get .ilk-files like in the old build.
-     $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1,\
-		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
-		LANG:=$$(BUILD_DEMO_JVMTI_$1_LANG),\
-		OPTIMIZATION:=LOW,\
-		CXXFLAGS:=$$($1_CXXFLAGS),\
-		LDFLAGS:=$(filter-out -incremental:no -opt:ref,$(LDFLAGS_JDKLIB)),\
-		LDFLAGS_macosx:=$(call SET_EXECUTABLE_ORIGIN),\
-		LDFLAGS_SUFFIX:=$$($1_EXTRA_CXX),\
-		LDFLAGS_SUFFIX_posix:=$5,\
-		LDFLAGS_SUFFIX_windows:=$6,\
-		LDFLAGS_SUFFIX_solaris:=$7 -lc,\
-		LDFLAGS_SUFFIX_linux:=$8,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$$(RC_FLAGS) \
-			  -D "JDK_FNAME=$1.dll" \
-			  -D "JDK_INTERNAL_NAME=$1" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/demoobjs/jvmti/$1,\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib,\
-		LIBRARY:=$1))
+  # Remove the -incremental:no setting to get .ilk-files like in the old build.
+  $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \
+      SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
+      LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
+      OPTIMIZATION := LOW, \
+      CXXFLAGS := $$($1_CXXFLAGS), \
+      LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \
+      LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \
+      LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \
+      LDFLAGS_SUFFIX_posix := $5, \
+      LDFLAGS_SUFFIX_windows := $6, \
+      LDFLAGS_SUFFIX_solaris := $7 -lc, \
+      LDFLAGS_SUFFIX_linux := $8, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $$(RC_FLAGS) \
+          -D "JDK_FNAME=$1.dll" \
+          -D "JDK_INTERNAL_NAME=$1" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib, \
+      LIBRARY := $1))
 
-    $$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1,\
-		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
-		EXCLUDE_FILES:=$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
-		ZIP:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip))
+  $$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \
+      SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
+      EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
+      ZIP := $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip))
 
-     $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt : $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt
-		$$(call install-file)
-		$(CHMOD) -f ug+w $$@
+  $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt: $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt
+	$$(call install-file)
+	$(CHMOD) -f ug+w $$@
 
-     ifneq (,$$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java))
-         $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA,\
-                SETUP:=GENERATE_USINGJDKBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1,\
-		BIN:=$(JDK_OUTPUTDIR)/democlasses/jvmti/$1,\
-		COPY:=$(PATTERNS_TO_COPY),\
-		JAR:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar,\
-		EXTRA_MANIFEST_ATTR:=Main-Class: \n,\
-		MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf))
+  ifneq (, $$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java))
+    $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \
+        SETUP := GENERATE_USINGJDKBYTECODE, \
+        SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1, \
+        BIN := $(JDK_OUTPUTDIR)/democlasses/jvmti/$1, \
+        COPY := $(PATTERNS_TO_COPY), \
+        JAR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar, \
+        EXTRA_MANIFEST_ATTR := Main-Class: \n, \
+        MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf))
 
-         BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar
-     endif
+    BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar
+  endif
 
-     BUILD_DEMOS += 	$$(BUILD_DEMO_JVMTI_$1) \
-			$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \
-			$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt
+  BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \
+      $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \
+      $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt
 
-     ifeq ($(OPENJDK_TARGET_OS),windows)
-         # These files normally end up in OBJECT_DIR but for demos they
-         # are supposed to be included in the distro.
-         $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
-		$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    # These files normally end up in OBJECT_DIR but for demos they
+    # are supposed to be included in the distro.
+    $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
+	$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@
 
-         $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
-		$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@
+    $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
+	$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@
 
-         BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \
-			$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp
-     endif
+    BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \
+        $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp
+  endif
 endef
 
-$(eval $(call SetupJVMTIDemo,compiledMethodLoad,	agent_util))
-$(eval $(call SetupJVMTIDemo,gctest,			agent_util))
-$(eval $(call SetupJVMTIDemo,heapTracker,		agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,heapViewer,		agent_util))
-$(eval $(call SetupJVMTIDemo,hprof,			java_crw_demo,\
-		-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt,C,\
-		-ldl,ws2_32.lib winmm.lib,-lsocket -lnsl,-lpthread))
+$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util))
+$(eval $(call SetupJVMTIDemo,gctest, agent_util))
+$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo))
+$(eval $(call SetupJVMTIDemo,heapViewer, agent_util))
+$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \
+    -I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, C, \
+    -ldl, ws2_32.lib winmm.lib, -lsocket -lnsl, -lpthread))
 
-$(eval $(call SetupJVMTIDemo,minst,			agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,mtrace,			agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,waiters,			agent_util,,C++))
-$(eval $(call SetupJVMTIDemo,versionCheck,		agent_util))
+$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo))
+$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo))
+$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++))
+$(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
 
 ##################################################################################################
 
 # The jpda demo (com/sun/tools/example) is oddly enough stored in src/share/classes.
 # At least, we do not need to compile the jpda demo, just jar/zip up the sources.
-JPDA_SOURCES:=$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/tools/example)
+JPDA_SOURCES := $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example)
 # The number of files are few enough so that we can use echo safely below to list them.
-JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
+JPDA_FILES := $(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
 
-$(JDK_OUTPUTDIR)/demo/jpda/src.zip : $(JPDA_SOURCES)
+$(JDK_OUTPUTDIR)/demo/jpda/src.zip: $(JPDA_SOURCES)
 	$(MKDIR) -p $(@D)
 	(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*")
 
-$(JDK_OUTPUTDIR)/demo/jpda/examples.jar : $(JPDA_SOURCES)
+$(JDK_OUTPUTDIR)/demo/jpda/examples.jar: $(JPDA_SOURCES)
 	$(MKDIR) -p $(@D)
 	$(RM) $(@D)/_the.sources
 	$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources)
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
-	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest
+	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+	    -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest
 	$(ECHO) "Main-Class: " >> $(@D)/_the.manifest
-	(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm  $@ $(@D)/_the.manifest @$(@D)/_the.sources)
+	(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm $@ $(@D)/_the.manifest @$(@D)/_the.sources)
 	(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README)
 
-$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README : $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README
+$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README: $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jpda/src.zip $(JDK_OUTPUTDIR)/demo/jpda/examples.jar \
-		$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README
+    $(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README
 
 ##################################################################################################
 
-$(JDK_OUTPUTDIR)/demo/management/index.html : $(JDK_TOPDIR)/src/share/demo/management/index.html
+$(JDK_OUTPUTDIR)/demo/management/index.html: $(JDK_TOPDIR)/src/share/demo/management/index.html
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
-$(JDK_OUTPUTDIR)/demo/jvmti/index.html : $(JDK_TOPDIR)/src/share/demo/jvmti/index.html
+$(JDK_OUTPUTDIR)/demo/jvmti/index.html: $(JDK_TOPDIR)/src/share/demo/jvmti/index.html
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \
-		$(JDK_OUTPUTDIR)/demo/jvmti/index.html
+    $(JDK_OUTPUTDIR)/demo/jvmti/index.html
 
 ##################################################################################################
 
 # The netbeans project files are copied into the demo directory.
-BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%,\
-		$(JDK_OUTPUTDIR)/demo/nbproject/%,\
-		$(call CacheFind,$(JDK_TOPDIR)/src/share/demo/nbproject))
+BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%, \
+    $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/demo/nbproject))
 
-$(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/share/demo/nbproject/%
+$(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/share/demo/nbproject/%
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
@@ -376,64 +377,64 @@
 
 ifeq ($(OPENJDK_TARGET_OS), solaris)
 
-$(JDK_OUTPUTDIR)/democlasses/jni/Poller/% : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
+  $(JDK_OUTPUTDIR)/democlasses/jni/Poller/%: $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
-$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/README.txt
+  $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt: $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/README.txt
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
-$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar : \
-  $(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c
+  $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar: \
+      $(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c
 
-$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR,\
-		SETUP:=GENERATE_USINGJDKBYTECODE, \
-		SRC:=$(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
-		BIN:=$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
-		HEADERS:=$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
-		JAR:=$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \
-		MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf, \
-		SRCZIP:=$(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \
-		COPY:=README.txt Poller.c, \
-		JARMAIN:=Client))
+  $(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \
+      SETUP := GENERATE_USINGJDKBYTECODE, \
+      SRC := $(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
+      BIN := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
+      HEADERS := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
+      JAR := $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \
+      MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
+      SRCZIP := $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \
+      COPY := README.txt Poller.c, \
+      JARMAIN := Client))
 
 
 
-BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \
-               $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt
+  BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \
+      $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER,\
-		SRC:=$(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
-		LANG:=C,\
-		OPTIMIZATION:=LOW,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
-                        -I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB), \
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/demoobjs/jni/Poller,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/demoobjs, \
-		LIBRARY:=Poller))
+  $(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
+      SRC := $(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
+          -I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
+      LDFLAGS := $(LDFLAGS_JDKLIB), \
+      LDFLAGS_SUFFIX_solaris := -lc, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jni/Poller, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/demoobjs, \
+      LIBRARY := Poller))
 
-#
-# We can only compile native code after jar has been build (since we depend on generated .h files)
-#
-$(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o : $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar
+  #
+  # We can only compile native code after jar has been build (since we depend on generated .h files)
+  #
+  $(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o: $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar
 
-$(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) : \
-  $(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
+  $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \
+      $(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
 	$(call install-file)
 
-BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
+  BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
 
 endif
 
 ##################################################################################################
 
 ifndef OPENJDK
-    DB_DEMO_ZIPFILE := $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)
+  DB_DEMO_ZIPFILE := $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)
 
-    $(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
+  $(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
 	$(MKDIR) -p $(@D)
 	$(RM) -r $(JDK_OUTPUTDIR)/demo/db $(JDK_OUTPUTDIR)/demo/demo
 	$(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -q -o $<
@@ -441,14 +442,14 @@
 	$(CD) $(JDK_OUTPUTDIR)/demo && $(RM) -r db-derby-*-bin
 	$(TOUCH) $@
 
-#    Copy this after the unzip above to avoid race with directory creation and mv command.
-     $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \
-		$(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \
-		| $(JDK_OUTPUTDIR)/demo/_the.db.unzipped
+  # Copy this after the unzip above to avoid race with directory creation and mv command.
+  $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \
+      $(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \
+      | $(JDK_OUTPUTDIR)/demo/_the.db.unzipped
 	$(MKDIR) -p $(@D)
 	$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@
 
-     BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html
+  BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html
 endif
 
 ##################################################################################################
--- a/makefiles/CompileJavaClasses.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/CompileJavaClasses.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -38,201 +38,201 @@
 
 ##########################################################################################
 
-EXCLUDES +=	com/sun/pept \
-		com/sun/tools/example/trace\
-		com/sun/tools/example/debug/bdi\
-		com/sun/tools/example/debug/event\
-		com/sun/tools/example/debug/gui
+EXCLUDES += com/sun/pept \
+    com/sun/tools/example/trace \
+    com/sun/tools/example/debug/bdi \
+    com/sun/tools/example/debug/event \
+    com/sun/tools/example/debug/gui
 
 ifdef OPENJDK
-    EXCLUDES+=	sun/dc \
-		com/sun/jmx/snmp \
-		sun/management/snmp \
-		com/sun/script
+  EXCLUDES += sun/dc \
+      com/sun/jmx/snmp \
+      sun/management/snmp \
+      com/sun/script
 endif
 
 ifndef OPENJDK
-   # There exists two versions of this file...
-   EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
+  # There exists two versions of this file...
+  EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
 
-   ifeq ($(OPENJDK_TARGET_OS),windows)
-      # This gets built on unix platforms implicitly in the old build even though
-      # it's excluded in the closed build.
-      EXCLUDES+=sun/java2d/pisces
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    # This gets built on unix platforms implicitly in the old build even though
+    # it's excluded in the closed build.
+    EXCLUDES += sun/java2d/pisces
 
-      # AccessBridge is compiled separately below.
-      EXFILES += AccessBridge.java \
-		 AccessBridgeLoader.java \
-		 com/sun/java/accessibility/util/java/awt/ChoiceTranslator.java
-      # This seems to never be built
-      EXCLUDES += com/sun/java/accessibility/extensions
-   endif
+    # AccessBridge is compiled separately below.
+    EXFILES += AccessBridge.java \
+        AccessBridgeLoader.java \
+        com/sun/java/accessibility/util/java/awt/ChoiceTranslator.java
+    # This seems to never be built
+    EXCLUDES += com/sun/java/accessibility/extensions
+  endif
 
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),solaris)
-   # Exclude Solaris nio and two security related files in src/share/classes
-   EXFILES += SolarisAclFileAttributeView.java \
-	SolarisFileStore.java \
-	SolarisFileSystem.java \
-	SolarisFileSystemProvider.java \
-	SolarisNativeDispatcher.java \
-	SolarisUserDefinedFileAttributeView.java \
-	SolarisWatchService.java \
-	SolarisAclFileAttributeView.java \
-	SolarisLoginModule.java \
-	SolarisSystem.java \
-        sun/nio/ch/DevPollArrayWrapper.java \
-        sun/nio/ch/DevPollSelectorImpl.java \
-        sun/nio/ch/DevPollSelectorProvider.java \
-	sun/nio/ch/EventPortSelectorImpl.java \
-	sun/nio/ch/EventPortSelectorProvider.java \
-	sun/nio/ch/EventPortWrapper.java \
-        sun/nio/ch/SolarisAsynchronousChannelProvider.java \
-        sun/nio/ch/SolarisEventPort.java \
-	sun/tools/attach/SolarisAttachProvider.java \
-	sun/tools/attach/SolarisVirtualMachine.java
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+  # Exclude Solaris nio and two security related files in src/share/classes
+  EXFILES += SolarisAclFileAttributeView.java \
+      SolarisFileStore.java \
+      SolarisFileSystem.java \
+      SolarisFileSystemProvider.java \
+      SolarisNativeDispatcher.java \
+      SolarisUserDefinedFileAttributeView.java \
+      SolarisWatchService.java \
+      SolarisAclFileAttributeView.java \
+      SolarisLoginModule.java \
+      SolarisSystem.java \
+      sun/nio/ch/DevPollArrayWrapper.java \
+      sun/nio/ch/DevPollSelectorImpl.java \
+      sun/nio/ch/DevPollSelectorProvider.java \
+      sun/nio/ch/EventPortSelectorImpl.java \
+      sun/nio/ch/EventPortSelectorProvider.java \
+      sun/nio/ch/EventPortWrapper.java \
+      sun/nio/ch/SolarisAsynchronousChannelProvider.java \
+      sun/nio/ch/SolarisEventPort.java \
+      sun/tools/attach/SolarisAttachProvider.java \
+      sun/tools/attach/SolarisVirtualMachine.java
 
-   EXCLUDES += com/oracle/security
+  EXCLUDES += com/oracle/security
 endif
 
 # In the old build, this isn't excluded on macosx, even though it probably
 # should be.
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-	EXFILES+=WrapperGenerator.java
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  EXFILES += WrapperGenerator.java
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),windows)
-    # Exclude Window security related files in src/share/classes
-    EXFILES+=NTLoginModule.java \
-             NTSystem.java
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  # Exclude Window security related files in src/share/classes
+  EXFILES += NTLoginModule.java \
+      NTSystem.java
 else
-    EXFILES+=UnixLoginModule.java \
-	     UnixSystem.java
+  EXFILES += UnixLoginModule.java \
+      UnixSystem.java
 endif
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    # Don't build GTK L&F on Windows
-    EXCLUDES+=com/sun/java/swing/plaf/gtk
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  # Don't build GTK L&F on Windows
+  EXCLUDES += com/sun/java/swing/plaf/gtk
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),linux)
-    EXFILES+=sun/tools/attach/LinuxAttachProvider.java \
-	     sun/tools/attach/LinuxVirtualMachine.java \
-             sun/nio/ch/EPoll.java \
-             sun/nio/ch/EPollArrayWrapper.java \
-             sun/nio/ch/EPollPort.java \
-             sun/nio/ch/EPollSelectorImpl.java \
-             sun/nio/ch/EPollSelectorProvider.java \
-             sun/nio/ch/LinuxAsynchronousChannelProvider.java \
-	     sun/nio/fs/LinuxDosFileAttributeView.java \
-	     sun/nio/fs/LinuxFileStore.java \
-	     sun/nio/fs/LinuxFileSystem.java \
-	     sun/nio/fs/LinuxFileSystemProvider.java \
-	     sun/nio/fs/MagicFileTypeDetector.java \
-	     sun/nio/fs/LinuxNativeDispatcher.java \
-	     sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
-	     sun/nio/fs/LinuxWatchService.java
+ifneq ($(OPENJDK_TARGET_OS), linux)
+  EXFILES += sun/tools/attach/LinuxAttachProvider.java \
+      sun/tools/attach/LinuxVirtualMachine.java \
+      sun/nio/ch/EPoll.java \
+      sun/nio/ch/EPollArrayWrapper.java \
+      sun/nio/ch/EPollPort.java \
+      sun/nio/ch/EPollSelectorImpl.java \
+      sun/nio/ch/EPollSelectorProvider.java \
+      sun/nio/ch/LinuxAsynchronousChannelProvider.java \
+      sun/nio/fs/LinuxDosFileAttributeView.java \
+      sun/nio/fs/LinuxFileStore.java \
+      sun/nio/fs/LinuxFileSystem.java \
+      sun/nio/fs/LinuxFileSystemProvider.java \
+      sun/nio/fs/MagicFileTypeDetector.java \
+      sun/nio/fs/LinuxNativeDispatcher.java \
+      sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
+      sun/nio/fs/LinuxWatchService.java
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-    EXFILES+=sun/nio/ch/BsdAsynchronousChannelProvider.java \
-             sun/nio/ch/KQueue.java \
-             sun/nio/ch/KQueuePort.java \
-             sun/nio/fs/BsdFileStore.java \
-	     sun/nio/fs/BsdFileSystem.java \
-             sun/nio/fs/BsdFileSystemProvider.java \
-             sun/nio/fs/BsdNativeDispatcher.java \
-             sun/nio/fs/MacOSXFileSystemProvider.java \
-             sun/nio/fs/MacOSXFileSystem.java \
-             sun/nio/fs/MacOSXNativeDispatcher.java \
-             sun/tools/attach/BsdAttachProvider.java \
-             sun/tools/attach/BsdVirtualMachine.java
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  EXFILES += sun/nio/ch/BsdAsynchronousChannelProvider.java \
+      sun/nio/ch/KQueue.java \
+      sun/nio/ch/KQueuePort.java \
+      sun/nio/fs/BsdFileStore.java \
+      sun/nio/fs/BsdFileSystem.java \
+      sun/nio/fs/BsdFileSystemProvider.java \
+      sun/nio/fs/BsdNativeDispatcher.java \
+      sun/nio/fs/MacOSXFileSystemProvider.java \
+      sun/nio/fs/MacOSXFileSystem.java \
+      sun/nio/fs/MacOSXNativeDispatcher.java \
+      sun/tools/attach/BsdAttachProvider.java \
+      sun/tools/attach/BsdVirtualMachine.java
 endif
 
 # Exclude BreakIterator classes that are just used in compile process to generate
 # data files and shouldn't go in the product
-EXFILES+=sun/text/resources/BreakIteratorRules.java \
-	 sun/text/resources/BreakIteratorRules_th.java
+EXFILES += sun/text/resources/BreakIteratorRules.java \
+    sun/text/resources/BreakIteratorRules_th.java
 
 # TODO: Add BUILD_HEADLESS_ONLY to configure?
 ifdef BUILD_HEADLESS_ONLY
-    EXCLUDES+=sun/applet
+  EXCLUDES += sun/applet
 endif
 
 ifdef OPENJDK
-    EXCLUDES+=sun/java2d/cmm/kcms
+  EXCLUDES += sun/java2d/cmm/kcms
 endif
 
 # Used on windows and macosx
-ifeq (,$(filter $(OPENJDK_TARGET_OS), windows macosx))
-    EXFILES+=sun/awt/AWTCharset.java
+ifeq (, $(filter $(OPENJDK_TARGET_OS), windows macosx))
+  EXFILES += sun/awt/AWTCharset.java
 endif
 
 ifneq ($(OPENJDK_TARGET_OS), macosx)
-    EXFILES+=sun/awt/X11/ScreenFormat.java \
-             sun/awt/X11/XArc.java \
-             sun/awt/X11/XChar2b.java \
-             sun/awt/X11/XCharStruct.java \
-             sun/awt/X11/XClassHint.java \
-             sun/awt/X11/XComposeStatus.java \
-             sun/awt/X11/XExtCodes.java \
-             sun/awt/X11/XFontProp.java \
-             sun/awt/X11/XFontSetExtents.java \
-             sun/awt/X11/XFontStruct.java \
-             sun/awt/X11/XGCValues.java \
-             sun/awt/X11/XHostAddress.java \
-             sun/awt/X11/XIMCallback.java \
-             sun/awt/X11/XIMHotKeyTrigger.java \
-             sun/awt/X11/XIMHotKeyTriggers.java \
-             sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
-             sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
-             sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
-             sun/awt/X11/XIMStatusDrawCallbackStruct.java \
-             sun/awt/X11/XIMStringConversionCallbackStruct.java \
-             sun/awt/X11/XIMStringConversionText.java \
-             sun/awt/X11/XIMStyles.java \
-             sun/awt/X11/XIMText.java \
-             sun/awt/X11/XIMValuesList.java \
-             sun/awt/X11/XImage.java \
-             sun/awt/X11/XKeyboardControl.java \
-             sun/awt/X11/XKeyboardState.java \
-             sun/awt/X11/XOMCharSetList.java \
-             sun/awt/X11/XOMFontInfo.java \
-             sun/awt/X11/XOMOrientation.java \
-             sun/awt/X11/XPoint.java \
-             sun/awt/X11/XRectangle.java \
-             sun/awt/X11/XSegment.java \
-             sun/awt/X11/XStandardColormap.java \
-             sun/awt/X11/XTextItem.java \
-             sun/awt/X11/XTextItem16.java \
-             sun/awt/X11/XTextProperty.java \
-             sun/awt/X11/XTimeCoord.java \
-             sun/awt/X11/XWindowChanges.java \
-             sun/awt/X11/XdbeSwapInfo.java \
-             sun/awt/X11/XmbTextItem.java \
-             sun/awt/X11/XwcTextItem.java
+  EXFILES += sun/awt/X11/ScreenFormat.java \
+      sun/awt/X11/XArc.java \
+      sun/awt/X11/XChar2b.java \
+      sun/awt/X11/XCharStruct.java \
+      sun/awt/X11/XClassHint.java \
+      sun/awt/X11/XComposeStatus.java \
+      sun/awt/X11/XExtCodes.java \
+      sun/awt/X11/XFontProp.java \
+      sun/awt/X11/XFontSetExtents.java \
+      sun/awt/X11/XFontStruct.java \
+      sun/awt/X11/XGCValues.java \
+      sun/awt/X11/XHostAddress.java \
+      sun/awt/X11/XIMCallback.java \
+      sun/awt/X11/XIMHotKeyTrigger.java \
+      sun/awt/X11/XIMHotKeyTriggers.java \
+      sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
+      sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
+      sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
+      sun/awt/X11/XIMStatusDrawCallbackStruct.java \
+      sun/awt/X11/XIMStringConversionCallbackStruct.java \
+      sun/awt/X11/XIMStringConversionText.java \
+      sun/awt/X11/XIMStyles.java \
+      sun/awt/X11/XIMText.java \
+      sun/awt/X11/XIMValuesList.java \
+      sun/awt/X11/XImage.java \
+      sun/awt/X11/XKeyboardControl.java \
+      sun/awt/X11/XKeyboardState.java \
+      sun/awt/X11/XOMCharSetList.java \
+      sun/awt/X11/XOMFontInfo.java \
+      sun/awt/X11/XOMOrientation.java \
+      sun/awt/X11/XPoint.java \
+      sun/awt/X11/XRectangle.java \
+      sun/awt/X11/XSegment.java \
+      sun/awt/X11/XStandardColormap.java \
+      sun/awt/X11/XTextItem.java \
+      sun/awt/X11/XTextItem16.java \
+      sun/awt/X11/XTextProperty.java \
+      sun/awt/X11/XTimeCoord.java \
+      sun/awt/X11/XWindowChanges.java \
+      sun/awt/X11/XdbeSwapInfo.java \
+      sun/awt/X11/XmbTextItem.java \
+      sun/awt/X11/XwcTextItem.java
 endif
 
 # Exclude another implicitly not included file.
-EXFILES+=sun/util/locale/AsciiUtil.java
+EXFILES += sun/util/locale/AsciiUtil.java
 
-ifeq (,$(filter $(OPENJDK_TARGET_OS), solaris macosx))
-#
-# only solaris and macosx
-#
-    EXFILES+=sun/nio/fs/PollingWatchService.java
+ifeq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
+  #
+  # only solaris and macosx
+  #
+  EXFILES += sun/nio/fs/PollingWatchService.java
 endif
 
 # TODO: Fix when converting NIO
 # Exclude *-linux-arm.java and *-linux-ppc.java from closed.
-EXFILES+=-linux-arm.java \
-	 -linux-ppc.java
+EXFILES += -linux-arm.java \
+    -linux-ppc.java
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
-    EXFILES+=sun/nio/ch/AbstractPollSelectorImpl.java \
-        sun/nio/ch/PollSelectorProvider.java \
-	sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
+  EXFILES += sun/nio/ch/AbstractPollSelectorImpl.java \
+      sun/nio/ch/PollSelectorProvider.java \
+      sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
 endif
 
 # These files do not appear in the build result of the old build. This
@@ -242,43 +242,43 @@
 # be picked up by implicit compilation. On a rebuild, they are picked up
 # and compiled. Exclude them here to produce the same rt.jar as the old
 # build does when building just once.
-EXFILES+=javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
-	 javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
-	 javax/swing/plaf/nimbus/ScrollBarPainter.java \
-	 javax/swing/plaf/nimbus/SliderPainter.java \
-	 javax/swing/plaf/nimbus/SpinnerPainter.java \
-	 javax/swing/plaf/nimbus/SplitPanePainter.java \
-	 javax/swing/plaf/nimbus/TabbedPanePainter.java
+EXFILES += javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
+    javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
+    javax/swing/plaf/nimbus/ScrollBarPainter.java \
+    javax/swing/plaf/nimbus/SliderPainter.java \
+    javax/swing/plaf/nimbus/SpinnerPainter.java \
+    javax/swing/plaf/nimbus/SplitPanePainter.java \
+    javax/swing/plaf/nimbus/TabbedPanePainter.java
 
 # Acquire a list of files that should be copied straight over to the classes.
 include CopyIntoClasses.gmk
 # Now we have COPY_PATTERNS, COPY_FILES and COPY_EXTRA
 
 ifndef OPENJDK
-    CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes \
-		     $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes
+  CLOSED_SRC_DIRS := $(JDK_TOPDIR)/src/closed/share/classes \
+      $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes
 endif
 
 MACOSX_SRC_DIRS :=
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-     MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes
 
-     # this files are duplicated in MACOSX_SRC_DIRS
-     EXFILES+= $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \
-               $(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \
-               $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
+  # this files are duplicated in MACOSX_SRC_DIRS
+  EXFILES += $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \
+      $(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \
+      $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
 
-     # JObjC.jar contains 1.5 byte-code...so skip it here :-(
-     # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src
-     # EXCLUDES+= tests/java/com/apple/jobjc
+  # JObjC.jar contains 1.5 byte-code...so skip it here :-(
+  # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src
+  # EXCLUDES += tests/java/com/apple/jobjc
 
-     EXCLUDES+= com/apple/jobjc
+  EXCLUDES += com/apple/jobjc
 endif
 
 # The exception handling of swing beaninfo
@@ -291,23 +291,23 @@
 # JDK_FILTER at the make command line, only a subset of the JDK java files will
 # be recompiled. If multiple paths are separated by comma, convert that into a
 # space separated list.
-JDK_USER_DEFINED_FILTER:=$(strip $(subst $(COMMA),$(SPACE),$(JDK_FILTER)))
+JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
 
-$(eval $(call SetupJavaCompilation,BUILD_JDK,\
-                SETUP:=GENERATE_JDKBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/src/share/classes \
-		     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
-		     $(MACOSX_SRC_DIRS) \
-		     $(JDK_OUTPUTDIR)/gensrc \
-		     $(JDK_OUTPUTDIR)/gensrc_no_srczip \
-		     $(CLOSED_SRC_DIRS),\
-		INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
-		EXCLUDES:=$(EXCLUDES),\
-		EXCLUDE_FILES:=$(EXFILES),\
-		BIN:=$(JDK_OUTPUTDIR)/classes,\
-		COPY:=$(COPY_PATTERNS),\
-		COPY_FILES:=$(COPY_FILES),\
-		HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
+$(eval $(call SetupJavaCompilation,BUILD_JDK, \
+    SETUP := GENERATE_JDKBYTECODE, \
+    SRC := $(JDK_TOPDIR)/src/share/classes \
+         $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
+         $(MACOSX_SRC_DIRS) \
+         $(JDK_OUTPUTDIR)/gensrc \
+         $(JDK_OUTPUTDIR)/gensrc_no_srczip \
+         $(CLOSED_SRC_DIRS), \
+    INCLUDES := $(JDK_USER_DEFINED_FILTER), \
+    EXCLUDES := $(EXCLUDES), \
+    EXCLUDE_FILES := $(EXFILES), \
+    BIN := $(JDK_OUTPUTDIR)/classes, \
+    COPY := $(COPY_PATTERNS), \
+    COPY_FILES := $(COPY_FILES), \
+    HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers))
 
 ##########################################################################################
 
@@ -317,85 +317,85 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-#
-# JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag.
-#   so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-(
-#
-$(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE,\
-     JAVAC:=$(JAVAC),\
-     FLAGS:=-source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS),\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  #
+  # JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag.
+  # so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-(
+  #
+  $(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE, \
+      JAVAC := $(JAVAC), \
+      FLAGS := -source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS), \
+      SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+      SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
-$(eval $(call SetupJavaCompilation,BUILD_JOBJC,\
-		SETUP:=GENERATE_15BYTECODE,\
-		DISABLE_SJAVAC:=true,\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
-		     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
-		     $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
-		INCLUDES := com/apple/jobjc,\
-                EXCLUDES := tests/java/com/apple/jobjc,\
-		BIN:=$(JDK_OUTPUTDIR)/jobjc_classes,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/JObjC.jar, \
-		JARINDEX := true))
+  $(eval $(call SetupJavaCompilation,BUILD_JOBJC, \
+      SETUP := GENERATE_15BYTECODE, \
+      DISABLE_SJAVAC := true, \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
+          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
+          $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
+      INCLUDES := com/apple/jobjc, \
+      EXCLUDES := tests/java/com/apple/jobjc, \
+      BIN := $(JDK_OUTPUTDIR)/jobjc_classes, \
+      JAR := $(JDK_OUTPUTDIR)/lib/JObjC.jar, \
+      JARINDEX := true))
 
-$(BUILD_JOBJC) : $(BUILD_JDK)
+  $(BUILD_JOBJC): $(BUILD_JDK)
 
-$(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
-		     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
-		     $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
-		INCLUDES := com/apple/jobjc,\
-                EXCLUDES := tests/java/com/apple/jobjc,\
-		BIN:=$(JDK_OUTPUTDIR)/jobjc_classes_headers,\
-		HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers_jobjc))
+  $(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS, \
+      SETUP := GENERATE_JDKBYTECODE, \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
+          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
+          $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
+      INCLUDES := com/apple/jobjc, \
+      EXCLUDES := tests/java/com/apple/jobjc, \
+      BIN := $(JDK_OUTPUTDIR)/jobjc_classes_headers, \
+      HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_jobjc))
 
-$(BUILD_JOBJC_HEADERS) : $(BUILD_JDK)
+$(BUILD_JOBJC_HEADERS): $(BUILD_JDK)
 
 endif
 
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
-ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-    $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_32,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/32bit,\
-		BIN:=$(JDK_OUTPUTDIR)/classes_ab/32bit))
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+      $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_32, \
+          SETUP := GENERATE_JDKBYTECODE, \
+          JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
+          SRC := $(JDK_OUTPUTDIR)/gensrc_ab/32bit, \
+          BIN := $(JDK_OUTPUTDIR)/classes_ab/32bit))
 
-    $(BUILD_ACCESSBRIDGE_32): $(BUILD_JDK)
+      $(BUILD_ACCESSBRIDGE_32): $(BUILD_JDK)
 
-    $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_LEGACY,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/legacy,\
-		BIN:=$(JDK_OUTPUTDIR)/classes_ab/legacy))
+      $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_LEGACY, \
+          SETUP := GENERATE_JDKBYTECODE, \
+          JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
+          SRC := $(JDK_OUTPUTDIR)/gensrc_ab/legacy, \
+          BIN := $(JDK_OUTPUTDIR)/classes_ab/legacy))
 
-    $(BUILD_ACCESSBRIDGE_LEGACY): $(BUILD_JDK)
+      $(BUILD_ACCESSBRIDGE_LEGACY): $(BUILD_JDK)
 
-else
+    else
 
-    $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_64,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/64bit,\
-		BIN:=$(JDK_OUTPUTDIR)/classes_ab/64bit))
+      $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_64, \
+          SETUP := GENERATE_JDKBYTECODE, \
+          JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
+          SRC := $(JDK_OUTPUTDIR)/gensrc_ab/64bit, \
+          BIN := $(JDK_OUTPUTDIR)/classes_ab/64bit))
 
-    $(BUILD_ACCESSBRIDGE_64): $(BUILD_JDK)
+      $(BUILD_ACCESSBRIDGE_64): $(BUILD_JDK)
 
-endif
-endif
+    endif
+  endif
 endif
 
 ##########################################################################################
 
 all: $(BUILD_JDK) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \
-	$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
-	$(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \
-	$(BUILD_ACCESSBRIDGE_LEGACY)
+    $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
+    $(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \
+    $(BUILD_ACCESSBRIDGE_LEGACY)
 
 .PHONY: all
--- a/makefiles/CompileLaunchers.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/CompileLaunchers.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -33,27 +33,26 @@
 include Setup.gmk
 
 # Prepare the find cache. Only used on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src/share/bin))
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/bin))
 
 # Build tools
 include Tools.gmk
 
-BUILD_LAUNCHERS=
+BUILD_LAUNCHERS =
 
 # When building a legacy overlay image (on solaris 64 bit), the launchers
 # need to be built with a different rpath and a different output dir.
-ifeq ($(OVERLAY_IMAGES),true)
-    ORIGIN_ROOT:=/../..
-    OUTPUT_SUBDIR:=$(OPENJDK_TARGET_CPU_ISADIR)
+ifeq ($(OVERLAY_IMAGES), true)
+  ORIGIN_ROOT := /../..
+  OUTPUT_SUBDIR := $(OPENJDK_TARGET_CPU_ISADIR)
 else
-    ORIGIN_ROOT:=/..
+  ORIGIN_ROOT := /..
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN)
+  ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN)
 else
-    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) \
-                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
+  ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
 endif
 
 #
@@ -61,158 +60,157 @@
 # System.loadLibrary("jawt") first. This was the behaviour described in the
 # devloper documentation of JAWT and what worked with OpenJDK6.
 #
-ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),)
-    ORIGIN_ARG+=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) \
-                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR))
+ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
+  ORIGIN_ARG += $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR))
 endif
 
 define SetupLauncher
-    # TODO: Fix mapfile on solaris. Won't work with ld as linker.
-    # Parameter 1 is the name of the launcher (java,javac,jar...)
-    # Parameter 2 is extra CFLAGS
-    # Parameter 3 is extra LDFLAGS
-    # Parameter 4 is extra LDFLAGS_SUFFIX_posix
-    # Parameter 5 is extra LDFLAGS_SUFFIX_windows
-    # Parameter 6 is optional Windows JLI library (full path)
-    # Parameter 7 is optional Windows resource (RC) flags
-    # Parameter 8 is optional Windows version resource file (.rc)
-    # Parameter 9  is different output dir
-    # Parameter 10 if set, link statically with c runtime on windows.
-    # Parameter 11 if set, override plist file on macosx.
-
-    $1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/libjli/jli.lib
-    ifneq ($6,)
-        $1_WINDOWS_JLI_LIB:=$6
-    endif
-    $1_VERSION_INFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc
-    ifneq ($8,)
-        $1_VERSION_INFO_RESOURCE:=$8
-    endif
+  # TODO: Fix mapfile on solaris. Won't work with ld as linker.
+  # Parameter 1 is the name of the launcher (java, javac, jar...)
+  # Parameter 2 is extra CFLAGS
+  # Parameter 3 is extra LDFLAGS
+  # Parameter 4 is extra LDFLAGS_SUFFIX_posix
+  # Parameter 5 is extra LDFLAGS_SUFFIX_windows
+  # Parameter 6 is optional Windows JLI library (full path)
+  # Parameter 7 is optional Windows resource (RC) flags
+  # Parameter 8 is optional Windows version resource file (.rc)
+  # Parameter 9 is different output dir
+  # Parameter 10 if set, link statically with c runtime on windows.
+  # Parameter 11 if set, override plist file on macosx.
 
-    $1_LDFLAGS := $3
-    $1_LDFLAGS_SUFFIX :=
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-        $1_PLIST_FILE:=Info-cmdline.plist
-        ifneq ($(11),)
-            $1_PLIST_FILE:=$(11)
-            ifneq ($$(findstring privileged,$$($1_PLIST_FILE)),)
-                $1_CODESIGN:=true
-            endif
-        endif
-
-        $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-                      -framework Cocoa -framework Security -framework ApplicationServices \
-                      -sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE)
-        $1_LDFLAGS_SUFFIX += -pthread
-    endif
+  $1_WINDOWS_JLI_LIB := $(JDK_OUTPUTDIR)/objs/libjli/jli.lib
+  ifneq ($6, )
+    $1_WINDOWS_JLI_LIB := $6
+  endif
+  $1_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc
+  ifneq ($8, )
+    $1_VERSION_INFO_RESOURCE := $8
+  endif
 
-    ifeq ($(USE_EXTERNAL_LIBZ), true)
-        $1_LDFLAGS_SUFFIX += -lz
-    endif
-
-    $1_OUTPUT_DIR_ARG:=$9
-    ifeq (,$$($1_OUTPUT_DIR_ARG))
-        $1_OUTPUT_DIR_ARG:=$(JDK_OUTPUTDIR)/bin
-    endif
-
-    # TODO: maybe it's better to move this if-statement out of this function
-    ifeq ($1,java)
-        $1_OPTIMIZATION_ARG:=HIGH
-	$1_LDFLAGS_solaris:=-R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
-    else
-        $1_OPTIMIZATION_ARG:=LOW
-    endif
-
-    $1_CFLAGS:=$(CFLAGS_JDKEXE)
-    ifeq ($(10),true)
-        $1_CFLAGS:=$(filter-out -MD,$(CFLAGS_JDKEXE))
+  $1_LDFLAGS := $3
+  $1_LDFLAGS_SUFFIX :=
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    $1_PLIST_FILE := Info-cmdline.plist
+    ifneq ($(11), )
+      $1_PLIST_FILE := $(11)
+      ifneq ($$(findstring privileged, $$($1_PLIST_FILE)), )
+        $1_CODESIGN := true
+      endif
     endif
 
-    ifneq ($(wildcard $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)),)
-        $1_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
-    else
-        $1_MAPFILE:=
-    endif
+    $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
+        -framework Cocoa -framework Security -framework ApplicationServices \
+        -sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE)
+        $1_LDFLAGS_SUFFIX += -pthread
+  endif
+
+  ifeq ($(USE_EXTERNAL_LIBZ), true)
+    $1_LDFLAGS_SUFFIX += -lz
+  endif
+
+  $1_OUTPUT_DIR_ARG := $9
+  ifeq (, $$($1_OUTPUT_DIR_ARG))
+    $1_OUTPUT_DIR_ARG := $(JDK_OUTPUTDIR)/bin
+  endif
+
+  # TODO: maybe it's better to move this if-statement out of this function
+  ifeq ($1, java)
+    $1_OPTIMIZATION_ARG := HIGH
+    $1_LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
+  else
+  $1_OPTIMIZATION_ARG := LOW
+  endif
+
+  $1_CFLAGS := $(CFLAGS_JDKEXE)
+  ifeq ($(10), true)
+    $1_CFLAGS := $(filter-out -MD, $(CFLAGS_JDKEXE))
+  endif
+
+  ifneq ($(wildcard $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), )
+    $1_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
+  else
+    $1_MAPFILE :=
+  endif
 
-    $(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
-	SRC:=$(JDK_TOPDIR)/src/share/bin,\
-	INCLUDE_FILES:=main.c,\
-	LANG:=C,\
-	OPTIMIZATION:=$$($1_OPTIMIZATION_ARG), \
-	CFLAGS:=$$($1_CFLAGS) \
-		-I$(JDK_TOPDIR)/src/share/bin \
-		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \
-		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
-                -DFULL_VERSION='"$(FULL_VERSION)"' \
-                -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-                -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-		-DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \
-		-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
-		-DPROGNAME='"$1"' $(DPACKAGEPATH) \
-		$2,\
-	CFLAGS_linux:=-fPIC,\
-        CFLAGS_solaris:=-KPIC -DHAVE_GETHRTIME,\
-	LDFLAGS:=$(LDFLAGS_JDKEXE) \
-                 $(ORIGIN_ARG) \
-		 $$($1_LDFLAGS),\
-	LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_NAME,$1),\
-	LDFLAGS_linux:=-lpthread \
-                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
-	LDFLAGS_solaris:=$$($1_LDFLAGS_solaris) \
-                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
-	MAPFILE := $$($1_MAPFILE), \
-        LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX),\
-	LDFLAGS_SUFFIX_posix:=$4,\
-	LDFLAGS_SUFFIX_windows:=$$($1_WINDOWS_JLI_LIB) \
-			       $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5,\
-	LDFLAGS_SUFFIX_linux:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
-	LDFLAGS_SUFFIX_solaris:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
-	OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR),\
-	OUTPUT_DIR:=$$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR),\
-	PROGRAM:=$1,\
-	DEBUG_SYMBOLS:=true,\
-	VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\
-	RC_FLAGS:=$(RC_FLAGS)\
-		  -D "JDK_FNAME=$1$(EXE_SUFFIX)" \
-		  -D "JDK_INTERNAL_NAME=$1" \
-		  -D "JDK_FTYPE=0x1L" \
-		  $7,\
-	MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest,\
-	CODESIGN:=$$($1_CODESIGN))
+  $(call SetupNativeCompilation,BUILD_LAUNCHER_$1, \
+      SRC := $(JDK_TOPDIR)/src/share/bin, \
+      INCLUDE_FILES := main.c, \
+      LANG := C, \
+      OPTIMIZATION := $$($1_OPTIMIZATION_ARG), \
+      CFLAGS := $$($1_CFLAGS) \
+          -I$(JDK_TOPDIR)/src/share/bin \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
+          -DFULL_VERSION='"$(FULL_VERSION)"' \
+          -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
+          -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
+          -DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \
+          -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
+          -DPROGNAME='"$1"' $(DPACKAGEPATH) \
+          $2, \
+      CFLAGS_linux := -fPIC, \
+      CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
+      LDFLAGS := $(LDFLAGS_JDKEXE) \
+          $(ORIGIN_ARG) \
+          $$($1_LDFLAGS), \
+      LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \
+      LDFLAGS_linux := -lpthread \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+      LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+      MAPFILE := $$($1_MAPFILE), \
+      LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \
+      LDFLAGS_SUFFIX_posix := $4, \
+      LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
+          $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5, \
+      LDFLAGS_SUFFIX_linux := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
+      LDFLAGS_SUFFIX_solaris := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR), \
+      OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
+      PROGRAM := $1, \
+      DEBUG_SYMBOLS := true, \
+      VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=$1$(EXE_SUFFIX)" \
+          -D "JDK_INTERNAL_NAME=$1" \
+          -D "JDK_FTYPE=0x1L" \
+          $7, \
+      MANIFEST := $(JDK_TOPDIR)/src/windows/resource/java.manifest, \
+      CODESIGN := $$($1_CODESIGN))
 
-    BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
+  BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
 
-    ifeq ($(OPENJDK_TARGET_OS),macosx)
-        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjli_static.a
-    endif
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    $$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjli_static.a
+  endif
 
-    ifeq ($(OPENJDK_TARGET_OS),windows)
-        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
-				$$($1_WINDOWS_JLI_LIB)
-    endif
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    $$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
+        $$($1_WINDOWS_JLI_LIB)
+  endif
 endef
 
 ##########################################################################################
 
-XLIBS:=$(X_LIBS) -lX11
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-    DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"'
-    XLIBS:=
+XLIBS := $(X_LIBS) -lX11
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  DPACKAGEPATH := -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
+  XLIBS :=
 endif
 
 ifdef OPENJDK
-    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
+  JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
 else
-    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
+  JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
 endif
 
 # On windows, the debuginfo files get the same name as for java.dll. Build
 # into another dir and copy selectively so debuginfo for java.dll isn't
 # overwritten.
-$(eval $(call SetupLauncher,java,\
-    -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
-    $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
-    $(JDK_TOPDIR)/src/windows/resource/java.rc,$(JDK_OUTPUTDIR)/objs/java_objs,true))
+$(eval $(call SetupLauncher,java, \
+    -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
+    $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
+    $(JDK_TOPDIR)/src/windows/resource/java.rc, $(JDK_OUTPUTDIR)/objs/java_objs,true))
 
 $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
 	$(MKDIR) -p $(@D)
@@ -221,271 +219,271 @@
 
 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,javaw,\
-        -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
-        $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
-        $(JDK_TOPDIR)/src/windows/resource/java.rc,,true))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call SetupLauncher,javaw, \
+      -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
+      $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
+      $(JDK_TOPDIR)/src/windows/resource/java.rc,,true))
 endif
 
 
 ifndef BUILD_HEADLESS_ONLY
-$(eval $(call SetupLauncher,appletviewer,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',,\
-    $(XLIBS)))
+  $(eval $(call SetupLauncher,appletviewer, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',, \
+      $(XLIBS)))
 endif
 
-$(eval $(call SetupLauncher,extcheck,\
+$(eval $(call SetupLauncher,extcheck, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,idlj,\
+$(eval $(call SetupLauncher,idlj, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jar,\
+$(eval $(call SetupLauncher,jar, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jarsigner,\
+$(eval $(call SetupLauncher,jarsigner, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,javac,\
+$(eval $(call SetupLauncher,javac, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
 
-ifeq ($(ENABLE_SJAVAC),yes)
-$(eval $(call SetupLauncher,sjavac,\
-    -DEXPAND_CLASSPATH_WILDCARDS \
-    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
+ifeq ($(ENABLE_SJAVAC), yes)
+  $(eval $(call SetupLauncher,sjavac, \
+      -DEXPAND_CLASSPATH_WILDCARDS \
+      -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
 endif
 
-$(eval $(call SetupLauncher,javadoc,\
+$(eval $(call SetupLauncher,javadoc, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,javah,\
+$(eval $(call SetupLauncher,javah, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,javap,\
+$(eval $(call SetupLauncher,javap, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jdeps,\
+$(eval $(call SetupLauncher,jdeps, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }'))
 
-BUILD_LAUNCHER_jconsole_CFLAGS_windows:=-DJAVAW
-BUILD_LAUNCHER_jconsole_LDFLAGS_windows:=user32.lib
+BUILD_LAUNCHER_jconsole_CFLAGS_windows := -DJAVAW
+BUILD_LAUNCHER_jconsole_LDFLAGS_windows := user32.lib
 
-$(eval $(call SetupLauncher,jconsole,\
+$(eval $(call SetupLauncher,jconsole, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
 
-$(eval $(call SetupLauncher,jdb,\
+$(eval $(call SetupLauncher,jdb, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
 
-$(eval $(call SetupLauncher,jhat,\
+$(eval $(call SetupLauncher,jhat, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jinfo,\
+$(eval $(call SetupLauncher,jinfo, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jinfo.JInfo"$(COMMA) }' \
+        "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+        "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+        "sun.tools.jinfo.JInfo"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
     ,,,,,,,,,Info-privileged.plist))
 
-$(eval $(call SetupLauncher,jmap,\
+$(eval $(call SetupLauncher,jmap, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jmap.JMap"$(COMMA) }' \
+        "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+        "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+        "sun.tools.jmap.JMap"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
     ,,,,,,,,,Info-privileged.plist))
 
-$(eval $(call SetupLauncher,jps,\
+$(eval $(call SetupLauncher,jps, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jrunscript,\
+$(eval $(call SetupLauncher,jrunscript, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jjs,\
-    -DJAVA_ARGS='{  "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
+$(eval $(call SetupLauncher,jjs, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jsadebugd,\
+$(eval $(call SetupLauncher,jsadebugd, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
     ,,,,,,,,,Info-privileged.plist))
 
-$(eval $(call SetupLauncher,jstack,\
+$(eval $(call SetupLauncher,jstack, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jstack.JStack"$(COMMA) }' \
+        "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+        "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+        "sun.tools.jstack.JStack"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
     ,,,,,,,,,Info-privileged.plist))
 
-$(eval $(call SetupLauncher,jstat,\
+$(eval $(call SetupLauncher,jstat, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jstatd,\
+$(eval $(call SetupLauncher,jstatd, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,keytool,\
+$(eval $(call SetupLauncher,keytool, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,native2ascii,\
+$(eval $(call SetupLauncher,native2ascii, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
 
 ifndef BUILD_HEADLESS_ONLY
-$(eval $(call SetupLauncher,policytool,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',,\
-    $(XLIBS)))
+  $(eval $(call SetupLauncher,policytool, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',, \
+      $(XLIBS)))
 endif
 
-$(eval $(call SetupLauncher,rmic,\
+$(eval $(call SetupLauncher,rmic, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,schemagen,\
+$(eval $(call SetupLauncher,schemagen, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,serialver,\
+$(eval $(call SetupLauncher,serialver, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,xjc,\
+$(eval $(call SetupLauncher,xjc, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,wsgen,\
+$(eval $(call SetupLauncher,wsgen, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,wsimport,\
+$(eval $(call SetupLauncher,wsimport, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,orbd,\
-    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
-			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
-			"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
+$(eval $(call SetupLauncher,orbd, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
+        "-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
+        "-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
+        "-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
+        "com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,servertool,\
+$(eval $(call SetupLauncher,servertool, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,tnameserv,\
-    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
-			"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
-			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
-			"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
+$(eval $(call SetupLauncher,tnameserv, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
+        "-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
+        "-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
+        "-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
+        "com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,pack200,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }'))
+$(eval $(call SetupLauncher,pack200, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }'))
 
-$(eval $(call SetupLauncher,rmid,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
+$(eval $(call SetupLauncher,rmid, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,rmiregistry,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
+$(eval $(call SetupLauncher,rmiregistry, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jcmd,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
+$(eval $(call SetupLauncher,jcmd, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,kinit,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call SetupLauncher,kinit, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
 
-    $(eval $(call SetupLauncher,klist,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
+  $(eval $(call SetupLauncher,klist, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
 
-    $(eval $(call SetupLauncher,ktab,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
+  $(eval $(call SetupLauncher,ktab, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
 endif
 
 ##########################################################################################
 # The order of the object files on the link command line affects the size of the resulting
 # binary (at least on linux) which causes the size to differ between old and new build.
 ifeq ($(USE_EXTERNAL_LIBZ), true)
-UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
-UNPACKEXE_ZIPOBJS := -lz
+  UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
+  UNPACKEXE_ZIPOBJS := -lz
 else
-UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-UNPACKEXE_ZIPOBJS := 	$(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
-		     	$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
+  UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+  UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
 
 endif
 
 ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
-    UNPACKEXE_CFLAGS += -xregs=no%appl
-    UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s
+  UNPACKEXE_CFLAGS += -xregs=no%appl
+  UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s
 endif
 
-UNPACKEXE_LANG:=C
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-    UNPACKEXE_LANG:=C++
+UNPACKEXE_LANG := C
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  UNPACKEXE_LANG := C++
 endif
 # On windows, unpack200 is linked completely differently to all other
 # executables, using the compiler with the compiler arguments.
 # It's also linked incrementally, producing a .ilk file that needs to
 # be kept away.
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    BUILD_UNPACKEXE_LDEXE:=$(CC)
-    EXE_OUT_OPTION_save:=$(EXE_OUT_OPTION)
-    EXE_OUT_OPTION:=-Fe
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  BUILD_UNPACKEXE_LDEXE := $(CC)
+  EXE_OUT_OPTION_save := $(EXE_OUT_OPTION)
+  EXE_OUT_OPTION := -Fe
 endif
-$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
-		EXCLUDE_FILES:=jni.cpp,\
-		LANG:=$(UNPACKEXE_LANG),\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE)\
-                        -DFULL, \
-		CFLAGS_release:=-DPRODUCT,\
-		CFLAGS_linux:=-fPIC,\
-		CFLAGS_solaris:=-KPIC, \
-		CFLAGS_macosx:=-fPIC, \
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200,\
-		LDFLAGS:=$(UNPACKEXE_ZIPOBJS),\
-		LDFLAGS_windows:=$(CXXFLAGS_JDKEXE),\
-		LDFLAGS_posix:=$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
-			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_linux:=-lc,\
-		LDFLAGS_solaris:=$(UNPACKEXE_LDFLAGS_solaris) -lc,\
-		LDFLAGS_SUFFIX:=$(LIBCXX),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\
-		PROGRAM:=unpack200,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=unpack200.exe" \
-			  -D "JDK_INTERNAL_NAME=unpack200" \
-			  -D "JDK_FTYPE=0x1L",\
-	        DEBUG_SYMBOLS:=true,\
-		MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
+$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
+    SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
+    EXCLUDE_FILES := jni.cpp, \
+    LANG := $(UNPACKEXE_LANG), \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) \
+        -DFULL, \
+    CFLAGS_release := -DPRODUCT, \
+    CFLAGS_linux := -fPIC, \
+    CFLAGS_solaris := -KPIC, \
+    CFLAGS_macosx := -fPIC, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200, \
+    LDFLAGS := $(UNPACKEXE_ZIPOBJS), \
+    LDFLAGS_windows := $(CXXFLAGS_JDKEXE), \
+    LDFLAGS_posix := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
+        $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_linux := -lc, \
+    LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
+    LDFLAGS_SUFFIX := $(LIBCXX), \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
+    OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
+    PROGRAM := unpack200, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=unpack200.exe" \
+        -D "JDK_INTERNAL_NAME=unpack200" \
+        -D "JDK_FTYPE=0x1L", \
+    DEBUG_SYMBOLS := true, \
+    MANIFEST := $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    EXE_OUT_OPTION:=$(EXE_OUT_OPTION_save)
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  EXE_OUT_OPTION := $(EXE_OUT_OPTION_save)
 endif
 
 ifneq ($(USE_EXTERNAL_LIBZ), true)
 
-$(BUILD_UNPACKEXE) : $(UNPACKEXE_ZIPOBJS)
+  $(BUILD_UNPACKEXE): $(UNPACKEXE_ZIPOBJS)
 
 endif
 
@@ -515,13 +513,13 @@
 # jdk/make/java/Makefile
 #
 ifeq ($(OPENJDK_TARGET_OS), solaris)
-	ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-		BUILD_JEXEC := 1
-	endif
+  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+    BUILD_JEXEC := 1
+  endif
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), linux)
-	BUILD_JEXEC := 1
+  BUILD_JEXEC := 1
 endif # OPENJDK_TARGET_OS
 
 #
@@ -529,41 +527,41 @@
 #
 ifeq ($(BUILD_JEXEC), 1)
 
-	ifeq ($(OPENJDK_TARGET_OS),windows)
-	else ifeq ($(OPENJDK_TARGET_OS),macosx)
-		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
-	else
-		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
-	endif
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+  else ifeq ($(OPENJDK_TARGET_OS), macosx)
+    BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
+  else
+    BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
+  endif
 
-	ifeq ($(OPENJDK_TARGET_OS), linux)
-                BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
-		BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
-	endif
+  ifeq ($(OPENJDK_TARGET_OS), linux)
+    BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
+    BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
+  endif
 endif
 
 #
 # Note that the two Makefile's seems to contradict each other,
-#   and that src/macosx/bin/jexec.c seems unused
+# and that src/macosx/bin/jexec.c seems unused
 #
-ifneq ($(BUILD_JEXEC_SRC),)
-        $(eval $(call SetupNativeCompilation,BUILD_JEXEC,\
-		SRC:=$(BUILD_JEXEC_SRC),\
-		INCLUDE_FILES:=jexec.c,\
-		LANG:=C,\
-		OPTIMIZATION := LOW, \
-		CFLAGS:=$(CFLAGS_JDKEXE)\
-                        $(BUILD_JEXEC_INC), \
-		CFLAGS_linux:=-fPIC,\
-		CFLAGS_solaris:=-KPIC,\
-		LDFLAGS:=$(LDFLAGS_JDKEXE) \
-			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
-		OUTPUT_DIR:=$(BUILD_JEXEC_DST_DIR),\
-		DEBUG_SYMBOLS:=true,\
-		PROGRAM:=jexec))
+ifneq ($(BUILD_JEXEC_SRC), )
+  $(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
+      SRC := $(BUILD_JEXEC_SRC), \
+      INCLUDE_FILES := jexec.c, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKEXE) \
+          $(BUILD_JEXEC_INC), \
+      CFLAGS_linux := -fPIC, \
+      CFLAGS_solaris := -KPIC, \
+      LDFLAGS := $(LDFLAGS_JDKEXE) \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \
+      OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
+      DEBUG_SYMBOLS := true, \
+      PROGRAM := jexec))
 
-	BUILD_LAUNCHERS += $(BUILD_JEXEC)
+  BUILD_LAUNCHERS += $(BUILD_JEXEC)
 endif
 
 ##########################################################################################
@@ -571,14 +569,12 @@
 #
 # The java-rmi.cgi script in bin/ only gets delivered in certain situations
 #
-JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
+JAVA_RMI_CGI := $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
 ifeq ($(OPENJDK_TARGET_OS), linux)
   BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
 endif
 ifeq ($(OPENJDK_TARGET_OS), solaris)
-  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-    BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
-  endif
+  BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
 endif
 
 # TODO:
@@ -588,11 +584,11 @@
 # the final images bin dir. This weird behavior is mimicked here in the converted
 # makefiles for now. Should probably just be deleted.
 # http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,java-rmi,,\
-        $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(OPENJDK_TARGET_CPU))))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call SetupLauncher,java-rmi, , \
+      $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(OPENJDK_TARGET_CPU))))
 else
-    $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
+  $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
 	$(call install-file)
 	$(CHMOD) a+x $@
 endif
@@ -605,67 +601,67 @@
 LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
 LINK_JSPAWNHELPER_FLAGS :=
 
-ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris),)
-    BUILD_JSPAWNHELPER := 1
+ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris), )
+  BUILD_JSPAWNHELPER := 1
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-    BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
+  BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
 endif
 
 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
-    LINK_JSPAWNHELPER_FLAGS += -m64
+  LINK_JSPAWNHELPER_FLAGS += -m64
 endif
 
 ifeq ($(BUILD_JSPAWNHELPER), 1)
-    $(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER,\
-        SRC:=$(BUILD_JSPAWNHELPER_SRC),\
-        INCLUDE_FILES:=jspawnhelper.c,\
-        LANG:=C,\
-        OPTIMIZATION := LOW, \
-        CFLAGS:=$(CFLAGS_JDKEXE), \
-        LDFLAGS:=$(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
-        LDFLAGS_SUFFIX:= $(LINK_JSPAWNHELPER_OBJECTS), \
-        OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jspawnhelper,\
-        OUTPUT_DIR:=$(BUILD_JSPAWNHELPER_DST_DIR),\
-        PROGRAM:=jspawnhelper))
+  $(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
+      SRC := $(BUILD_JSPAWNHELPER_SRC), \
+      INCLUDE_FILES := jspawnhelper.c, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKEXE), \
+      LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
+      LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \
+      OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
+      PROGRAM := jspawnhelper))
 
-    $(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
+  $(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
 
-    BUILD_LAUNCHERS += $(BUILD_JSPAWNHELPER)
+  BUILD_LAUNCHERS += $(BUILD_JSPAWNHELPER)
 endif
 
 ##########################################################################################
 # jabswitch
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS),windows)
+  ifeq ($(OPENJDK_TARGET_OS), windows)
 
-    $(eval $(call SetupNativeCompilation,BUILD_JABSWITCH,\
-		SRC:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge,\
-		INCLUDE_FILES:=jabswitch.cpp,\
-		LANG:=C++,\
-		CFLAGS:=$(filter-out -Zc:wchar_t-,$(CFLAGS_JDKEXE)) -Zc:wchar_t \
-			-analyze- -Od -Gd -D_WINDOWS \
-			-D_UNICODE -DUNICODE -RTC1 -EHsc,\
-		LDFLAGS:=$(LDFLAGS_JDKEXE) \
-			 Advapi32.lib Version.lib User32.lib,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jabswitch,\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/bin,\
-		PROGRAM:=jabswitch,\
-		DEBUG_SYMBOLS:=true,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/AccessBridgeStatusWindow.rc,\
-		RC_FLAGS:=$(RC_FLAGS),\
-		MANIFEST:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/jabswitch.manifest))
+    $(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \
+        SRC := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge, \
+        INCLUDE_FILES := jabswitch.cpp, \
+        LANG := C++, \
+        CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
+            -analyze- -Od -Gd -D_WINDOWS \
+            -D_UNICODE -DUNICODE -RTC1 -EHsc, \
+        LDFLAGS := $(LDFLAGS_JDKEXE) \
+            Advapi32.lib Version.lib User32.lib, \
+        OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jabswitch, \
+        OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \
+        PROGRAM := jabswitch, \
+        DEBUG_SYMBOLS := true, \
+        VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/AccessBridgeStatusWindow.rc, \
+        RC_FLAGS := $(RC_FLAGS), \
+        MANIFEST := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/jabswitch.manifest))
 
     BUILD_LAUNCHERS += $(BUILD_JABSWITCH)
 
-endif
+  endif
 endif
 
 ##########################################################################################
 
-$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
+$(BUILD_LAUNCHERS): $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
 
 all: $(BUILD_LAUNCHERS)
 
--- a/makefiles/CompileNativeLibraries.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/CompileNativeLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -36,7 +36,7 @@
 include CopyFiles.gmk
 
 # Prepare the find cache. Only used if running on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src))
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
 
 # Build tools
 include Tools.gmk
@@ -46,3409 +46,46 @@
 CXXFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
 
 # Put the libraries here. Different locations for different target apis.
-ifeq ($(OPENJDK_TARGET_OS_API),posix)
-    INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+ifeq ($(OPENJDK_TARGET_OS_API), posix)
+  INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
 else
-    INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin
+  INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
 endif
 
-BUILD_LIBRARIES=
+BUILD_LIBRARIES =
 
 # Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
 # elegant solution to this.
-WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/libverify/verify.lib
 WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib
-WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
 
 # Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
 # not on other platforms.
 ifeq ($(OPENJDK_TARGET_OS), windows)
-    DEBUG_ALL_BINARIES := true
+  DEBUG_ALL_BINARIES := true
 endif
 
 # Build everything with debugging on OpenJDK
 ifdef OPENJDK
-    DEBUG_ALL_BINARIES := true
-endif
-
-#
-# TODO replace with X_FLAGS / X_LIBS
-#   and add them to configure
-#
-OPENWIN_LIB:=$(OPENWIN_HOME)/lib
-
-##########################################################################################
-
-BUILD_LIBFDLIBM_OPTIMIZATION:=HIGH
-
-ifneq ($(OPENJDK_TARGET_OS), solaris)
-      BUILD_LIBFDLIBM_OPTIMIZATION:=NONE
-endif
-
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM,\
-                STATIC_LIBRARY:=fdlibm,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src,\
-		LANG:=C,\
-		OPTIMIZATION:=$(BUILD_LIBFDLIBM_OPTIMIZATION), \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\
-		CFLAGS_windows_debug:=-DLOGGING,\
-		ARFLAGS:=$(ARFLAGS),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-else
-
-# On macosx the old build does partial (incremental) linking of fdlibm instead of
-# a plain static library.
-$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC,\
-                LIBRARY:=fdlibm,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\
-		LDFLAGS:=-nostdlib -r -arch x86_64,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
-$(BUILD_LIBFDLIBM) : $(BUILD_LIBFDLIBM_MAC)
-	$(call install-file)
-
-endif
-BUILD_LIBRARIES += $(BUILD_LIBFDLIBM)
-
-##########################################################################################
-
-BUILD_LIBVERIFY_SRC:=check_code.c check_format.c
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-	ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-		BUILD_LIBVERIFY_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU)
-	endif
-endif
-
-LIBVERIFY_OPTIMIZATION:=HIGH
-ifneq ($(findstring $(OPENJDK_TARGET_OS),solaris linux),)
-    ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-        LIBVERIFY_OPTIMIZATION:=LOW
-    endif
-endif
-
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY,\
-		LIBRARY:=verify, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/native/common,\
-		INCLUDE_FILES:=$(BUILD_LIBVERIFY_SRC),\
-		LANG:=C,\
-		OPTIMIZATION:=$(LIBVERIFY_OPTIMIZATION), \
-		CFLAGS:=$(CFLAGS_JDKLIB),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libverify/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_posix:=-ljvm -lc,\
-		LDFLAGS_SUFFIX_windows:=jvm.lib,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS) \
-			  -D "JDK_FNAME=verify.dll" \
-			  -D "JDK_INTERNAL_NAME=verify" \
-			  -D "JDK_FTYPE=0x2L",\
-		REORDER:=$(BUILD_LIBVERIFY_REORDER),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libverify,\
-		DEBUG_SYMBOLS:=true))
-
-BUILD_LIBRARIES += $(BUILD_LIBVERIFY)
-
-##########################################################################################
-
-LIBJAVA_SRC_DIRS:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/lang \
-		$(JDK_TOPDIR)/src/share/native/java/lang \
-		$(JDK_TOPDIR)/src/share/native/java/lang/ref \
-		$(JDK_TOPDIR)/src/share/native/java/lang/reflect \
-		$(JDK_TOPDIR)/src/share/native/java/io \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
-		$(JDK_TOPDIR)/src/share/native/java/nio \
-		$(JDK_TOPDIR)/src/share/native/java/security \
-		$(JDK_TOPDIR)/src/share/native/common \
-		$(JDK_TOPDIR)/src/share/native/sun/misc \
-		$(JDK_TOPDIR)/src/share/native/sun/reflect \
-		$(JDK_TOPDIR)/src/share/native/java/util \
-		$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
-
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-    LIBJAVA_SRC_DIRS+=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
-else
-    LIBJAVA_SRC_DIRS+=$(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
-endif
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    LIBJAVA_SRC_DIRS+=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/provider \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/io
-endif
-
-LIBJAVA_CFLAGS:=$(foreach dir,$(LIBJAVA_SRC_DIRS),-I$(dir)) \
-		  -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
-                  -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
-
-LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-                  -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-                  -DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
-                  -DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"'
-
-ifneq (,$(JDK_UPDATE_VERSION))
-	LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
-endif
-
-LIBJAVA_EXCLUDE_FILES:=check_code.c check_format.c jspawnhelper.c
-
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-	LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
-else
-	BUILD_LIBJAVA_java_props_md.c_CFLAGS:=-x objective-c
-        BUILD_LIBJAVA_java_props_macosx.c_CFLAGS:=-x objective-c
-endif
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-        LIBJAVA_EXCLUDE_FILES += \
-		UNIXProcess_md.c \
-		UnixFileSystem_md.c \
-		FileSystemPreferences.c
-else
-	LIBJAVA_EXCLUDE_FILES += \
-		ProcessImpl_md.c \
-		WinNTFileSystem_md.c \
-		dirent_md.c \
-		WindowsPreferences.c \
-		sun/security/provider/WinCAPISeedGenerator.c \
-		sun/io/Win32ErrorMode.c
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-    ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-        LIBJAVA_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
-    endif
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA,\
-		LIBRARY:=java,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBJAVA_SRC_DIRS),\
-		EXCLUDES:=fdlibm/src zip, \
-		EXCLUDE_FILES:=$(LIBJAVA_EXCLUDE_FILES), \
-		LANG:=C,\
-		OPTIMIZATION:=HIGH, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(LIBJAVA_CFLAGS),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjava/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_posix:=-ljvm -lverify, \
-		LDFLAGS_SUFFIX_solaris:=-lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc,\
-		LDFLAGS_SUFFIX_linux:=$(LIBDL) $(BUILD_LIBFDLIBM),\
-		LDFLAGS_SUFFIX_macosx:=-L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
-                                         -framework CoreFoundation \
-                                         -framework Foundation \
-                                         -framework Security -framework SystemConfiguration, \
-		LDFLAGS_SUFFIX_windows:=-export:winFileHandleOpen -export:handleLseek \
-					jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
-					shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
-					advapi32.lib,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=java.dll" \
-			  -D "JDK_INTERNAL_NAME=java" \
-			  -D "JDK_FTYPE=0x2L",\
-		REORDER:=$(LIBJAVA_REORDER), \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjava,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBJAVA)
-
-$(BUILD_LIBJAVA) : $(LIBJLI_BINARY)
-
-$(BUILD_LIBJAVA) : $(BUILD_LIBVERIFY)
-
-$(BUILD_LIBJAVA) : $(BUILD_LIBFDLIBM)
-
-##########################################################################################
-
-BUILD_LIBMLIB_SRC:=$(JDK_TOPDIR)/src/share/native/sun/awt/medialib
-BUILD_LIBMLIB_CFLAGS:=-D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
-			-I$(BUILD_LIBMLIB_SRC) \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/medialib
-
-BUILD_LIBMLIB_LDLIBS:=
-BUILD_LIBMLIB_IMAGE_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libmlib_image/mapfile-vers
-
-BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
-
-ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
-	BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
-endif
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
-	BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE,\
-		LIBRARY:=mlib_image,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(BUILD_LIBMLIB_SRC),\
-		EXCLUDE_FILES:=awt_ImagingLib.c mlib_c_ImageBlendTable.c,\
-		LANG:=C,\
-		OPTIMIZATION:=HIGHEST, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(BUILD_LIBMLIB_CFLAGS),\
-		MAPFILE:=$(BUILD_LIBMLIB_IMAGE_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(BUILD_LIBMLIB_LDLIBS) \
-				$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_solaris:=-lc, \
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=mlib_image.dll" \
-			  -D "JDK_INTERNAL_NAME=mlib_image" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmlib_image,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBMLIB_IMAGE) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH),solaris-sparc)
-
-BUILD_LIBMLIB_IMAGE_V_FILES:=\
-        mlib_v_ImageLookUp.c \
-        mlib_ImageCreate.c \
-        mlib_ImageAffine.c \
-        mlib_ImageConvMxN.c \
-        mlib_ImageConvKernelConvert.c \
-        mlib_sys.c \
-        mlib_ImageLookUp_64.c \
-        mlib_ImageLookUp_Bit.c \
-        mlib_ImageColorTrue2Index.c \
-        mlib_c_ImageThresh1_U8.c \
-        mlib_v_ImageLookUpS16S16Func.c \
-        mlib_v_ImageLookUpS16S32Func.c \
-        mlib_v_ImageLookUpS16U16Func.c \
-        mlib_v_ImageLookUpS16U8Func.c \
-        mlib_v_ImageLookUpS32S16Func.c \
-        mlib_v_ImageLookUpS32S32Func.c \
-        mlib_v_ImageLookUpS32U16Func.c \
-        mlib_v_ImageLookUpS32U8Func.c \
-        mlib_v_ImageLookUpSIS16S16Func.c \
-        mlib_v_ImageLookUpSIS16S32Func.c \
-        mlib_v_ImageLookUpSIS16U16Func.c \
-        mlib_v_ImageLookUpSIS16U8Func.c \
-        mlib_v_ImageLookUpSIS32S16Func.c \
-        mlib_v_ImageLookUpSIS32S32Func.c \
-        mlib_v_ImageLookUpSIS32U16Func.c \
-        mlib_v_ImageLookUpSIS32U8Func.c \
-        mlib_v_ImageLookUpSIU16S16Func.c \
-        mlib_v_ImageLookUpSIU16S32Func.c \
-        mlib_v_ImageLookUpSIU16U16Func.c \
-        mlib_v_ImageLookUpSIU16U8Func.c \
-        mlib_v_ImageLookUpSIU8S16Func.c \
-        mlib_v_ImageLookUpSIU8S32Func.c \
-        mlib_v_ImageLookUpSIU8U16Func.c \
-        mlib_v_ImageLookUpSIU8U8Func.c \
-        mlib_v_ImageLookUpU16S16Func.c \
-        mlib_v_ImageLookUpU16S32Func.c \
-        mlib_v_ImageLookUpU16U16Func.c \
-        mlib_v_ImageLookUpU16U8Func.c \
-        mlib_v_ImageLookUpU8S16Func.c \
-        mlib_v_ImageLookUpU8S32Func.c \
-        mlib_v_ImageLookUpU8U16Func.c \
-        mlib_v_ImageLookUpU8U8Func.c \
-        mlib_v_ImageAffineIndex_BC.c \
-        mlib_v_ImageAffine_BC.c \
-        mlib_v_ImageAffine_BC_S16.c \
-        mlib_v_ImageAffine_BC_U16.c \
-        mlib_v_ImageAffine_BL.c \
-        mlib_v_ImageAffine_BL_S16.c \
-        mlib_v_ImageAffine_BL_U16.c \
-        mlib_v_ImageAffine_NN.c \
-        mlib_v_ImageFilters.c \
-        mlib_ImageAffineEdge.c \
-        mlib_ImageAffine_BC_D64.c \
-        mlib_ImageAffine_BC_F32.c \
-        mlib_ImageAffine_BC_S32.c \
-        mlib_ImageAffine_BL_D64.c \
-        mlib_ImageAffine_BL_F32.c \
-        mlib_ImageAffine_BL_S32.c \
-        mlib_ImageAffine_NN.c \
-        mlib_ImageAffine_NN_Bit.c \
-        mlib_ImageFilters.c \
-        mlib_ImageScanPoly.c \
-        mlib_ImageConv_8nw.c \
-        mlib_ImageConv_8ext.c \
-        mlib_ImageConv_16nw.c \
-        mlib_ImageConv_16ext.c \
-        mlib_ImageConv_u16nw.c \
-        mlib_ImageConv_u16ext.c \
-        mlib_ImageConv_32nw.c \
-        mlib_ImageConv_F32nw.c \
-        mlib_ImageConvMxN_Fp.c \
-        mlib_ImageConvMxN_ext.c \
-        mlib_ImageConv_D64nw.c \
-        mlib_ImageClipping.c \
-        mlib_ImageConvCopyEdge_Bit.c \
-        mlib_ImageConvClearEdge_Bit.c \
-        mlib_ImageConv2x2_f.c \
-        mlib_ImageConvClearEdge_Fp.c \
-        mlib_v_ImageConvMxN_8.c \
-        mlib_v_ImageConvClearEdge.c \
-        mlib_v_ImageConvCopyEdge.c \
-        mlib_v_ImageConvMxN_8ext.c \
-        mlib_v_ImageConvVersion.c \
-        mlib_v_ImageConv_8nw.c \
-        mlib_ImageConvCopyEdge_Fp.c \
-        mlib_v_ImageChannelInsert_1.c \
-        mlib_v_ImageChannelExtract_43.c \
-        mlib_v_ImageChannelExtract_1.c \
-        mlib_ImageCopy_Bit.c \
-        mlib_v_ImageCopy_f.c \
-        mlib_ImageUtils.c \
-        mlib_ImageDivTables.c
-
-BUILD_LIBMLIB_V_CFLAGS := $(filter-out -DMLIB_NO_LIBSUNMATH,$(BUILD_LIBMLIB_CFLAGS))
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V,\
-		LIBRARY:=mlib_image_v, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
-		     $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib,\
-		LANG:=C,\
-		INCLUDE_FILES:=$(BUILD_LIBMLIB_IMAGE_V_FILES),\
-		OPTIMIZATION:=HIGHEST, \
-		CFLAGS:=-xarch=sparcvis \
-                      $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il\
-                      $(BUILD_LIBMLIB_V_CFLAGS) \
-                      $(CFLAGS_JDKLIB), \
-		MAPFILE:=$(BUILD_LIBMLIB_IMAGE_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-                         $(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmlib_image_v,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
-
-endif
-
-##########################################################################################
-
-LIBAWT_DIRS:=\
-	$(JDK_TOPDIR)/src/share/native/sun/awt \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
-	$(JDK_TOPDIR)/src/share/native/sun/java2d \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-	$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-	$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-	$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
-	$(JDK_TOPDIR)/src/share/native/sun/font
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    LIBAWT_DIRS+=\
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/d3d
-else
-    LIBAWT_DIRS+=\
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11
-endif
-
-LIBAWT_CFLAGS+=-D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
-	$(X_CFLAGS) \
-	$(foreach dir,$(LIBAWT_DIRS),-I$(dir))
-
-LIBAWT_FILES:=\
-	gifdecoder.c \
-	imageInitIDs.c \
-	img_globals.c \
-	SurfaceData.c \
-	Region.c \
-	BufImgSurfaceData.c \
-	Disposer.c \
-	Trace.c \
-	GraphicsPrimitiveMgr.c \
-	Blit.c \
-	BlitBg.c \
-	ScaledBlit.c \
-	FillRect.c \
-	FillSpans.c \
-	FillParallelogram.c \
-	DrawParallelogram.c \
-	DrawLine.c \
-	DrawRect.c \
-	DrawPolygons.c \
-	DrawPath.c \
-	FillPath.c \
-	ProcessPath.c \
-	MaskBlit.c \
-	MaskFill.c \
-	TransformHelper.c \
-	AlphaMath.c \
-	AlphaMacros.c \
-	AnyByte.c \
-	ByteBinary1Bit.c \
-	ByteBinary2Bit.c \
-	ByteBinary4Bit.c \
-	ByteIndexed.c \
-	ByteGray.c \
-	Index8Gray.c \
-	Index12Gray.c \
-	AnyShort.c \
-	Ushort555Rgb.c \
-	Ushort565Rgb.c \
-	Ushort4444Argb.c \
-	Ushort555Rgbx.c \
-	UshortGray.c \
-	UshortIndexed.c \
-	Any3Byte.c \
-	ThreeByteBgr.c \
-	AnyInt.c \
-	IntArgb.c \
-	IntArgbPre.c \
-	IntArgbBm.c \
-	IntRgb.c \
-	IntBgr.c \
-	IntRgbx.c \
-	Any4Byte.c \
-	FourByteAbgr.c \
-	FourByteAbgrPre.c \
-	BufferedMaskBlit.c \
-	BufferedRenderPipe.c \
-	ShapeSpanIterator.c \
-	SpanClipRenderer.c \
-	awt_ImageRep.c \
-	awt_ImagingLib.c \
-	awt_Mlib.c \
-	awt_parseImage.c \
-	DataBufferNative.c \
-	dither.c \
-	debug_assert.c \
-	debug_mem.c \
-	debug_trace.c \
-	debug_util.c
-
-ifneq (,$(filter $(OPENJDK_TARGET_OS), solaris linux))
-	LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
-endif
-
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-	LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
-	LIBAWT_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/apple/resources
-	LIBAWT_FILES += awt_LoadLibrary.c MacOSXResourceBundle.m
-	LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
-
-	LIBAWT_MacOSXResourceBundle.m_CFLAGS:=-O0
-endif
-
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
-        LIBAWT_CFLAGS += -DMLIB_ADD_SUFF
-        LIBAWT_CFLAGS += -xarch=sparcvis
-	LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il
-        LIBAWT_CFLAGS += \
-            -I$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
-            -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/medialib \
-            -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
-
-	LIBAWT_DIRS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
-                       $(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
-
-	LIBAWT_FILES += \
-                vis_FuncArray.c           \
-                java2d_Mlib.c             \
-                mlib_ImageCreate.c        \
-                mlib_ImageZoom_NN.c       \
-                mlib_ImageCopy_Bit.c      \
-                mlib_sys.c                \
-                mlib_v_ImageClear.c       \
-                mlib_v_ImageClear_f.c     \
-                mlib_v_ImageConstXor.c    \
-                mlib_v_ImageCopy.c        \
-                mlib_v_ImageCopy_f.c      \
-                mlib_v_ImageXor.c         \
-                mlib_v_ImageZoom_NN_f.c   \
-                vis_Interp.c              \
-                vis_AlphaMacros.c         \
-                vis_AlphaMaskBlit.c       \
-                vis_AlphaMaskFill.c       \
-                vis_ByteGray.c            \
-                vis_ByteGray_FromRgb.c    \
-                vis_ByteGray_Mask.c       \
-                vis_ByteIndexed.c         \
-                vis_DrawLine.c            \
-                vis_FourByteAbgr.c        \
-                vis_IntArgb.c             \
-                vis_IntArgbPre.c          \
-                vis_IntArgbPre_Mask.c     \
-                vis_IntBgr.c              \
-                vis_IntRgb.c              \
-                vis_IntRgbx.c             \
-                vis_SrcMaskFill.c         \
-                vis_SrcOverMaskBlit.c     \
-                vis_SrcOverMaskFill.c     \
-                vis_FourByteAbgrPre.c     \
-                vis_GlyphList.c           \
-                vis_GlyphListXor.c        \
-                vis_IntArgbBm.c           \
-                vis_ThreeByteBgr.c        \
-                vis_UshortGray.c          \
-                vis_UshortGray_FromRgb.c  \
-                vis_XorBlit.c             \
-                mlib_v_ImageCopy_blk.s
-
-	ifeq ($(OPENJDK_TARGET_CPU),sparcv9)
-		LIBAWT_ASFLAGS=-P -xarch=v9a
-	else
-		LIBAWT_ASFLAGS=-P -xarch=v8plusa
-	endif
-else
-	LIBAWT_FILES += MapAccelFunc.c
-endif
-
-ifneq ($(OPENJDK_TARGET_OS),solaris)
-	LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
-endif
-
-LIBAWT_LANG:=C
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-	LIBAWT_FILES += AccelGlyphCache.c \
-			ShaderList.c \
-			CmdIDList.cpp \
-			Hashtable.cpp \
-			GDIHashtable.cpp \
-			Devices.cpp \
-			ObjectList.cpp \
-			GDIBlitLoops.cpp \
-			GDIRenderer.cpp \
-			GDIWindowSurfaceData.cpp \
-			WindowsFlags.cpp \
-			WPrinterJob.cpp \
-			awt_%.cpp \
-			D3DBlitLoops.cpp \
-			D3DBufImgOps.cpp \
-			D3DContext.cpp \
-			D3DGlyphCache.cpp \
-			D3DGraphicsDevice.cpp \
-			D3DMaskBlit.cpp \
-			D3DMaskCache.cpp \
-			D3DMaskFill.cpp \
-			D3DPipelineManager.cpp \
-			D3DPaints.cpp \
-			D3DRenderer.cpp \
-			D3DRenderQueue.cpp \
-			D3DResourceManager.cpp \
-			D3DSurfaceData.cpp \
-			D3DTextRenderer.cpp \
-			D3DVertexCacher.cpp \
-			ShellFolder2.cpp \
-			ThemeReader.cpp \
-			ComCtl32Util.cpp \
-			DllUtil.cpp \
-			initIDs.cpp \
-			MouseInfo.cpp \
-			rect.c \
-			OGLBlitLoops.c \
-			OGLBufImgOps.c \
-		        OGLContext.c \
-		        OGLFuncs.c \
-		        OGLMaskBlit.c \
-		        OGLMaskFill.c \
-		        OGLPaints.c \
-		        OGLRenderQueue.c \
-		        OGLRenderer.c \
-		        OGLSurfaceData.c \
-		        OGLTextRenderer.c \
-		        OGLVertexCache.c \
-		        WGLGraphicsConfig.c \
-		        WGLSurfaceData.c
-	LIBAWT_LANG:=C++
-	LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
-	ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
-		LIBAWT_CFLAGS += -DMLIB_OS64BIT
-	endif
-
-	ifdef OPENJDK
-		LIBAWT_RC_FLAGS:=-i "$(JDK_TOPDIR)/src/windows/resource/icons"
-	else
-		LIBAWT_RC_FLAGS:=-i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
-	endif
-	LIBAWT_VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/native/sun/windows/awt.rc
-endif
-
-ifeq ($(MILESTONE), internal)
-	LIBAWT_CFLAGS += -DINTERNAL_BUILD
-endif
-
-LIBAWT_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
-ifeq ($(OPENJDK_TARGET_OS),linux)
-	LIBAWT_MAPFILE:=
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBAWT,\
-		LIBRARY:=awt,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBAWT_DIRS),\
-		INCLUDE_FILES:=$(LIBAWT_FILES),\
-		LANG:=$(LIBAWT_LANG),\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS),\
-		ASFLAGS:=$(LIBAWT_ASFLAGS),\
-		MAPFILE:=$(LIBAWT_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_solaris:=-R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR),\
-		LDFLAGS_SUFFIX_linux:=-ljvm $(LIBM) $(LIBDL) -ljava,\
-		LDFLAGS_SUFFIX_solaris:=-ljvm $(LIBM) $(LIBDL) -ljava -lc,\
-		LDFLAGS_SUFFIX_macosx:=-lmlib_image -ljvm $(LIBM) \
-				       -framework Cocoa \
-				       -framework OpenGL \
-				       -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-				       -framework JavaNativeFoundation \
-				       -framework JavaRuntimeSupport \
-				       -framework ApplicationServices \
-				       -framework AudioToolbox \
-				       -ljava,\
-		LDFLAGS_SUFFIX_windows:=kernel32.lib user32.lib gdi32.lib winspool.lib \
-					imm32.lib ole32.lib uuid.lib shell32.lib \
-					comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
-					delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
-					-DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
-					-DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
-					-DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
-					-DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \
-					-DELAYLOAD:comctl32.dll -DELAYLOAD:shlwapi.dll,\
-		VERSIONINFO_RESOURCE:=$(LIBAWT_VERSIONINFO_RESOURCE),\
-		RC_FLAGS:=$(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
-			  -D "JDK_FNAME=awt.dll" \
-			  -D "JDK_INTERNAL_NAME=awt" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBAWT) : $(BUILD_LIBJAVA)
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-$(BUILD_LIBAWT) : $(BUILD_LIBMLIB_IMAGE)
-endif
-
-BUILD_LIBRARIES += $(BUILD_LIBAWT)
-
-##########################################################################################
-
-# TODO!!
-# Even though this variable as a general name, it is
-# only used on macos, in fontpath.c, as prefix for where to find fonts.
-#
-# It's used for libawt_headless _and_ libawt_xawt
-#
-X11_PATH:=/usr/X11R6
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
-ifndef BUILD_HEADLESS_ONLY
-
-LIBAWT_XAWT_DIRS:=\
-		$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-		$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
-		$(JDK_TOPDIR)/src/share/native/sun/font \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
-		$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11 \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/xawt \
-
-LIBAWT_XAWT_CFLAGS:=-DXAWT -DXAWT_HACK \
-        -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
-	$(CUPS_CFLAGS) \
-	$(foreach dir,$(LIBAWT_XAWT_DIRS),-I$(dir)) \
-	-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-	-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-	-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-	-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-	-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-	-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-	-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-	-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga
-
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-	LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
-endif
-
-ifeq ($(OPENJDK_TARGET_OS),linux)
-ifndef OPENJDK
-include $(JDK_TOPDIR)/make/closed/xawt.gmk
-endif
-
-ifeq ($(DISABLE_XRENDER),true)
-	LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
-endif
-endif
-
-ifeq ($(MILESTONE),internal)
-	LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
-endif
-
-LIBAWT_XAWT_FILES:=\
-	XlibWrapper.c \
-	XWindow.c \
-	XToolkit.c \
-	X11Color.c \
-	X11SurfaceData.c \
-	awt_GraphicsEnv.c \
-	awt_InputMethod.c \
-	robot_common.c \
-	awt_Robot.c \
-        list.c \
-        multiVis.c \
-	initIDs.c \
-	awt_util.c \
-	awt_Desktop.c \
-	awt_UNIXToolkit.c \
-	X11FontScaler_md.c \
-	X11TextRenderer_md.c \
-	fontpath.c \
-	awt_Insets.c \
-	awt_Event.c \
-	X11Renderer.c \
-	X11PMBlitLoops.c \
-	OGLBlitLoops.c \
-	OGLBufImgOps.c \
-	OGLContext.c \
-	OGLFuncs.c \
-	OGLMaskBlit.c \
-	OGLMaskFill.c \
-	OGLPaints.c \
-	OGLRenderQueue.c \
-	OGLRenderer.c \
-	OGLSurfaceData.c \
-	OGLTextRenderer.c \
-	OGLVertexCache.c \
-	GLXGraphicsConfig.c \
-	GLXSurfaceData.c \
-	AccelGlyphCache.c \
-	awt_Font.c \
-	multi_font.c \
-	awt_AWTEvent.c \
-	awt_DrawingSurface.c \
-	jawt.c \
-	CUPSfuncs.c \
-	debug_assert.c \
-	debug_mem.c \
-	debug_trace.c \
-	debug_util.c \
-	awt_Plugin.c \
-        gnome_interface.c \
-	gtk2_interface.c \
-        swing_GTKEngine.c \
-        swing_GTKStyle.c \
-        rect.c \
-	sun_awt_X11_GtkFileDialogPeer.c \
-	XRSurfaceData.c \
-	XRBackendNative.c
-
-LIBAWT_XAWT_LDFLAGS_SUFFIX:=$(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi  -ljava -ljvm -lc
-
-ifeq ($(OPENJDK_TARGET_OS), linux)
-        # To match old build, add this to LDFLAGS instead of suffix.
-	LIBAWT_XAWT_LDFLAGS += -lpthread
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	LIBAWT_XAWT_LDFLAGS_SUFFIX += -lpthread
-endif
-
-# On macosx, the shared library origin is set twice for this lib.
-$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT,\
-		LIBRARY:=awt_xawt,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBAWT_XAWT_DIRS),\
-		INCLUDE_FILES:=$(LIBAWT_XAWT_FILES),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
-                        $(X_CFLAGS),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt_xawt/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS),\
-		LDFLAGS_linux:=$(call SET_SHARED_LIBRARY_ORIGIN) \
-			       $(call SET_SHARED_LIBRARY_ORIGIN,/..),\
-		LDFLAGS_solaris:=-L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-				 -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
-				 -R$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-				 -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
-				 -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-			 	 $(call SET_SHARED_LIBRARY_ORIGIN) \
-			 	 $(call SET_SHARED_LIBRARY_ORIGIN,/..),\
-		LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_ORIGIN) \
-				$(call SET_SHARED_LIBRARY_ORIGIN). \
-				$(call SET_SHARED_LIBRARY_ORIGIN) \
-				$(call SET_SHARED_LIBRARY_ORIGIN).,\
-		LDFLAGS_SUFFIX:=$(LIBAWT_XAWT_LDFLAGS_SUFFIX),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=xawt.dll" \
-			  -D "JDK_INTERNAL_NAME=xawt" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt_xawt,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBAWT_XAWT) : $(BUILD_LIBJAVA)
-
-$(BUILD_LIBAWT_XAWT) : $(BUILD_LIBAWT)
-
-BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
-
-endif
-endif
-
-##########################################################################################
-
-BUILD_LIBZIP_EXCLUDES :=
-ifeq ($(USE_EXTERNAL_LIBZ),true)
-    LIBZ := -lz
-    LIBZIP_EXCLUDES += zlib-1.2.5
-else
-    ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-endif
-
-BUILD_LIBZIP_REORDER :=
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-    ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-        BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
-    endif
-endif
-
-ifeq ($(LIBZIP_CAN_USE_MMAP), true)
-     BUILD_LIBZIP_MMAP := -DUSE_MMAP
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBZIP,\
-                LIBRARY:=zip,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip,\
-		EXCLUDES:=$(LIBZIP_EXCLUDES),\
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(ZLIB_CPPFLAGS) \
-		        -I$(JDK_TOPDIR)/src/share/native/java/io \
-                        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io,\
-		CFLAGS_posix:=$(BUILD_LIBZIP_MMAP) -UDEBUG,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libzip/mapfile-vers, \
-		REORDER:=$(BUILD_LIBZIP_REORDER), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN) \
-			 $(EXPORT_ZIP_FUNCS), \
-		LDFLAGS_windows:=-export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-                                -export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
-                                $(WIN_JAVA_LIB),\
-		LDFLAGS_SUFFIX_linux:=-ljvm -ljava $(LIBZ),\
-		LDFLAGS_SUFFIX_solaris:=-ljvm -ljava $(LIBZ) -lc,\
-		LDFLAGS_SUFFIX_macosx:=$(LIBZ) -ljava -ljvm,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=zip.dll" \
-			  -D "JDK_INTERNAL_NAME=zip" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libzip,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBZIP) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBZIP)
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK,\
-		LIBRARY:=unpack, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
-		EXCLUDE_FILES:=main.cpp,\
-		LANG:=C++,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CXXFLAGS_JDKLIB) \
-			 -DNO_ZLIB -DUNPACK_JNI -DFULL,\
-		CFLAGS_release:=-DPRODUCT,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=-map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
-				jvm.lib $(WIN_JAVA_LIB),\
-		LDFLAGS_SUFFIX_posix:=-ljvm $(LIBCXX) -ljava -lc,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libunpack,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=unpack.dll" \
-			  -D "JDK_INTERNAL_NAME=unpack" \
-			  -D "JDK_FTYPE=0x2L",\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBUNPACK) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBUNPACK)
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(BUILD_LIBUNPACK)
-	$(ECHO) Copying $(@F)
-	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.map,$<) $@
-
-    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(BUILD_LIBUNPACK)
-	$(ECHO) Copying $(@F)
-	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.pdb,$<) $@
-endif
-
-##########################################################################################
-
-LIBATTACH_EXCLUDE_FILES:=
-ifneq ($(OPENJDK_TARGET_OS),solaris)
-    LIBATTACH_EXCLUDE_FILES+=SolarisVirtualMachine.c
-endif
-ifneq ($(OPENJDK_TARGET_OS),linux)
-    LIBATTACH_EXCLUDE_FILES+=LinuxVirtualMachine.c
-endif
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-    LIBATTACH_EXCLUDE_FILES+=BsdVirtualMachine.c
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH,\
-		LIBRARY:=attach, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tools/attach,\
-		EXCLUDE_FILES:=$(LIBATTACH_EXCLUDE_FILES),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB),\
-		CFLAGS_windows:=/Gy,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS) \
-			  -D "JDK_FNAME=attach.dll" \
-			  -D "JDK_INTERNAL_NAME=attach" \
-			  -D "JDK_FTYPE=0x2L",\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_solaris:=-ldoor,\
-		LDFLAGS_windows:=/ORDER:@$(JDK_TOPDIR)/makefiles/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_windows:=$(WIN_JAVA_LIB) advapi32.lib psapi.lib,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libattach,\
-		DEBUG_SYMBOLS:=true))
-
-$(BUILD_LIBATTACH) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBATTACH)
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET,\
-		LIBRARY:=dt_socket,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/transport/socket \
-			$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP \
-                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-                        -I$(JDK_TOPDIR)/src/share/transport/socket \
-		        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \
-                        -I$(JDK_TOPDIR)/src/share/back/export \
-                        -I$(JDK_TOPDIR)/src/share/back,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libdt_socket/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_linux:=-lpthread,\
-		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket -lc,\
-		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=dt_socket.dll" \
-			  -D "JDK_INTERNAL_NAME=dt_socket" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdt_socket,\
-		DEBUG_SYMBOLS:=true))
-
-$(BUILD_LIBDT_SOCKET) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBDT_SOCKET)
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-
-  $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM,\
-		LIBRARY:=dt_shmem,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
-			$(JDK_TOPDIR)/src/share/transport/shmem \
-			$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP\
-                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-                        -I$(JDK_TOPDIR)/src/share/transport/shmem \
-		        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \
-                        -I$(JDK_TOPDIR)/src/share/back/export, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB),\
-		LDFLAGS_windows:=-export:jdwpTransport_OnLoad,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=dt_shmem.dll" \
-			  -D "JDK_INTERNAL_NAME=dt_shmem" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdt_shmem,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-  BUILD_LIBRARIES += $(BUILD_LIBDT_SHMEM)
-
-endif # OPENJDK_TARGET_OS
-
-##########################################################################################
-# JDWP_LOGGING causes log messages to be compiled into the library.
-$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP,\
-		LIBRARY:=jdwp, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) -DJDWP_LOGGING\
-		 -I$(JDK_TOPDIR)/src/share/transport/export \
-                 -I$(JDK_TOPDIR)/src/share/back/export \
-                 -I$(JDK_TOPDIR)/src/share/npt \
-                 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
-                 -I$(JDK_TOPDIR)/src/share/back \
-                 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \
-		 -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjdwp/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_linux:=$(LIBDL),\
-		LDFLAGS_SUFFIX_solaris:=$(LIBDL) -lc,\
-		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=jdwp.dll" \
-			  -D "JDK_INTERNAL_NAME=jdwp" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjdwp,\
-		DEBUG_SYMBOLS:=true))
-
-$(BUILD_LIBJDWP) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJDWP)
-
-##########################################################################################
-
-LIBJAAS_MAPFILE:=
-ifneq ($(OPENJDK_TARGET_OS),solaris)
-   LIBJAAS_EXCLUDE_FILES:=Solaris.c
-else
-   # only on solaris...wonder why
-   LIBJAAS_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjaas/mapfile-vers
-endif
-
-LIBJAAS_NAME:=jaas_unix
-ifeq ($(OPENJDK_TARGET_OS), windows)
-     LIBJAAS_NAME:=jaas_nt
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS,\
-		LIBRARY:=$(LIBJAAS_NAME),\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/security/auth/module,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB),\
-		MAPFILE:=$(LIBJAAS_MAPFILE),\
-		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=netapi32.lib user32.lib mpr.lib advapi32.lib,\
-		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		EXCLUDE_FILES:=$(LIBJAAS_EXCLUDE_FILES),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS) \
-			  -D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-			  -D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjaas,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBJAAS) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJAAS)
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT,\
-		LIBRARY:=jsdt,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace\
-			$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tracing/dtrace,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB)\
-			-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjsdt/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_linux:=$(LIBDL),\
-		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL),\
-		LDFLAGS_SUFFIX_macosx:=                         $(LIBDL),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=jsdt.dll" \
-			  -D "JDK_INTERNAL_NAME=jsdt" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsdt, \
-                DEBUG_SYMBOLS:=true))
-
-$(BUILD_LIBJSDT) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJSDT)
-
-##########################################################################################
-
-    # TODO: Update awt lib path when awt is converted
-    $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS,\
-                LIBRARY:=lcms,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms,\
-		LANG:=C,\
-		OPTIMIZATION:=HIGHEST, \
-		CFLAGS:=$(filter-out -xc99=%none,$(CFLAGS_JDKLIB)) \
-			$(SHARED_LIBRARY_FLAGS) \
-			-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug,\
-		CFLAGS_solaris:=-xc99=no_lib,\
-		CFLAGS_windows:=-DCMS_IS_WINDOWS_,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/liblcms/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-                         $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_solaris:=/usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2,\
-		LDFLAGS_windows:=$(WIN_AWT_LIB) $(WIN_JAVA_LIB),\
-		LDFLAGS_SUFFIX_solaris:=-lawt -ljava -ljvm -lc,\
-		LDFLAGS_SUFFIX_macosx:=$(LIBM) -lawt -ljava -ljvm,\
-		LDFLAGS_SUFFIX_linux:=-lm -lawt -ljava -ljvm,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=lcms.dll" \
-			  -D "JDK_INTERNAL_NAME=lcms" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/liblcms,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-    BUILD_LIBRARIES += $(BUILD_LIBLCMS)
-
-    $(BUILD_LIBLCMS) : $(BUILD_LIBAWT)
-
-##########################################################################################
-
-ifdef OPENJDK
-    BUILD_LIBJPEG_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers
-else
-    BUILD_LIBJPEG_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers-closed
-    BUILD_LIBJPEG_CLOSED_SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
-    BUILD_LIBJPEG_CLOSED_INCLUDES:=-I$(BUILD_LIBJPEG_CLOSED_SRC)
-endif
-
-BUILD_LIBJPEG_REORDER:=
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-    ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-        BUILD_LIBJPEG_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
-    endif
-endif
-
-# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
-# or 'vfork'": this warning indicates that some variable is placed to
-# a register by optimized compiler and it's value might be lost on longjmp().
-# Recommended way to avoid such warning is to declare the variable as
-# volatile to prevent the optimization. However, this approach does not
-# work because we have to declare all variables as volatile in result.
-#ifndef CROSS_COMPILE_ARCH
-#    CC_43_OR_NEWER:=\
-#        $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
-#              \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
-#    ifeq ($(CC_43_OR_NEWER),1)
-#        BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
-#    endif
-#endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG,\
-                LIBRARY:=jpeg, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(BUILD_LIBJPEG_CLOSED_SRC) \
-		     $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
-		LANG:=C,\
-		OPTIMIZATION:=HIGHEST, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
-		MAPFILE:=$(BUILD_LIBJPEG_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=$(WIN_JAVA_LIB) jvm.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=jpeg.dll" \
-			  -D "JDK_INTERNAL_NAME=jpeg" \
-			  -D "JDK_FTYPE=0x2L",\
-		REORDER:=$(BUILD_LIBJPEG_REORDER),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjpeg,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBJPEG) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJPEG)
-
-##########################################################################################
-
-ifndef OPENJDK
-    FONT_HEADERS:=-I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k
-    BUILD_LIBFONTMANAGER_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
-    LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
-else
-    FONT_HEADERS:=$(FREETYPE2_CFLAGS)
-    BUILD_LIBFONTMANAGER_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
-    BUILD_LIBFONTMANAGER_FONTLIB:=$(FREETYPE2_LIBS)
-endif
-
-LIBFONTMANAGER_OPTIMIZATION:=HIGH
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
-				    X11TextRenderer.c
-LIBFONTMANAGER_OPTIMIZATION:=HIGHEST
-else
-    LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
-				    lcdglyph.c
-endif
-
-BUILD_LIBFONTMANAGER_CFLAGS_COMMON:=\
-			$(X_CFLAGS) \
-			-DLE_STANDALONE -DHEADLESS \
-			$(FONT_HEADERS) \
-			-I$(JDK_TOPDIR)/src/share/native/sun/font \
-			-I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-			-I$(JDK_TOPDIR)/src/share/native/sun/java2d
-
-# Turn off aliasing with GCC for ExtensionSubtables.cpp
-ifeq ($(OPENJDK_TARGET_OS), linux)
-    BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS:=-fno-strict-aliasing
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER,\
-		LIBRARY:=fontmanager, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/font\
-		     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font,\
-		EXCLUDE_FILES:=$(LIBFONTMANAGER_EXCLUDE_FILES) \
-			       AccelGlyphCache.c,\
-		LANG:=C++,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
-		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
-		OPTIMIZATION:=$(LIBFONTMANAGER_OPTIMIZATION), \
-		CFLAGS_windows= -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
-				-DCC_NOEX, \
-		MAPFILE:=$(BUILD_LIBFONTMANAGER_MAPFILE), \
-		LDFLAGS:=$(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(BUILD_LIBFONTMANAGER_FONTLIB),\
-		LDFLAGS_SUFFIX_linux:=-lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc,\
-		LDFLAGS_SUFFIX_solaris:=-lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm,\
-		LDFLAGS_SUFFIX_macosx:=-lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
-				       -ljava -ljvm,\
-		LDFLAGS_SUFFIX_windows:=$(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
-					$(WIN_AWT_LIB),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=fontmanager.dll" \
-			  -D "JDK_INTERNAL_NAME=fontmanager" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfontmanager,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBFONTMANAGER) : $(BUILD_LIBAWT)
-
-ifneq (,$(findstring $(OPENJDK_TARGET_OS),solaris macosx))
-$(BUILD_LIBFONTMANAGER) : $(BUILD_LIBAWT_XAWT)
-endif
-
-BUILD_LIBRARIES += $(BUILD_LIBFONTMANAGER)
-
-##########################################################################################
-
-ifndef OPENJDK
-
-#    ifeq ($(OPENJDK_TARGET_OS), linux)
-#        ifeq ("$(CC_VER_MAJOR)", "3")
-#            OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
-#        endif
-#    endif
-#
-# The resulting size of the t2k lib file is (at least on linux) dependant on the order of
-# the input .o files. Because of this the new build will differ in size to the old build.
-    BUILD_LIBT2K_CFLAGS_COMMON:=-I$(JDK_TOPDIR)/src/share/native/sun/font \
-		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
-		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
-		            -I$(JDK_TOPDIR)/src/share/share/native/sun/font \
-		            -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
-		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-		            -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d
-
-    $(eval $(call SetupNativeCompilation,BUILD_LIBT2K,\
-                LIBRARY:=t2k, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/font \
-		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
-		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints,\
-		EXCLUDE_FILES:=orion.c,\
-		LANG:=C++,\
-		OPTIMIZATION:=HIGH, \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON),\
-		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON),\
-		CFLAGS_windows=-DCC_NOEX, \
-		CXXFLAGS_windows=-DCC_NOEX, \
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libt2k/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=user32.lib $(JDK_OUTPUTDIR)/objs/libfontmanager/fontmanager.lib,\
-		LDFLAGS_SUFFIX_posix:=$(LIBM) $(LIBCXX) -lfontmanager -ljava -ljvm -lc,\
-		LDFLAGS_SUFFIX_solaris:=-lawt -lawt_xawt,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=t2k.dll" \
-			  -D "JDK_INTERNAL_NAME=t2k" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libt2k,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-    # t2k is linked against fontmanager
-    $(BUILD_LIBT2K) : $(BUILD_LIBFONTMANAGER)
-
-    BUILD_LIBRARIES += $(BUILD_LIBT2K)
+  DEBUG_ALL_BINARIES := true
 endif
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS), windows)
-    ifeq ($(OPENJDK_TARGET_CPU), x86)
-        KERNEL32_LIB:=kernel32.lib
-    endif
-    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
-                LIBRARY:=jawt, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows,\
-		INCLUDE_FILES:=jawt.cpp,\
-		LANG:=C++,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CXXFLAGS_JDKLIB) \
-			-EHsc -DUNICODE -D_UNICODE \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
-		        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-		        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \
-			 advapi32.lib $(WIN_AWT_LIB),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=jawt.dll" \
-			  -D "JDK_INTERNAL_NAME=jawt" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjawt,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBJAWT) : $(BUILD_LIBAWT)
-
-$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
-	$(ECHO) Copying $(@F)
-	$(CP) $(JDK_OUTPUTDIR)/objs/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
-
-BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
-
-else # OPENJDK_TARGET_OS not windows
-
-    JAWT_LIBS:=
-    ifneq ($(OPENJDK_TARGET_OS), solaris)
-        JAWT_LIBS += -lawt
-    endif
-
-    ifndef BUILD_HEADLESS_ONLY
-        JAWT_LIBS += -lawt_xawt
-    else
-        JAWT_LIBS += -lawt_headless
-        HEADLESS_CFLAG += -DHEADLESS
-    endif
-
-    JAWT_FILES:=jawt.c
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-	JAWT_FILES:=jawt.m
-	JAWT_LIBS:=-lawt_lwawt
-    endif
-
-    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
-                LIBRARY:=jawt, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
-                     $(JDK_TOPDIR)/src/macosx/native/sun/awt,\
-		INCLUDE_FILES:=$(JAWT_FILES),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB), \
-		CFLAGS_linux:=$(HEADLESS_CFLAG),\
-		CFLAGS_macosx:=-I$(JDK_TOPDIR)/src/solaris/native/sun/awt ,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjawt/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_solaris:=-L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR),\
-		LDFLAGS_SUFFIX_linux:=$(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_solaris:=$(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender,\
-		LDFLAGS_SUFFIX_macosx:=-Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
-				       -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjawt,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-ifndef BUILD_HEADLESS_ONLY
-$(BUILD_LIBJAWT) : $(BUILD_LIBAWT_XAWT)
-else
-$(BUILD_LIBJAWT) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
-endif
-
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-$(BUILD_LIBJAWT) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
-endif
-
-endif # OPENJDK_TARGET_OS
-
-BUILD_LIBRARIES += $(BUILD_LIBJAWT)
-
-##########################################################################################
-
-LIBINSTRUMENT_SRC   :=$(JDK_TOPDIR)/src/share/instrument \
-                      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
-                      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument
-
-LIBINSTRUMENT_FILES :=\
-	EncodingSupport.c \
-	EncodingSupport_md.c \
-	FileSystemSupport_md.c \
-	InstrumentationImplNativeMethods.c \
-	InvocationAdapter.c \
-	JarFacade.c \
-	JPLISAgent.c \
-	JPLISAssert.c \
-	JavaExceptions.c \
-	PathCharsValidator.c \
-	Reentrancy.c \
-	Utilities.c \
-	canonicalize_md.c
-
-LIBINSTRUMENT_DIR   :=$(JDK_OUTPUTDIR)/objs/libinstrument
-LIBINSTRUMENT_CFLAGS:=$(CFLAGS_JDKLIB) \
-                      -I$(JDK_TOPDIR)/src/share/instrument \
-                      -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument \
-                      -I$(JDK_TOPDIR)/src/share/bin
-
-LIBINSTRUMENT_LDFLAGS:=
-LIBINSTRUMENT_LDFLAGS_SUFFIX:=
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-    LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
-				 -export:Agent_OnAttach advapi32.lib
-    # Statically link the C runtime so that there are not dependencies on modules
-    # not on the search patch when invoked from the Windows system directory
-    # (or elsewhere).
-    LIBINSTRUMENT_CFLAGS := $(filter-out -MD,$(LIBINSTRUMENT_CFLAGS))
-    # equivalent of strcasecmp is stricmp on Windows
-    LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT,\
-		LIBRARY:=instrument, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBINSTRUMENT_SRC),\
-		INCLUDE_FILES:=$(LIBINSTRUMENT_FILES),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(LIBINSTRUMENT_CFLAGS),\
-		CFLAGS_debug:=-DJPLIS_LOGGING,\
-		CFLAGS_release:=-DNO_JPLIS_LOGGING,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libinstrument/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN) \
-                         $(LIBINSTRUMENT_LDFLAGS),\
-		LDFLAGS_linux:=$(call SET_SHARED_LIBRARY_ORIGIN,/jli),\
-		LDFLAGS_solaris:= $(call SET_SHARED_LIBRARY_ORIGIN,/jli),\
-		LDFLAGS_macosx:=-Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-				-framework Cocoa -framework Security -framework ApplicationServices,\
-		LDFLAGS_SUFFIX:=$(LIBINSTRUMENT_LDFLAGS_SUFFIX),\
-		LDFLAGS_SUFFIX_macosx:=-liconv $(LIBZ),\
-		LDFLAGS_SUFFIX_solaris:=$(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc,\
-		LDFLAGS_SUFFIX_linux:=$(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=instrument.dll" \
-			  -D "JDK_INTERNAL_NAME=instrument" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(LIBINSTRUMENT_DIR),\
-		DEBUG_SYMBOLS:=true))
-
-ifneq (,$(findstring $(OPENJDK_TARGET_OS), macosx windows))
-$(BUILD_LIBINSTRUMENT) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
-else
-$(BUILD_LIBINSTRUMENT) : $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
-endif
-$(BUILD_LIBINSTRUMENT) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT)
-
-##########################################################################################
-
-BUILD_LIBMANAGEMENT_SRC:=$(JDK_TOPDIR)/src/share/native/sun/management \
-                           $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/management \
-                           $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/management
-
-BUILD_LIBMANAGEMENT_EXCLUDES:=
-
-BUILD_LIBMANAGEMENT_CFLAGS:=-I$(JDK_TOPDIR)/src/share/native/sun/management
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
-	BUILD_LIBMANAGEMENT_EXCLUDES += OperatingSystem_md.c
-else
-	BUILD_LIBMANAGEMENT_EXCLUDES += UnixOperatingSystem_md.c
-endif
-
-ifneq ($(OPENJDK_TARGET_OS),solaris)
-	BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
-endif
-
-ifneq ($(OPENJDK_TARGET_OS),linux)
-	BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
-endif
-
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-	BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
-endif
-
-LIBMANAGEMENT_OPTIMIZATION:=HIGH
-ifneq ($(findstring $(OPENJDK_TARGET_OS),solaris linux),)
-    ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-        LIBMANAGEMENT_OPTIMIZATION:=LOW
-    endif
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT,\
-		LIBRARY:=management,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(BUILD_LIBMANAGEMENT_SRC),\
-		EXCLUDE_FILES:=$(BUILD_LIBMANAGEMENT_EXCLUDES),\
-		LANG:=C,\
-		OPTIMIZATION:=$(LIBMANAGEMENT_OPTIMIZATION), \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBMANAGEMENT_CFLAGS),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libmanagement/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_solaris:=-lkstat,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_windows:=jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=management.dll" \
-			  -D "JDK_INTERNAL_NAME=management" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmanagement,\
-		DEBUG_SYMBOLS:=true))
-
-$(BUILD_LIBMANAGEMENT) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBMANAGEMENT)
-
-##########################################################################################
+include lib/CoreLibraries.gmk
 
-BUILD_LIBHPROF_SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/hprof
-BUILD_LIBHPROF_CFLAGS:=-I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
-                         -I$(JDK_TOPDIR)/src/share/npt \
-                         -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
-                         -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
-
-BUILD_LIBHPROF_LDFLAGS:=
-
-LIBHPROF_OPTIMIZATION:=HIGHEST
-ifneq ($(findstring $(OPENJDK_TARGET_OS),solaris linux),)
-    ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-        LIBHPROF_OPTIMIZATION:=LOW
-    endif
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF,\
-		LIBRARY:=hprof, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(BUILD_LIBHPROF_SRC),\
-		LANG:=C,\
-		OPTIMIZATION:=$(LIBHPROF_OPTIMIZATION), \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                         $(BUILD_LIBHPROF_CFLAGS),\
-		CFLAGS_debug:=-DHPROF_LOGGING,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libhprof/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=wsock32.lib winmm.lib advapi32.lib,\
-		LDFLAGS_SUFFIX_linux:=$(LIBDL),\
-		LDFLAGS_SUFFIX_macosx:=$(LIBDL),\
-		LDFLAGS_SUFFIX_solaris:=-lsocket -lnsl $(LIBDL) -lc,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=hprof.dll" \
-			  -D "JDK_INTERNAL_NAME=hprof" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libhprof_jvmti,\
-		DEBUG_SYMBOLS:=true))
-
-BUILD_LIBRARIES += $(BUILD_LIBHPROF)
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO,\
-		LIBRARY:=java_crw_demo, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjava_crw_demo/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=java_crw_demo.dll" \
-			  -D "JDK_INTERNAL_NAME=java_crw_demo" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjava_crw_demo,\
-		DEBUG_SYMBOLS:=true))
-
-BUILD_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBNPT,\
-		LIBRARY:=npt, \
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        -I$(JDK_TOPDIR)/src/share/npt \
-                        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnpt/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_macosx:=-liconv,\
-		LDFLAGS_SUFFIX_windows:=-export:nptInitialize -export:nptTerminate,\
-		LDFLAGS_SUFFIX_solaris:=-lc, \
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=npt.dll" \
-			  -D "JDK_INTERNAL_NAME=npt" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnpt,\
-		DEBUG_SYMBOLS:=true))
-
-BUILD_LIBRARIES += $(BUILD_LIBNPT)
-
-##########################################################################################
-
-LIBNET_SRC_DIRS:=$(JDK_TOPDIR)/src/share/native/java/net \
-                   $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \
-                   $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \
-                   $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    LIBNET_SRC_DIRS+=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/www/protocol/http/ntlm
-else
-    LIBNET_SRC_DIRS+=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/sdp
-endif
-
-LIBNET_CFLAGS:=$(foreach dir,$(LIBNET_SRC_DIRS),-I$(dir))
-
-LIBNET_EXCLUDE_FILES:=
-ifneq ($(OPENJDK_TARGET_OS),linux)
-	LIBNET_EXCLUDE_FILES += linux_close.c
-endif
-
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-	LIBNET_EXCLUDE_FILES += bsd_close.c
-endif
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-	LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
-else
-	LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
-                                TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
-				NTLMAuthSequence.c NetworkInterface_winXP.c
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBNET,\
-		LIBRARY:=net,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBNET_SRC_DIRS),\
-		EXCLUDE_FILES:=$(LIBNET_EXCLUDE_FILES), \
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(LIBNET_CFLAGS),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnet/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_macosx:=-ljvm -ljava,\
-		LDFLAGS_SUFFIX_solaris:=-ljvm -ljava -lnsl -lsocket $(LIBDL) -lc ,\
-		LDFLAGS_SUFFIX_linux:=$(LIBDL) -ljvm -lpthread -ljava,\
-		LDFLAGS_SUFFIX_windows:=ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
-					delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
-					-DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=net.dll" \
-			  -D "JDK_INTERNAL_NAME=net" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnet,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBNET) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBNET)
-
-$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
-	$(ECHO) $(LOG_INFO) Copying $(@F)
-	$(call install-file)
-
-COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template : $(JDK_TOPDIR)/src/${OPENJDK_TARGET_OS_API_DIR}/lib/sdp/sdp.conf.template
-	$(ECHO) $(LOG_INFO) Copying $(@F)
-	$(call install-file)
-
-COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
-endif
-
-##########################################################################################
-
-BUILD_LIBNIO_SRC:=\
-        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/nio \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
-
-BUILD_LIBNIO_CFLAGS:=\
-	-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-	-I$(JDK_TOPDIR)/src/share/native/java/io \
-	-I$(JDK_TOPDIR)/src/share/native/java/net \
-        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net
-
-BUILD_LIBNIO_FILES:=\
-        DatagramChannelImpl.c \
-        DatagramDispatcher.c \
-	FileChannelImpl.c \
-	FileDispatcherImpl.c \
-	FileKey.c \
-	IOUtil.c \
-        MappedByteBuffer.c \
-	Net.c \
-	ServerSocketChannelImpl.c \
-	SocketChannelImpl.c \
-	SocketDispatcher.c
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-	BUILD_LIBNIO_FILES += \
-		Iocp.c \
-		RegistryFileTypeDetector.c \
-		WindowsAsynchronousFileChannelImpl.c \
-		WindowsAsynchronousServerSocketChannelImpl.c \
-		WindowsAsynchronousSocketChannelImpl.c \
-		WindowsNativeDispatcher.c \
-	        WindowsSelectorImpl.c
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), linux)
-	BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
-	BUILD_LIBNIO_FILES += \
-		EPoll.c \
-		EPollArrayWrapper.c \
-		EPollPort.c \
-		InheritedChannel.c \
-		NativeThread.c \
-		PollArrayWrapper.c \
-		UnixAsynchronousServerSocketChannelImpl.c \
-		UnixAsynchronousSocketChannelImpl.c \
-		GnomeFileTypeDetector.c \
-		MagicFileTypeDetector.c \
-		LinuxNativeDispatcher.c \
-		LinuxWatchService.c \
-		UnixCopyFile.c \
-		UnixNativeDispatcher.c
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
-	BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
-	BUILD_LIBNIO_FILES += \
-		InheritedChannel.c \
-		NativeThread.c \
-	        PollArrayWrapper.c \
-		UnixAsynchronousServerSocketChannelImpl.c \
-		UnixAsynchronousSocketChannelImpl.c \
-		BsdNativeDispatcher.c \
-		MacOSXNativeDispatcher.c \
-		UnixCopyFile.c \
-		UnixNativeDispatcher.c \
-		KQueue.c \
-		KQueuePort.c \
-		KQueueArrayWrapper.c
-endif
+include lib/PlatformLibraries.gmk
 
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-	BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
-	BUILD_LIBNIO_FILES += \
-		DevPollArrayWrapper.c \
-		InheritedChannel.c \
-		NativeThread.c \
-		PollArrayWrapper.c \
-		SolarisEventPort.c \
-		UnixAsynchronousServerSocketChannelImpl.c \
-		UnixAsynchronousSocketChannelImpl.c \
-		GnomeFileTypeDetector.c \
-		SolarisNativeDispatcher.c \
-		SolarisWatchService.c \
-		UnixCopyFile.c \
-		UnixNativeDispatcher.c
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBNIO,\
-		LIBRARY:=nio,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(BUILD_LIBNIO_SRC),\
-		INCLUDE_FILES:=$(BUILD_LIBNIO_FILES), \
-		LANG:=C,\
-		OPTIMIZATION:=HIGH, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(BUILD_LIBNIO_CFLAGS),\
-		MAPFILE:=$(BUILD_LIBNIO_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_linux:=-ljava -lnet -lpthread $(LIBDL),\
-		LDFLAGS_SUFFIX_solaris:=-ljvm -lsocket -lposix4 $(LIBDL) \
-				        -lsendfile -ljava -lnet -lc,\
-		LDFLAGS_SUFFIX_windows:=jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
-					$(JDK_OUTPUTDIR)/objs/libnet/net.lib \
-					advapi32.lib,\
-		LDFLAGS_SUFFIX_macosx:=-ljava -lnet -pthread -framework CoreFoundation,\
-		LDFLAGS_SUFFIX:=,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=nio.dll" \
-			  -D "JDK_INTERNAL_NAME=nio" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnio,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBNIO)
-
-$(BUILD_LIBNIO) : $(BUILD_LIBNET)
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS_API),posix)
-
-  ifneq ($(OPENJDK_TARGET_OS),macosx)
-
-    SCTP_WERROR := -Werror
-    ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
-      SCTP_WERROR :=
-    endif
-
-    $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP,\
-                LIBRARY:=sctp,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-                SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch/sctp,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB)\
-			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
-			-I$(JDK_TOPDIR)/src/share/native/java/net \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net,\
-		CFLAGS_linux:=$(SCTP_WERROR),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsctp/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_linux:=-lpthread $(LIBDL) -ljava -ljvm,\
-		LDFLAGS_SUFFIX_posix:=-lnio -lnet,\
-		LDFLAGS_SUFFIX_solaris:=-lsocket -ljava -ljvm -lc,\
-		LDFLAGS_SUFFIX_macosx:=-ljava -ljvm,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsctp,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-    BUILD_LIBRARIES += $(BUILD_LIBSCTP)
-
-    $(BUILD_LIBSCTP) : $(BUILD_LIBNIO)
-  endif
-endif
-
-##########################################################################################
-
-BUILD_LIBJLI_SRC_DIRS:=$(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin
-LIBJLI_CFLAGS:=$(CFLAGS_JDKLIB) $(foreach dir,$(BUILD_LIBJLI_SRC_DIRS),-I$(dir))
-
-BUILD_LIBJLI_FILES:=\
-	java.c \
-	splashscreen_stubs.c \
-	parse_manifest.c \
-	version_comp.c \
-	wildcard.c \
-	jli_util.c
-
-ifeq ($(JVM_VARIANT_ZERO), true)
-	ERGO_FAMILY:=zero
-else
-	ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
-		ERGO_FAMILY:=i586
-	else
-		ERGO_FAMILY:=$(OPENJDK_TARGET_CPU_ARCH)
-	endif
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
-	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
-	BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
-
-	BUILD_LIBJLI_java_md_macosx.c_CFLAGS:=-x objective-c
-	BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS:=-x objective-c
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-	BUILD_LIBJLI_FILES += java_md.c \
-			      cmdtoargs.c
-        # Staticically link with c runtime on windows.
-	LIBJLI_CFLAGS:=$(filter-out -MD,$(LIBJLI_CFLAGS))
-else ifneq ($(OPENJDK_TARGET_OS), macosx)
-
-	BUILD_LIBJLI_FILES += java_md_common.c
-	BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c
-
-	ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
-
-        # if the architecture specific ergo file exists then
-        # use it, else use the generic definitions from ergo.c
-	ifneq ($(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(ERGO_ARCH_FILE)),)
-		BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
-	else # !ERGO_ARCH_FILE
-		LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
-	endif # ERGO_ARCH_FILE
-endif #WINDOWS
-
-# Append defines depending on target platform
-LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
-endif
-
-ifneq ($(USE_EXTERNAL_LIBZ),true)
-	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-	LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
-	BUILD_LIBJLI_FILES += \
-		inflate.c \
-		inftrees.c \
-		inffast.c \
-		zadler32.c \
-		zcrc32.c \
-		zutil.c
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-    LIBJLI_OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE)
-else
-    LIBJLI_OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE)/jli
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJLI,\
-		LIBRARY:=jli,\
-                OUTPUT_DIR:=$(LIBJLI_OUTPUT_DIR),\
-		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
-		INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
-		LANG:=C,\
-		OPTIMIZATION:=HIGH, \
-		CFLAGS:=$(LIBJLI_CFLAGS),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjli/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_linux:=$(call SET_SHARED_LIBRARY_ORIGIN,/..),\
-		LDFLAGS_solaris:=$(call SET_SHARED_LIBRARY_ORIGIN,/..),\
-		LDFLAGS_macosx:=-framework Cocoa -framework Security -framework ApplicationServices,\
-		LDFLAGS_SUFFIX_solaris:=$(LIBZ) $(LIBDL) -lc,\
-		LDFLAGS_SUFFIX_linux:=$(LIBZ) $(LIBDL) -lc -lpthread,\
-		LDFLAGS_SUFFIX_macosx:=$(LIBZ),\
-		LDFLAGS_SUFFIX_windows:=\
-			-export:JLI_Launch \
-			-export:JLI_ManifestIterate \
-			-export:JLI_SetTraceLauncher \
-			-export:JLI_ReportErrorMessage \
-			-export:JLI_ReportErrorMessageSys \
-			-export:JLI_ReportMessage \
-			-export:JLI_ReportExceptionDescription \
-			-export:JLI_MemAlloc \
-			-export:JLI_CmdToArgs \
-			-export:JLI_GetStdArgc \
-			-export:JLI_GetStdArgs \
-			advapi32.lib \
-			comctl32.lib \
-			user32.lib,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS) \
-			  -D "JDK_FNAME=jli.dll" \
-			  -D "JDK_INTERNAL_NAME=jli" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBJLI)
-
-# On windows, the static library has the same suffix as the import library created by
-# with the shared library, so the static library is given a different name. No harm
-# in doing it for all platform to reduce complexity.
-ifeq ($(OPENJDK_TARGET_OS), windows)
-    $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
-		STATIC_LIBRARY:=jli_static,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
-		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
-		INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
-		LANG:=C,\
-		OPTIMIZATION:=HIGH, \
-		CFLAGS:=$(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS),\
-		ARFLAGS:=$(ARFLAGS),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
-
-else ifeq ($(OPENJDK_TARGET_OS),macosx)
-    #
-    # On macosx they do partial (incremental) linking of libjli_static.a
-    #   code it here...rather than add support to NativeCompilation
-    #   as this is first time I see it
-    $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
-		LIBRARY:=jli_static, \
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
-		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
-		INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
-		LANG:=C,\
-		OPTIMIZATION:=HIGH, \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS),\
-		LDFLAGS:=-nostdlib -r,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(JDK_OUTPUTDIR)/objs/libjli_static.a : $(BUILD_LIBJLI_STATIC)
-	$(call install-file)
-
-BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-ifeq ($(ENABLE_JFR), true)
+include lib/NetworkingLibraries.gmk
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBJFR,\
-		LIBRARY:=jfr,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/closed/share/native/oracle/jfr,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        -I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjfr/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=jfr.dll" \
-			  -D "JDK_INTERNAL_NAME=jfr" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjfr,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBJFR)
-
-endif
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-
-BUILD_LIBKCMS_EXCLUDE_FILES:=
-ifeq ($(OPENJDK_TARGET_OS),windows)
-	BUILD_LIBKCMS_EXCLUDE_FILES += ukcpmgr.c unixmem.c
-else
-	BUILD_LIBKCMS_EXCLUDE_FILES += cmmdll.c registry.c spxffile.c sysinfo.c winmem.c wkcpmgr.c
-endif
-
-BUILD_LIBKCMS_FLAGS:=$(CFLAGS_JDKLIB)
-
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-     # This particular library uses a feature called PIC_CODE_SMALL (on solaris)
-     #   implement it like this...since it's only used here
-     BUILD_LIBKCMS_FLAGS:=$(patsubst -KPIC,-Kpic,$(BUILD_LIBKCMS_FLAGS))
-else ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
-     BUILD_LIBKCMS_FLAGS:=$(patsubst -fPIC,-fpic,$(BUILD_LIBKCMS_FLAGS))
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBKCMS,\
-		LIBRARY:=kcms,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms,\
-		LANG:=C,\
-		EXCLUDE_FILES:=$(BUILD_LIBKCMS_EXCLUDE_FILES),\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(BUILD_LIBKCMS_FLAGS) \
-                        -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST,\
-		CFLAGS_linux:=-Wno-missing-field-initializers,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libkcms/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_linux:=-lc -lpthread,\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		LDFLAGS_SUFFIX_windows:=$(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
-		LDFLAGS_SUFFIX_posix:=-lm -ljava -ljvm,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=kcms.dll" \
-			  -D "JDK_INTERNAL_NAME=kcms" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libkcms,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBKCMS) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBKCMS)
-
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-
-ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
-
-SUNWJDGA_MAPFILE:=
-ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
-	SUNWJDGA_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjdga/mapfile-vers
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
-		LIBRARY:=sunwjdga,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
-		LANG:=C, \
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			-I$(JDK_TOPDIR)/src/share/javavm/export \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
-			-I$(OPENWIN_HOME)/include, \
-		MAPFILE:=$(SUNWJDGA_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX:=-L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -ldga -lX11 $(LIBDL) -lc, \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsunwjdga,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBSUNWJDGA)
-
-endif
-endif
-endif
-endif
-
-##########################################################################################
-
-ifeq ($(BUILD_HEADLESS), true)
-ifneq ($(OPENJDK_TARGET_OS), windows)
-
-LIBAWT_HEADLESS_DIRS:=$(JDK_TOPDIR)/src/share/native/sun/font \
-                        $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
-			$(JDK_TOPDIR)/src/solaris/native/sun/font \
-			$(JDK_TOPDIR)/src/solaris/native/sun/awt \
-			$(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
-			$(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
-
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-	LIBAWT_HEADLESS_DIRS+=$(JDK_TOPDIR)/src/macosx/native/sun/font
-endif
-
-LIBAWT_HEADLESS_CFLAGS:=-DHEADLESS=true \
-                          -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
-			  $(CUPS_CFLAGS) \
-			  $(X_CFLAGS) \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-			  -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-			  -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga \
-                          $(foreach dir,$(LIBAWT_HEADLESS_DIRS),-I$(dir))
-
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-	LIBAWT_HEADLESS_CFLAGS+=\
-		-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-		-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
-endif
-
-LIBAWT_HEADLESS_FILES:=\
-	awt_Font.c \
-	HeadlessToolkit.c \
-	fontpath.c \
-	VDrawingArea.c \
-	X11Color.c \
-	X11Renderer.c \
-	X11PMBlitLoops.c \
-	X11SurfaceData.c \
-	X11FontScaler_md.c \
-	X11TextRenderer_md.c \
-        OGLBlitLoops.c \
-        OGLBufImgOps.c \
-        OGLContext.c \
-        OGLFuncs.c \
-        OGLMaskBlit.c \
-        OGLMaskFill.c \
-        OGLPaints.c \
-        OGLRenderQueue.c \
-        OGLRenderer.c \
-        OGLSurfaceData.c \
-        OGLTextRenderer.c \
-        OGLVertexCache.c \
-        GLXGraphicsConfig.c \
-        GLXSurfaceData.c \
-        AccelGlyphCache.c \
-	CUPSfuncs.c
-
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-	LIBAWT_HEADLESS_FILES+=\
-		AWTFont.m \
-		AWTStrike.m \
-		CCharToGlyphMapper.m \
-		CGGlyphImages.m \
-		CGGlyphOutlines.m \
-		CoreTextSupport.m
-endif
-
-LIBAWT_HEADLESS_REORDER:=
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-	ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-		LIBAWT_HEADLESS_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
-	endif
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS,\
-		LIBRARY:=awt_headless,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBAWT_HEADLESS_DIRS),\
-		INCLUDE_FILES:=$(LIBAWT_HEADLESS_FILES),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(LIBAWT_HEADLESS_CFLAGS),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/mapfile-vers,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_linux:=$(call SET_SHARED_LIBRARY_ORIGIN,/..),\
-		LDFLAGS_solaris:=$(call SET_SHARED_LIBRARY_ORIGIN,/..) \
-				 -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-				 -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR),\
-		LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_ORIGIN).,\
-		REORDER:=$(LIBAWT_HEADLESS_REORDER), \
-		LDFLAGS_SUFFIX_linux:=-ljvm -lawt -lm $(LIBDL) -ljava,\
-		LDFLAGS_SUFFIX_solaris:=$(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc,\
-		LDFLAGS_SUFFIX_macosx:=-ljvm $(LIBCXX) -lawt $(LIBDL) -ljava \
-				 -framework Accelerate \
-				 -framework ApplicationServices \
-				 -framework Cocoa \
-				 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-				 -framework JavaNativeFoundation \
-				 -framework JavaRuntimeSupport,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt_headless,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBAWT_HEADLESS) : $(BUILD_LIBAWT)
-
-BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
-
-endif
-endif
-
-##########################################################################################
-
-ifndef BUILD_HEADLESS_ONLY
-LIBSPLASHSCREEN_DIRS:=\
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
-
-ifeq ($(USE_EXTERNAL_LIBGIF),true)
-    GIFLIB_LDFLAGS := -lgif
-else
-    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
-    GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
-endif
-
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
-else
-    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
-endif
-
-LIBSPLASHSCREEN_CFLAGS:=-DSPLASHSCREEN -DPNG_NO_MMX_CODE \
-	$(foreach dir,$(LIBSPLASHSCREEN_DIRS),-I$(dir))
+include lib/NioLibraries.gmk
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	LIBSPLASHSCREEN_CFLAGS:=-I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
-                                  $(LIBSPLASHSCREEN_CFLAGS) \
-                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks
-	LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
-	LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
-
-	LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS:=-x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS:=-x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS:=-x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS:=-x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS:=-x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS:=-x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS:=-O0
-
-else ifneq ($(OPENJDK_TARGET_OS), windows)
-	LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
-else
-	LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
-endif
-
-LIBSPLASHSCREEN_LDFLAGS_SUFFIX:=
-
-ifneq ($(USE_EXTERNAL_LIBZ),true)
-	LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-	LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
-				  -framework ApplicationServices \
-				  -framework Foundation \
-				  -framework Cocoa \
-                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-				  -framework JavaNativeFoundation
-else ifneq ($(OPENJDK_TARGET_OS), windows)
-	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
-else # OPENJDK_TARGET_OS
-	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
-endif # OPENJDK_TARGET_OS
-
-$(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN,\
-		LIBRARY:=splashscreen,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBSPLASHSCREEN_DIRS),\
-		EXCLUDE_FILES:=imageioJPEG.c jpegdecoder.c pngtest.c,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=splashscreen.dll" \
-			  -D "JDK_INTERNAL_NAME=splashscreen" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsplashscreen,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(LIBSPLASHSCREEN)
-
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-$(LIBSPLASHSCREEN) :  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
-endif
-
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-
-LIBDCPR_SRC_DIRS:=\
-	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/doe \
-	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/path \
-	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/pr \
-	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/util
-
-LIBDCPR_CFLAGS:=$(foreach dir,$(LIBDCPR_SRC_DIRS),-I$(dir)) \
-	          -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBDCPR,\
-		LIBRARY:=dcpr,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBDCPR_SRC_DIRS),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			$(LIBDCPR_CFLAGS), \
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libdcpr/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LIBM) $(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_posix:=-lm,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=dcpr.dll" \
-			  -D "JDK_INTERNAL_NAME=dcpr" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdcpr,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBDCPR) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBDCPR)
-
-endif
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC,\
-		LIBRARY:=j2pcsc,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
-                     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio,\
-		LANG:=C,\
-		CFLAGS_posix:=-D__sun_jdk,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                     -I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
-                     -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio\
-                     -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio/MUSCLE,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2pcsc/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_posix:=$(LIBDL), \
-		LDFLAGS_SUFFIX_windows:=winscard.lib,\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=j2pcsc.dll" \
-			  -D "JDK_INTERNAL_NAME=j2pcsc" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2pcsc,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC)
-
-##########################################################################################
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
-$(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS,\
-		LIBRARY:=j2gss,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
-                     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                     -I$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
-                     -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2gss/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LIBDL),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2gss,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBJ2GSS)
-endif
-
-##########################################################################################
-
-ifneq ($(BUILD_CRYPTO),no)
-  BUILD_LIBKRB5_NAME:=
-  ifeq ($(OPENJDK_TARGET_OS), windows)
-     BUILD_LIBKRB5_NAME:=w2k_lsa_auth
-     BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
-     BUILD_LIBKRB5_LIBS:=advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
-			 gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
-			 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
-  else ifeq ($(OPENJDK_TARGET_OS), macosx)
-     BUILD_LIBKRB5_NAME:=osxkrb5
-     BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/krb5
-     BUILD_LIBKRB5_LIBS:=-framework Kerberos
-  endif
-
-  ifneq ($(BUILD_LIBKRB5_NAME),)
-    $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5,\
-		LIBRARY:=$(BUILD_LIBKRB5_NAME),\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(BUILD_LIBKRB5_SRC),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-		        -I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
-                        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5 ,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(BUILD_LIBKRB5_LIBS) ,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-			  -D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libkrb5,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-    BUILD_LIBRARIES += $(BUILD_LIBKRB5)
-  endif
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI,\
-		LIBRARY:=sunmscapi,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi,\
-		LANG:=C++,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi ,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=Crypt32.Lib advapi32.lib,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=sunmscapi.dll" \
-			  -D "JDK_INTERNAL_NAME=sunmscapi" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsunmscapi,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
-endif
-
-##########################################################################################
+include lib/SecurityLibraries.gmk
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11,\
-		LIBRARY:=j2pkcs11,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-                     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
-                     $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
-                     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-		        -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-		        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
-		        -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
-                        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2pkcs11/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_posix:=$(LIBDL),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=j2pkcs11.dll" \
-			  -D "JDK_INTERNAL_NAME=j2pkcs11" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2pkcs11,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBJ2PKCS11)
-
-##########################################################################################
-
-ifeq ($(ENABLE_INTREE_EC),yes)
-
-BUILD_LIBSUNEC_FLAGS:= -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
-                       -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
-
-#
-# On sol-sparc...all libraries are compiled with -xregs=no%appl
-#   (set in CFLAGS_REQUIRED_sparc)
-#
-# except!!! libsunec.so
-#
-ECC_JNI_SOLSPARC_FILTER:=
-ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
-     ECC_JNI_SOLSPARC_FILTER:=-xregs=no%appl
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC,\
-		LIBRARY:=sunec,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/ec \
-                     $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
-		LANG:=C++, \
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB))\
-                        $(BUILD_LIBSUNEC_FLAGS) \
-                        -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B,\
-		CXXFLAGS:=$(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
-                          $(BUILD_LIBSUNEC_FLAGS),\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsunec/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK),\
-		LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LIBCXX),\
-                LDFLAGS_SUFFIX_linux:=-lc ,\
-                LDFLAGS_SUFFIX_solaris:=-lc ,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=sunec.dll" \
-			  -D "JDK_INTERNAL_NAME=sunec" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsunec,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBSUNEC)
-endif
-
-##########################################################################################
-
-LIBJSOUND_SRC_DIRS:=\
-	$(JDK_TOPDIR)/src/share/native/com/sun/media/sound \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/media/sound
-
-LIBJSOUND_SRC_FILES:=Utilities.c Platform.c
-
-LIBJSOUND_LANG:=C
-LIBJSOUND_CFLAGS:=$(foreach dir,$(LIBJSOUND_SRC_DIRS),-I$(dir))
-
-EXTRA_SOUND_JNI_LIBS:=
-
-LIBJSOUND_MIDIFILES:=\
-	MidiInDevice.c \
-	MidiInDeviceProvider.c \
-	MidiOutDevice.c \
-	MidiOutDeviceProvider.c \
-	PlatformMidi.c
-
-# files needed for ports
-LIBJSOUND_PORTFILES:=\
-	PortMixerProvider.c \
-	PortMixer.c
-
-# files needed for direct audio
-LIBJSOUND_DAUDIOFILES:=\
-	DirectAudioDeviceProvider.c \
-	DirectAudioDevice.c
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-	EXTRA_SOUND_JNI_LIBS += jsoundds
-	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS \
-                            -DUSE_PLATFORM_MIDI_OUT=TRUE \
-                            -DUSE_PLATFORM_MIDI_IN=TRUE \
-                            -DUSE_PORTS=TRUE
-	LIBJSOUND_SRC_FILES += \
-		PLATFORM_API_WinOS_MidiIn.cpp \
-		PLATFORM_API_WinOS_MidiOut.c \
-		PLATFORM_API_WinOS_Util.c \
-		PLATFORM_API_WinOS_Ports.c
-	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
-	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
-endif # OPENJDK_TARGET_OS windows
-
-ifeq ($(OPENJDK_TARGET_OS), linux)
-	EXTRA_SOUND_JNI_LIBS += jsoundalsa
-	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
-endif # OPENJDK_TARGET_OS linux
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	LIBJSOUND_LANG:=C++
-	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
-                            -DUSE_PORTS=TRUE \
-                            -DUSE_DAUDIO=TRUE \
-                            -DUSE_PLATFORM_MIDI_OUT=TRUE \
-                            -DUSE_PLATFORM_MIDI_IN=TRUE
-	LIBJSOUND_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/sun/media/sound
-	LIBJSOUND_SRC_FILES += \
-		PLATFORM_API_MacOSX_Utils.cpp \
-		PLATFORM_API_MacOSX_PCM.cpp \
-		PLATFORM_API_MacOSX_Ports.cpp \
-                PLATFORM_API_MacOSX_MidiIn.c \
-                PLATFORM_API_MacOSX_MidiOut.c \
-                PLATFORM_API_MacOSX_MidiUtils.c
-	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
-	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
-	LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
-endif # OPENJDK_TARGET_OS macosx
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \
-                            -DUSE_PORTS=TRUE \
-                            -DUSE_DAUDIO=TRUE
-	LIBJSOUND_SRC_FILES += \
-		PLATFORM_API_SolarisOS_Utils.c \
-		PLATFORM_API_SolarisOS_Ports.c \
-		PLATFORM_API_SolarisOS_PCM.c
-	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
-	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
-	LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
-endif # OPENJDK_TARGET_OS solaris
-
-
-ifeq ($(JVM_VARIANT_ZERO), true)
-	LIBJSOUND_CFLAGS += -DX_ARCH=X_ZERO
-else
-  ifeq ($(OPENJDK_TARGET_CPU), x86)
-	LIBJSOUND_CFLAGS += -DX_ARCH=X_I586
-  endif
-
-  ifeq ($(OPENJDK_TARGET_CPU), sparc)
-	LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARC
-  endif
-
-  ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
-	LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARCV9
-  endif
-
-  ifeq ($(OPENJDK_TARGET_CPU), x86_64)
-	LIBJSOUND_CFLAGS += -DX_ARCH=X_AMD64
-  endif
-
-  ifeq ($(OPENJDK_TARGET_CPU), arm)
-	LIBJSOUND_CFLAGS += -DX_ARCH=X_ARM
-  endif
-
-  ifeq ($(OPENJDK_TARGET_CPU), ppc)
-	LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC
-  endif
-endif
-
-LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND,\
-		LIBRARY:=jsound,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBJSOUND_SRC_DIRS),\
-		INCLUDE_FILES:=$(LIBJSOUND_SRC_FILES),\
-		LANG:=$(LIBJSOUND_LANG),\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-		        $(LIBJSOUND_CFLAGS), \
-		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjsound/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_macosx:=-framework CoreAudio -framework CoreFoundation \
-				-framework CoreServices -framework AudioUnit $(LIBCXX) \
-				-framework CoreMIDI -framework AudioToolbox,\
-		LDFLAGS_windows:=$(WIN_JAVA_LIB) advapi32.lib winmm.lib,\
-		LDFLAGS_SUFFIX_posix:=-ljava -ljvm,\
-		LDFLAGS_SUFFIX_solaris:=-lc ,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=jsound.dll" \
-			  -D "JDK_INTERNAL_NAME=jsound" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsound,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBJSOUND) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJSOUND)
-
-##########################################################################################
-
-ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)),)
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA,\
-		LIBRARY:=jsoundalsa,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBJSOUND_SRC_DIRS),\
-		INCLUDE_FILES:=Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
-                                $(LIBJSOUND_DAUDIOFILES) \
-				PLATFORM_API_LinuxOS_ALSA_CommonUtils.c   \
-				PLATFORM_API_LinuxOS_ALSA_PCM.c     \
-				PLATFORM_API_LinuxOS_ALSA_PCMUtils.c   \
-				PLATFORM_API_LinuxOS_ALSA_MidiIn.c  \
-				PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
-				PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
-				PLATFORM_API_LinuxOS_ALSA_Ports.c,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
-			$(LIBJSOUND_CFLAGS) \
-			-DUSE_DAUDIO=TRUE \
-			-DUSE_PORTS=TRUE  \
-			-DUSE_PLATFORM_MIDI_OUT=TRUE \
-			-DUSE_PLATFORM_MIDI_IN=TRUE, \
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjsoundalsa/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(ALSA_LIBS) -ljava -ljvm,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsoundalsa,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBJSOUNDALSA) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJSOUNDALSA)
-
-endif
-
-##########################################################################################
-
-ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)),)
+include lib/ServiceabilityLibraries.gmk
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS,\
-		LIBRARY:=jsoundds,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBJSOUND_SRC_DIRS),\
-		INCLUDE_FILES:=Utilities.c $(LIBJSOUND_DAUDIOFILES) \
-				PLATFORM_API_WinOS_DirectSound.cpp, \
-		LANG:=C++,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			$(LIBJSOUND_CFLAGS) \
-			-DUSE_DAUDIO=TRUE, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=jsoundds.dll" \
-			  -D "JDK_INTERNAL_NAME=jsoundds" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsoundds,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBJSOUNDDS) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJSOUNDDS)
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-ifndef OPENJDK
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO,\
-		LIBRARY:=j2ucrypto,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			-I$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto ,\
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2ucrypto/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB),\
-		LDFLAGS_SUFFIX:=$(LIBDL),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2ucrypto,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBJ2UCRYPTO) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
-
-endif
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE,\
-		LIBRARY:=AppleScriptEngine,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/apple/applescript,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \
-			-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                        -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX:=-framework Cocoa \
-                                -framework Carbon \
-                                -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                                -framework JavaNativeFoundation \
-                                $(LDFLAGS_JDKLIB_SUFFIX),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libAppleScriptEngine,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(BUILD_LIBAPPLESCRIPTENGINE) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP,\
-		LIBRARY:=osxapp,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/sun/osxapp,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-			-I$(JDK_OUTPUTDIR)/gensrc/sun/osxapp \
-                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                        -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_macosx:=\
-	-framework Accelerate \
-	-framework ApplicationServices \
-	-framework AudioToolbox \
-	-framework Carbon \
-	-framework Cocoa \
-	-framework Security \
-	-framework ExceptionHandling \
-        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-	-framework JavaNativeFoundation \
-	-framework JavaRuntimeSupport \
-	-framework OpenGL \
-	-framework IOSurface \
-	-framework QuartzCore, \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libosxapp,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBOSXAPP)
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
-LIBOSX_DIRS:=\
-  $(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
-  $(JDK_TOPDIR)/src/macosx/native/java/util \
-  $(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
-  $(JDK_TOPDIR)/src/macosx/native/apple/security \
-  $(JDK_TOPDIR)/src/macosx/native/apple/launcher
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBOSX,\
-		LIBRARY:=osx,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBOSX_DIRS),\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(foreach dir,$(LIBOSX_DIRS),-I$(dir)) \
-                        -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                        -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_macosx:=\
-    -losxapp \
-    -framework Cocoa \
-    -framework ApplicationServices \
-    -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-    -framework JavaNativeFoundation \
-    -framework JavaRuntimeSupport \
-    -framework Security \
-    -framework SystemConfiguration \
-    $(LDFLAGS_JDKLIB_SUFFIX), \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libosx,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBOSX)
-
-$(BUILD_LIBOSX) : $(BUILD_LIBOSXAPP)
-
-$(BUILD_LIBOSX) : $(BUILD_LIBJAVA)
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
-LIBAWT_LWAWT_FILES:=\
-        awt.m \
-        ApplicationDelegate.m \
-        CFRetainedResource.m \
-        CGLGraphicsConfig.m \
-        CGLSurfaceData.m \
-        CGLLayer.m \
-        CGraphicsConfig.m \
-        CGraphicsDevice.m \
-        CGraphicsEnv.m \
-        CCharToGlyphMapper.m \
-        CSystemColors.m \
-        AWTFont.m \
-        CGGlyphOutlines.m \
-        CGGlyphImages.m \
-        CoreTextSupport.m \
-        AWTStrike.m \
-        InitIDs.m \
-        AWTEvent.m \
-        AWTView.m \
-        AWTWindow.m \
-        AWTSurfaceLayers.m \
-        CCursorManager.m \
-        CClipboard.m \
-        CDataTransferer.m \
-        CDragSource.m \
-        CDragSourceContextPeer.m \
-        CDropTarget.m \
-        CDropTargetContextPeer.m \
-        CInputMethod.m \
-        CDesktopPeer.m \
-        OSVersion.m \
-        DnDUtilities.m \
-        CFileDialog.m \
-        CImage.m \
-        CMenu.m \
-        CMenuBar.m \
-        CMenuComponent.m \
-        CMenuItem.m \
-        CPopupMenu.m \
-        CRobot.m \
-        CTrayIcon.m \
-        CWrapper.m \
-        JavaAccessibilityAction.m \
-        JavaAccessibilityUtilities.m \
-        JavaComponentAccessibility.m \
-        JavaTextAccessibility.m \
-        LWCToolkit.m \
-        GeomUtilities.m \
-        CPrinterJob.m \
-        PrintModel.m \
-        PrinterSurfaceData.m \
-        PrinterView.m \
-        QuartzSurfaceData.m \
-        QuartzRenderer.m \
-        CTextPipe.m \
-        ImageSurfaceData.m \
-        awt_DrawingSurface.m \
-        \
-        OGLBlitLoops.c \
-        OGLBufImgOps.c \
-        OGLContext.c \
-        OGLFuncs.c \
-        OGLMaskBlit.c \
-        OGLMaskFill.c \
-        OGLPaints.c \
-        OGLRenderQueue.c \
-        OGLRenderer.c \
-        OGLSurfaceData.c \
-        OGLTextRenderer.c \
-        OGLVertexCache.c \
-        AccelGlyphCache.c \
-        CUPSfuncs.c
-
+include lib/Awt2dLibraries.gmk
 
-LIBAWT_LWAWT_DIRS:=\
-  $(JDK_TOPDIR)/src/macosx/native/sun/awt \
-  $(JDK_TOPDIR)/src/macosx/native/sun/font \
-  $(JDK_TOPDIR)/src/macosx/native/sun/java2d/opengl \
-  $(JDK_TOPDIR)/src/solaris/native/sun/awt \
-  $(JDK_TOPDIR)/src/share/native/sun/font \
-  $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT,\
-		LIBRARY:=awt_lwawt,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(LIBAWT_LWAWT_DIRS),\
-		LANG:=C,\
-		INCLUDE_FILES:=$(LIBAWT_LWAWT_FILES),\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        $(X_CFLAGS) \
-                        $(X_LIBS) \
-                        $(foreach dir,$(LIBAWT_LWAWT_DIRS),-I$(dir)) \
-                        -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-                        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-                        -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d \
-                        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-                        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-                        -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-                        -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-                        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                        -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_macosx:=-lawt -lmlib_image -losxapp -ljvm $(LIBM) \
-				       -framework Accelerate \
-				       -framework ApplicationServices \
-				       -framework AudioToolbox \
-				       -framework Carbon \
-				       -framework Cocoa \
-				       -framework Security \
-				       -framework ExceptionHandling \
-				       -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-				       -framework JavaNativeFoundation \
-				       -framework JavaRuntimeSupport \
-				       -framework OpenGL \
-				       -framework QuartzCore -ljava,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt_lwawt,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
-
-$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBAWT)
-
-$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBMLIB_IMAGE)
-
-$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBOSXAPP)
-
-$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBJAVA)
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI,\
-		LIBRARY:=osxui,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/com/apple/laf,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-                        -I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \
-			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-			-I$(JDK_TOPDIR)/src/macosx/native/sun/awt \
-                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN) \
-			 -Xlinker -rpath -Xlinker @loader_path,\
-		LDFLAGS_SUFFIX_macosx:=-lawt -losxapp -lawt_lwawt \
-				       -framework Cocoa \
-				       -framework Carbon \
-				       -framework ApplicationServices \
-				       -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-				       -framework JavaNativeFoundation \
-				       -framework JavaRuntimeSupport \
-				       -ljava -ljvm,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libosxui,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-BUILD_LIBRARIES += $(BUILD_LIBOSXUI)
-
-$(BUILD_LIBOSXUI) : $(BUILD_LIBAWT)
-
-$(BUILD_LIBOSXUI) : $(BUILD_LIBOSXAPP)
-
-$(BUILD_LIBOSXUI) : $(BUILD_LIBAWT_LWAWT)
-
-#$(BUILD_LIBOSXUI) : $(BUILD_LIBJAVA)
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
-# Ugly hack to mimic behaviour in old build where this is built as an xcode project.
-SET_SHARED_LIBRARY_NAME=-Xlinker -install_name -Xlinker /usr/local/lib/libJObjC.dylib
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC32,\
-		LIBRARY:=JObjC,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc32,\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
-                     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native ,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=-fpascal-strings \
-                        -fobjc-gc \
-                        -gdwarf-2 \
-                        $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
-                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-			-m32,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			-m32, \
-		LDFLAGS_SUFFIX:=-framework Foundation -framework JavaVM \
-                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                                  -framework JavaNativeFoundation \
-                                  -lffi, \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc32,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC64,\
-		LIBRARY:=JObjC,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc64,\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
-                     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native ,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=-fpascal-strings \
-                        -fobjc-gc \
-                        -gdwarf-2 \
-                        $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
-                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-			, \
-		LDFLAGS:=-fpascal-strings \
-                         -fobjc-gc \
-                         -gdwarf-2 \
-                         $(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX:=-framework Foundation -framework JavaVM \
-                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                                  -framework JavaNativeFoundation \
-                                  -lffi, \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc64,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX): $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
-	$(LIPO) -create -output $@ $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX)
-
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
-
-  ACCESSBRIDGE_SRCDIR:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge
-
-  define SetupAccessBridge
-    # Parameter 1 Suffix
-    # Parameter 2 Machine
-    # Parameter 3 ACCESSBRIDGE_ARCH_ suffix
-
-    $(call SetupNativeCompilation,BUILD_JAWTACCESSBRIDGE$1,\
-		LIBRARY=JAWTAccessBridge$1,\
-		OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(ACCESSBRIDGE_SRCDIR),\
-		INCLUDE_FILES:=JAWTAccessBridge.cpp,\
-		LANG:=C++,\
-		OPTIMIZATION:=LOW,\
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			-DACCESSBRIDGE_ARCH_$3,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
-			 winspool.lib jawt.lib comdlg32.lib advapi32.lib shell32.lib \
-			 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-			 -subsystem:windows -machine:$2 \
-			 -def:$(ACCESSBRIDGE_SRCDIR)/JAWTAccessBridge.DEF,\
-		VERSIONINFO_RESOURCE:=$(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc,\
-		RC_FLAGS:=$(RC_FLAGS),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjawtaccessbridge$1,\
-		DEBUG_SYMBOLS:=true)
-
-    $$(BUILD_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
-
-    $(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1,\
-		LIBRARY=JavaAccessBridge$1,\
-		OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(ACCESSBRIDGE_SRCDIR),\
-		INCLUDE_FILES:=AccessBridgeATInstance.cpp AccessBridgeDebug.cpp \
-			       AccessBridgeJavaEntryPoints.cpp \
-			       AccessBridgeMessages.cpp JavaAccessBridge.cpp,\
-		LANG:=C++,\
-		OPTIMIZATION:=LOW,\
-		CFLAGS:=$(CFLAGS_JDKLIB) \
-			-DACCESSBRIDGE_ARCH_$3,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
-			 winspool.lib comdlg32.lib advapi32.lib shell32.lib \
-			 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-			 -subsystem:windows -machine:$2 \
-			 -def:$(ACCESSBRIDGE_SRCDIR)/JavaAccessBridge.DEF,\
-		VERSIONINFO_RESOURCE:=$(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc,\
-		RC_FLAGS:=$(RC_FLAGS),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjavaaccessbridge$1,\
-		DEBUG_SYMBOLS:=true)
-
-    $(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1,\
-		LIBRARY=WindowsAccessBridge$1,\
-		OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(ACCESSBRIDGE_SRCDIR),\
-		INCLUDE_FILES:=AccessBridgeJavaVMInstance.cpp AccessBridgeMessageQueue.cpp \
-			       AccessBridgeMessages.cpp AccessBridgeWindowsEntryPoints.cpp \
-			       WinAccessBridge.cpp AccessBridgeDebug.cpp \
-			       AccessBridgeEventHandler.cpp,\
-		LANG:=C++,\
-		OPTIMIZATION:=LOW,\
-		CFLAGS:=$(filter-out -MD,$(CFLAGS_JDKLIB)) -MT \
-			-DACCESSBRIDGE_ARCH_$3,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
-			 winspool.lib comdlg32.lib advapi32.lib shell32.lib \
-			 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-			 -subsystem:windows -machine:$2 \
-			 -def:$(ACCESSBRIDGE_SRCDIR)/WinAccessBridge.DEF,\
-		VERSIONINFO_RESOURCE:=$(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc,\
-		RC_FLAGS:=$(RC_FLAGS),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libwindowsaccessbridge$1,\
-		DEBUG_SYMBOLS:=true)
-
-    BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \
-		       $$(BUILD_WINDOWSACCESSBRIDGE$1)
-
-  endef
-
-  ifeq ($(OPENJDK_TARGET_CPU_BITS),32)
-    $(eval $(call SetupAccessBridge,-32,I386,32))
-    $(eval $(call SetupAccessBridge,,I386,LEGACY))
-  else
-    $(eval $(call SetupAccessBridge,-64,X64,64))
-  endif
-endif
-endif
-
+include lib/SoundLibraries.gmk
 
 ##########################################################################################
 
--- a/makefiles/CopyFiles.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/CopyFiles.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -28,22 +28,22 @@
 OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
-     OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
+  OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
 else ifeq ($(OPENJDK_TARGET_OS), macosx)
-     OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
+  OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
 endif
 
 #
 # Copy exported header files to outputdir.
 #
-H_TARGET_FILES =$(INCLUDEDIR)/jdwpTransport.h		\
-		$(INCLUDEDIR)/jni.h 			\
-		$(INCLUDEDIR)/jvmti.h			\
-		$(INCLUDEDIR)/jvmticmlr.h		\
-		$(INCLUDEDIR)/classfile_constants.h	\
-		$(INCLUDEDIR)/jawt.h			\
-		$(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h	\
-		$(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
+H_TARGET_FILES = $(INCLUDEDIR)/jdwpTransport.h \
+    $(INCLUDEDIR)/jni.h \
+    $(INCLUDEDIR)/jvmti.h \
+    $(INCLUDEDIR)/jvmticmlr.h \
+    $(INCLUDEDIR)/classfile_constants.h \
+    $(INCLUDEDIR)/jawt.h \
+    $(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
+    $(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
 
 $(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
 	$(call install-file)
@@ -56,22 +56,22 @@
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
+  ifeq ($(OPENJDK_TARGET_OS), windows)
     COPY_FILES += $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCallbacks.h \
-		  $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.h \
-		  $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgePackages.h \
-		  $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.c \
-		  $(JDK_OUTPUTDIR)/lib/accessibility.properties
+        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.h \
+        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgePackages.h \
+        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.c \
+        $(JDK_OUTPUTDIR)/lib/accessibility.properties
 
     $(OPENJDK_TARGET_OS_INCLUDE)/bridge/%: \
-		$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/%
-	$(install-file)
+        $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/%
+		$(install-file)
 
     $(JDK_OUTPUTDIR)/lib/accessibility.properties: \
-		$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/accessibility.properties
-	$(install-file)
+        $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/accessibility.properties
+		$(install-file)
 
-endif
+  endif
 endif
 
 ##########################################################################################
@@ -125,9 +125,9 @@
 # Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
 #
 ifneq ($(OPENJDK_TARGET_OS), macosx)
-OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
+  OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
 else
-OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
+  OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
 endif
 
 $(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
@@ -145,11 +145,11 @@
 
 CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
 ifeq ($(OPENJDK_TARGET_OS), windows)
-CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
+  CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
 else # OPENJDK_TARGET_OS
-CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
+  CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
 endif # OPENJDK_TARGET_OS
-CURSORS_TARGET_FILES =  $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
+CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
 
 $(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
 	$(call install-file)
@@ -158,7 +158,7 @@
 
 ##########################################################################################
 
-CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
+CONTENT_TYPES_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
 
 $(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
 	$(call install-file)
@@ -183,14 +183,14 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
 
-TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
+  TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
 
-$(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
+  $(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
 	$(call install-file)
 
-COPY_FILES += $(LIBDIR)/tzmappings
+  COPY_FILES += $(LIBDIR)/tzmappings
 
 endif
 
@@ -199,13 +199,13 @@
 ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
 
 ifdef OPENJDK
-    ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
+  ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
 else
-    ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
+  ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
 endif
 
-ICCPROFILE_SRCS:=$(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
-ICCPROFILE_TARGET_FILES:=$(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
+ICCPROFILE_SRCS := $(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
+ICCPROFILE_TARGET_FILES := $(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
 
 $(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
 	$(call install-file)
@@ -215,60 +215,58 @@
 
 ##########################################################################################
 
-#make sure freetype dll will be available at runtime as well as link time
-#
-#NB: Default freetype build system uses -h linker option and
-#   result .so contains hardcoded library name that is later
-#   used for adding dependencies to other objects
-#   (e.g. libfontmanager.so).
-#
-#   It is not obvious how to extract that hardcoded name (libfreetype.so.6)
-#   without overcomplicating logic here.
-#   To workaround this we hardcode .6 suffix for now.
-#
-#   Note that .so.6 library will not be found by System.loadLibrary()
-#        but fortunately we need to load FreeType library explicitly
-#        on windows only
-#
-#TODO: rework this to avoid hardcoding library name in the makefile
-#
-ifdef OPENJDK
-    ifeq ($(OPENJDK_TARGET_OS), windows)
-        FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
-    else
-        ifeq ($(USING_SYSTEM_FT_LIB), false)
-            FREETYPE_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
+ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
+  # We need to bundle the freetype library, so it will be available at runtime as well as link time.
+  #
+  # NB: Default freetype build system uses -h linker option and
+  # result .so contains hardcoded library name that is later
+  # used for adding dependencies to other objects
+  # (e.g. libfontmanager.so).
+  #
+  # It is not obvious how to extract that hardcoded name (libfreetype.so.6)
+  # without overcomplicating logic here.
+  # To workaround this we hardcode .6 suffix for now.
+  #
+  # Note that .so.6 library will not be found by System.loadLibrary()
+  # but fortunately we need to load FreeType library explicitly
+  # on windows only
+  #
+  #TODO: rework this to avoid hardcoding library name in the makefile
+  #
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
+  else
+    FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
+  endif
+
+  $(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
+	$(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
+        ifeq ($(OPENJDK_BUILD_OS), windows)
+	  $(CHMOD) +rx $@
         endif
-    endif
 
-    $(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
-	$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
-    ifeq ($(OPENJDK_BUILD_OS), windows)
-	$(CHMOD) +rx $@
-    endif
-
-    COPY_FILES += $(FREETYPE_LIB)
+  COPY_FILES += $(FREETYPE_TARGET_LIB)
 endif
 
 ##########################################################################################
 
 # Copy msvcrXX.dll on windows
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
-    # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
-    $(MSVCR_TARGET): $(MSVCR_DLL)
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
+  # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
+  $(MSVCR_TARGET): $(MSVCR_DLL)
 	$(call install-file)
 	$(CHMOD) a+rx $@
 
-    COPY_FILES += $(MSVCR_TARGET)
+  COPY_FILES += $(MSVCR_TARGET)
 endif
 
 ##########################################################################################
 
-HPROF_SRC=$(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
+HPROF_SRC = $(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
 
-$(LIBDIR)/jvm.hprof.txt : $(HPROF_SRC)
+$(LIBDIR)/jvm.hprof.txt: $(HPROF_SRC)
 	$(call install-file)
 
 COPY_FILES += $(LIBDIR)/jvm.hprof.txt
@@ -279,12 +277,12 @@
 # How to install jvm.cfg.
 #
 ifeq ($(JVM_VARIANT_ZERO), true)
-    JVMCFG_ARCH := zero
+  JVMCFG_ARCH := zero
 else
-    JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
+  JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
 endif
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
   JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
 else
   JVMCFG_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(JVMCFG_ARCH)/jvm.cfg
@@ -294,7 +292,7 @@
 
 # To do: should this also support -zeroshark?
 
-ifeq ($(OPENJDK_TARGET_CPU_BITS),64)
+ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
   COPY_JVM_CFG_FILE := true
 else
   # On 32-bit machines we have three potential VMs: client, server and minimal.
@@ -305,7 +303,7 @@
   # The main problem is deciding whether to use aliases for the VMs that are not
   # present and the current position is that we add aliases for client and server, but
   # not for minimal.
-  CLIENT_AND_SERVER := $(and $(findstring true,$(JVM_VARIANT_SERVER)),$(findstring true,$(JVM_VARIANT_CLIENT)))
+  CLIENT_AND_SERVER := $(and $(findstring true, $(JVM_VARIANT_SERVER)), $(findstring true, $(JVM_VARIANT_CLIENT)))
   ifeq ($(CLIENT_AND_SERVER), true)
     COPY_JVM_CFG_FILE := true
   else
@@ -317,35 +315,34 @@
 endif
 
 ifeq ($(COPY_JVM_CFG_FILE), true)
-    $(JVMCFG): $(JVMCFG_SRC)
+  $(JVMCFG): $(JVMCFG_SRC)
 	$(call install-file)
 else
-    $(JVMCFG):
+  $(JVMCFG):
 	$(MKDIR) -p $(@D)
 	$(RM) $(@)
-
-    # Now check for other permutations
-    ifeq ($(JVM_VARIANT_SERVER), true)
-	$(PRINTF) "-server KNOWN\n">>$(@)
-	$(PRINTF) "-client ALIASED_TO -server\n">>$(@)
-        ifeq ($(JVM_VARIANT_MINIMAL1), true)
+        # Now check for other permutations
+        ifeq ($(JVM_VARIANT_SERVER), true)
+	  $(PRINTF) "-server KNOWN\n">>$(@)
+	  $(PRINTF) "-client ALIASED_TO -server\n">>$(@)
+          ifeq ($(JVM_VARIANT_MINIMAL1), true)
 	    $(PRINTF) "-minimal KNOWN\n">>$(@)
-        endif
-    else
-        ifeq ($(JVM_VARIANT_CLIENT), true)
+          endif
+        else
+          ifeq ($(JVM_VARIANT_CLIENT), true)
 	    $(PRINTF) "-client KNOWN\n">>$(@)
 	    $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
             ifeq ($(JVM_VARIANT_MINIMAL1), true)
-	        $(PRINTF) "-minimal KNOWN\n">>$(@)
+	      $(PRINTF) "-minimal KNOWN\n">>$(@)
             endif
-        else
+          else
             ifeq ($(JVM_VARIANT_MINIMAL1), true)
-	        $(PRINTF) "-minimal KNOWN\n">>$(@)
-	        $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
-	        $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
+	      $(PRINTF) "-minimal KNOWN\n">>$(@)
+	      $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
+	      $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
             endif
+          endif
         endif
-    endif
 endif
 
 COPY_FILES += $(JVMCFG)
@@ -401,23 +398,23 @@
 
 ifndef OPENJDK
 
-BLACKLIST_SRC   := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
-BLACKLIST_DST   := $(JDK_OUTPUTDIR)/lib/security/blacklist
+  BLACKLIST_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
+  BLACKLIST_DST := $(JDK_OUTPUTDIR)/lib/security/blacklist
 
-BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/src/closed/share/lib/security/blacklisted.certs)
+  BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/src/closed/share/lib/security/blacklisted.certs)
 
-TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
-TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
+  TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
+  TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
 
-$(BLACKLIST_DST): $(BLACKLIST_SRC)
+  $(BLACKLIST_DST): $(BLACKLIST_SRC)
 	$(call install-file)
 
-COPY_FILES += $(BLACKLIST_DST)
+  COPY_FILES += $(BLACKLIST_DST)
 
-$(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
+  $(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
 	$(call install-file)
 
-COPY_FILES += $(TRUSTEDLIBS_DST)
+  COPY_FILES += $(TRUSTEDLIBS_DST)
 
 endif
 
@@ -439,98 +436,98 @@
 
 ifndef OPENJDK
 
-SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
-SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
-SHARED_FONTS_FILES   := \
-	LucidaTypewriterRegular.ttf	\
-	LucidaTypewriterBold.ttf        \
-	LucidaBrightRegular.ttf         \
-	LucidaBrightDemiBold.ttf        \
-	LucidaBrightItalic.ttf          \
-	LucidaBrightDemiItalic.ttf	\
-	LucidaSansRegular.ttf       	\
-	LucidaSansDemiBold.ttf       	\
+  SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
+  SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
+  SHARED_FONTS_FILES := \
+      LucidaTypewriterRegular.ttf \
+      LucidaTypewriterBold.ttf \
+      LucidaBrightRegular.ttf \
+      LucidaBrightDemiBold.ttf \
+      LucidaBrightItalic.ttf \
+      LucidaBrightDemiItalic.ttf \
+      LucidaSansRegular.ttf \
+      LucidaSansDemiBold.ttf \
 
-SHARED_FONTS_SRC := $(foreach F,$(SHARED_FONTS_FILES),$(SHARED_FONTS_SRC_DIR)/$(F))
-SHARED_FONTS_DST := $(foreach F,$(SHARED_FONTS_FILES),$(SHARED_FONTS_DST_DIR)/$(F))
+  SHARED_FONTS_SRC := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_SRC_DIR)/$(F))
+  SHARED_FONTS_DST := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_DST_DIR)/$(F))
 
-$(SHARED_FONTS_DST_DIR)/%.ttf : $(SHARED_FONTS_SRC_DIR)/%.ttf
+  $(SHARED_FONTS_DST_DIR)/%.ttf: $(SHARED_FONTS_SRC_DIR)/%.ttf
 	$(call install-file)
 
-$(SHARED_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
+  $(SHARED_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
 	$(call install-file)
 
-COPY_FILES += $(SHARED_FONTS_DST)
+  COPY_FILES += $(SHARED_FONTS_DST)
 
-ifneq ($(OPENJDK_TARGET_OS), windows)
+  ifneq ($(OPENJDK_TARGET_OS), windows)
     COPY_FILES += $(SHARED_FONTS_DST_DIR)/fonts.dir
-endif
+  endif
 
-ifeq ($(OPENJDK_TARGET_OS), linux)
+  ifeq ($(OPENJDK_TARGET_OS), linux)
 
-# The oblique fonts are only needed/wanted on Linux.
+  # The oblique fonts are only needed/wanted on Linux.
 
-OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
-OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
-OBL_FONTS_FILES   := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
-                    LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
+    OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
+    OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
+    OBL_FONTS_FILES := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
+        LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
 
-OBL_FONTS_SRC := $(foreach F,$(OBL_FONTS_FILES),$(OBL_FONTS_SRC_DIR)/$(F))
-OBL_FONTS_DST := $(foreach F,$(OBL_FONTS_FILES),$(OBL_FONTS_DST_DIR)/$(F))
+    OBL_FONTS_SRC := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_SRC_DIR)/$(F))
+    OBL_FONTS_DST := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_DST_DIR)/$(F))
 
-$(OBL_FONTS_DST_DIR)/%.ttf : $(OBL_FONTS_SRC_DIR)/%.ttf
+    $(OBL_FONTS_DST_DIR)/%.ttf: $(OBL_FONTS_SRC_DIR)/%.ttf
 	$(call install-file)
 
-$(OBL_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
+    $(OBL_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
 	$(call install-file)
 
-COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
+    COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
 
-endif # linux
+  endif # linux
 endif # OPENJDK
 
 ##########################################################################################
 
 ifndef OPENJDK
 
-#
-# Solaris X11 Direct Graphics Access library
-#
+  #
+  # Solaris X11 Direct Graphics Access library
+  #
 
-_DGALIBS_sparc = \
-	libxinerama.so \
-	libjdgaSUNWcg6.so \
-	libjdgaSUNWffb.so \
-	libjdgaSUNWm64.so \
-	libjdgaSUNWafb.so
+  _DGALIBS_sparc = \
+      libxinerama.so \
+      libjdgaSUNWcg6.so \
+      libjdgaSUNWffb.so \
+      libjdgaSUNWm64.so \
+      libjdgaSUNWafb.so
 
-_DGALIBS_sparcv9 = \
-	libxinerama.so \
-	libjdgaSUNWcg6.so \
-	libjdgaSUNWffb.so \
-	libjdgaSUNWm64.so \
-	libjdgaSUNWafb.so
+  _DGALIBS_sparcv9 = \
+      libxinerama.so \
+      libjdgaSUNWcg6.so \
+      libjdgaSUNWffb.so \
+      libjdgaSUNWm64.so \
+      libjdgaSUNWafb.so
 
-_DGALIBS_i586 = 	# no i586 library yet
+  _DGALIBS_i586 = # no i586 library yet
 
-_DGALIBS_amd64 = 	# no amd64 library yet
+  _DGALIBS_amd64 = # no amd64 library yet
 
-DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
+  DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
 
-$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
+  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
 	$(call install-file)
 	$(CHMOD) 755 $@
 
-$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
+  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
 	$(call install-file)
 	$(CHMOD) 755 $@
 
-$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
+  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s $(<F) $@
 
-COPY_FILES += $(DGALIBS)
+  COPY_FILES += $(DGALIBS)
 
 endif
 
@@ -538,35 +535,35 @@
 
 ifeq ($(OPENJDK_TARGET_OS), solaris)
 
-SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
-SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
+  SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
+  SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
 
-$(SUNPKCS11_CFG_DST) : $(SUNPKCS11_CFG_SRC)
+  $(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
 	$(call install-file)
 
-COPY_FILES += $(SUNPKCS11_CFG_DST)
+  COPY_FILES += $(SUNPKCS11_CFG_DST)
 
 endif
 
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifeq ($(OPENJDK_TARGET_OS), solaris)
 
-UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.cfg
-UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
+    UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.cfg
+    UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
 
-$(UCRYPTO_CFG_DST) : $(UCRYPTO_CFG_SRC)
+    $(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
 	$(call install-file)
 
-COPY_FILES += $(UCRYPTO_CFG_DST)
+    COPY_FILES += $(UCRYPTO_CFG_DST)
 
-endif
+  endif
 endif
 
 ##########################################################################################
 
-$(JDK_OUTPUTDIR)/lib/sound.properties : $(JDK_TOPDIR)/src/share/lib/sound.properties
+$(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/share/lib/sound.properties
 	$(call install-file)
 
 COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
--- a/makefiles/CopyIntoClasses.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/CopyIntoClasses.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -31,56 +31,56 @@
 
 XMLSECURITY_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource
 COPY_FILES += \
-  $(XMLSECURITY_RESOURCEDIR)/config.dtd \
-  $(XMLSECURITY_RESOURCEDIR)/config.xml
+    $(XMLSECURITY_RESOURCEDIR)/config.dtd \
+    $(XMLSECURITY_RESOURCEDIR)/config.xml
 
 # Copy sun/tools related files into the classes directory.
 
 # Extra jstat files
 JSTAT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/sun/tools/jstat/resources
 COPY_FILES += \
-  $(JSTAT_RESOURCEDIR)/jstat_options \
-  $(JSTAT_RESOURCEDIR)/jstat_unsupported_options
+    $(JSTAT_RESOURCEDIR)/jstat_options \
+    $(JSTAT_RESOURCEDIR)/jstat_unsupported_options
 
 # Extra jhat files
 JHAT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/tools/hat/resources
 COPY_FILES += \
-  $(JHAT_RESOURCEDIR)/hat.js \
-  $(JHAT_RESOURCEDIR)/oqlhelp.html \
-  $(JHAT_RESOURCEDIR)/platform_names.txt
+    $(JHAT_RESOURCEDIR)/hat.js \
+    $(JHAT_RESOURCEDIR)/oqlhelp.html \
+    $(JHAT_RESOURCEDIR)/platform_names.txt
 
 # Extra jrunscript files
 JRUNSCRIPT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/tools/script/shell
 COPY_FILES += \
-  $(JRUNSCRIPT_RESOURCEDIR)/init.js \
-  $(JRUNSCRIPT_RESOURCEDIR)/messages.properties
+    $(JRUNSCRIPT_RESOURCEDIR)/init.js \
+    $(JRUNSCRIPT_RESOURCEDIR)/messages.properties
 
 # Extra jvmstat files
 COPY_FILES += \
-  $(JDK_TOPDIR)/src/share/classes/sun/jvmstat/perfdata/resources/aliasmap
+    $(JDK_TOPDIR)/src/share/classes/sun/jvmstat/perfdata/resources/aliasmap
 
 # JConsole resources
 JCONSOLE_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources
 COPY_FILES += \
-  $(wildcard $(JCONSOLE_RESOURCES_DIR)/*.png) \
-  $(wildcard $(JCONSOLE_RESOURCES_DIR)/*.gif)
+    $(wildcard $(JCONSOLE_RESOURCES_DIR)/*.png) \
+    $(wildcard $(JCONSOLE_RESOURCES_DIR)/*.gif)
 
 # Print resources
 PRINT_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print/resources
 COPY_FILES += \
-  $(wildcard $(PRINT_RESOURCES_DIR)/*.png)
+    $(wildcard $(PRINT_RESOURCES_DIR)/*.png)
 
 # IDN resources
 COPY_FILES += \
-  $(JDK_TOPDIR)/src/share/classes/sun/net/idn/uidna.spp
+    $(JDK_TOPDIR)/src/share/classes/sun/net/idn/uidna.spp
 
 #
 # Swing plaf resources
 #
 SWING_PLAF_WINDOWS_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows
 COPY_FILES += \
-  $(wildcard $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/*.gif) \
-  $(wildcard $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/*.png)
+    $(wildcard $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/*.gif) \
+    $(wildcard $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/*.png)
 
 ifndef OPENJDK
   SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/com/sun/java/swing/plaf/windows
@@ -88,18 +88,18 @@
   COPY_FILES := $(filter-out $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/JavaCup32.png, $(COPY_FILES))
   # Alter JavaCup32.png from ClosedJDK
   COPY_FILES += \
-    $(SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED)/icons/JavaCup32.png
+      $(SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED)/icons/JavaCup32.png
 endif
 
-ifndef OPENJDK
+ifeq ($(ENABLE_JFR), true)
   JFR_CONFIGURATION_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/oracle/jrockit/jfr/settings
   COPY_FILES += \
-    $(JFR_CONFIGURATION_DIR_CLOSED)/jfc.xsd
+      $(JFR_CONFIGURATION_DIR_CLOSED)/jfc.xsd
 endif
 
 SWING_PLAF_BASIC_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/basic
 COPY_FILES += \
-  $(wildcard $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/*.png)
+    $(wildcard $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/*.png)
 
 ifndef OPENJDK
   SWING_PLAF_BASIC_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/javax/swing/plaf/basic
@@ -107,44 +107,44 @@
   COPY_FILES := $(filter-out $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/JavaCup16.png, $(COPY_FILES))
   # Alter JavaCup16.png from ClosedJDK
   COPY_FILES += \
-    $(SWING_PLAF_BASIC_RESOURCES_DIR_CLOSED)/icons/JavaCup16.png
+      $(SWING_PLAF_BASIC_RESOURCES_DIR_CLOSED)/icons/JavaCup16.png
 endif
 
 ifdef OPENJDK
   SWING_PLAF_MOTIF_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif
   COPY_FILES += \
-    $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.gif) \
-    $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.png)
+      $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.gif) \
+      $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.png)
 else
   SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/com/sun/java/swing/plaf/motif
   COPY_FILES += \
-    $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED)/icons/*.gif) \
-    $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED)/icons/*.png)
+      $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED)/icons/*.gif) \
+      $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED)/icons/*.png)
 endif
 
 SWING_PLAF_METAL_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/metal
 COPY_FILES += \
-  $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/*.gif) \
-  $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/*.png) \
-  $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.gif) \
-  $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.png) \
-  $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/sounds/*.wav)
+    $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/*.gif) \
+    $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/*.png) \
+    $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.gif) \
+    $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.png) \
+    $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/sounds/*.wav)
 
 ifneq ($(OPENJDK_TARGET_OS), windows)
   # Only copy GTK resources on Solaris/Linux
   SWING_PLAF_GTK_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk
   COPY_FILES += \
-    $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/icons/*.gif) \
-    $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/icons/*.png) \
-    $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/resources/metacity/SwingFallbackTheme/metacity-1/*.xml)
+      $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/icons/*.gif) \
+      $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/icons/*.png) \
+      $(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/resources/metacity/SwingFallbackTheme/metacity-1/*.xml)
 endif
 # END: Swing plaf resources
 
 SWING_BEANINFO_RESOURCES_SRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo/images
 SWING_BEANINFO_RESOURCES_SRC = $(wildcard $(SWING_BEANINFO_RESOURCES_SRC_DIR)/*.gif)
-OUT_BEANINFO_RESOURCES = $(patsubst $(SWING_BEANINFO_RESOURCES_SRC_DIR)%,\
-				    $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%,\
-				    $(SWING_BEANINFO_RESOURCES_SRC))
+OUT_BEANINFO_RESOURCES = $(patsubst $(SWING_BEANINFO_RESOURCES_SRC_DIR)%, \
+    $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%, \
+    $(SWING_BEANINFO_RESOURCES_SRC))
 
 COPY_EXTRA += $(OUT_BEANINFO_RESOURCES)
 # END: Swing beaninfo resources
@@ -152,8 +152,8 @@
 # Swing text resources
 SWING_TEXT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/text
 COPY_FILES += \
-  $(SWING_TEXT_RESOURCEDIR)/html/default.css \
-  $(wildcard $(SWING_TEXT_RESOURCEDIR)/rtf/charsets/*.txt)
+    $(SWING_TEXT_RESOURCEDIR)/html/default.css \
+    $(wildcard $(SWING_TEXT_RESOURCEDIR)/rtf/charsets/*.txt)
 
 ##########################################################################################
 #
@@ -166,57 +166,57 @@
 # are uncommented and the configuration file is stored in the output META-INF directory.
 
 # Make sure the output directory is created.
-$(eval $(call MakeDir,$(JDK_OUTPUTDIR)/classes/META-INF/services))
+$(eval $(call MakeDir, $(JDK_OUTPUTDIR)/classes/META-INF/services))
 # Find all META-INF/services/* files
-ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
-ALL_META-INF_DIRS_targetapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF)
+ALL_META-INF_DIRS_share := $(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
+ALL_META-INF_DIRS_targetapi := $(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF)
 # Platform specific overrides shared
-ifneq ($(ALL_META-INF_DIRS_targetapi),)
-    ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_targetapi) \
-	$(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes%,%,$(ALL_META-INF_DIRS_targetapi)),\
-		$(ALL_META-INF_DIRS_share))
+ifneq ($(ALL_META-INF_DIRS_targetapi), )
+  ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_targetapi) \
+      $(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes%,%,$(ALL_META-INF_DIRS_targetapi)), \
+      $(ALL_META-INF_DIRS_share))
 else
-    ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_share)
+  ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_share)
 endif
 
 ifndef OPENJDK
-    ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF
+  ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF
 endif
 
-SRC_SERVICES_FILES:=$(wildcard $(addsuffix /services/*,$(ALL_META-INF_DIRS)))
+SRC_SERVICES_FILES := $(wildcard $(addsuffix /services/*, $(ALL_META-INF_DIRS)))
 
 ifdef OPENJDK
-    SRC_SERVICES_FILES:=$(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES))
-    SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider,$(SRC_SERVICES_FILES))
+  SRC_SERVICES_FILES := $(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine, $(SRC_SERVICES_FILES))
+  SRC_SERVICES_FILES := $(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider, $(SRC_SERVICES_FILES))
 else
-    SRC_SERVICES_FILES:=$(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES))
-    SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider,$(SRC_SERVICES_FILES))
+  SRC_SERVICES_FILES := $(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine, $(SRC_SERVICES_FILES))
+  SRC_SERVICES_FILES := $(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider, $(SRC_SERVICES_FILES))
 endif
 
 # The number of services files are relatively few. If the increase in numbers, then
 # we have to use ListPathsSafelyNow here.
 # Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/classes/META-INF/services/yyyy
 # The \n in the printf command is needed to make sed work on Solaris.
-OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\
-	$(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
-OUT_SERVICES_FILES_COLON:=$(addsuffix :,$(OUT_SERVICES_FILES))
+OUT_SERVICES_FILES := $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
+    $(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
+OUT_SERVICES_FILES_COLON := $(addsuffix :, $(OUT_SERVICES_FILES))
 # Exception handling for print services with no META-INF directory
 SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/*)
-OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\
-	$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/%,%,\
-		$(SRC_SERVICES_FILES_PRINT)))
-OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :,$(OUT_SERVICES_FILES_PRINT))
-RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON),$(SRC_SERVICES_FILES_PRINT))
+OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
+    $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/%, %, \
+    $(SRC_SERVICES_FILES_PRINT)))
+OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :, $(OUT_SERVICES_FILES_PRINT))
+RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON), $(SRC_SERVICES_FILES_PRINT))
 
 # Now setup the dependency rules to generate a META-INF/services/... from the correct source.
-META-INF_RULES_SERVICES:=$(RULES_SERVICES_PRINT) $(join $(OUT_SERVICES_FILES_COLON),$(SRC_SERVICES_FILES))
+META-INF_RULES_SERVICES := $(RULES_SERVICES_PRINT) $(join $(OUT_SERVICES_FILES_COLON), $(SRC_SERVICES_FILES))
 # Eval the newly created rules to incorporate them into the make tree.
 define addto_meta-inf_services
-$1
+  $1
 	echo $(LOG_INFO) Installing META-INF/services/$$(@F)
 	$(CAT) $$< | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $$@
 endef
-$(foreach i,$(META-INF_RULES_SERVICES),$(eval $(call addto_meta-inf_services,$i)))
+$(foreach i, $(META-INF_RULES_SERVICES), $(eval $(call addto_meta-inf_services, $i)))
 # Here is the generic rule, whose receipt the above rules will trigger.
 
 COPY_EXTRA += $(OUT_SERVICES_FILES)
@@ -224,7 +224,7 @@
 
 ###
 
-$(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat : $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs/ext/sjis0213.dat
+$(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat: $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs/ext/sjis0213.dat
 	$(call install-file)
 
 COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat
@@ -234,17 +234,17 @@
 JAVAX_SOUND_SRC := $(JDK_TOPDIR)/src/share/classes/com/sun/media/sound/services
 
 JAVAX_SOUND_SRC_FILES := \
-            javax.sound.midi.spi.MidiDeviceProvider \
-            javax.sound.midi.spi.MidiFileReader \
-            javax.sound.midi.spi.MidiFileWriter \
-            javax.sound.midi.spi.SoundbankReader \
-            javax.sound.sampled.spi.AudioFileReader \
-            javax.sound.sampled.spi.AudioFileWriter \
-            javax.sound.sampled.spi.FormatConversionProvider \
-            javax.sound.sampled.spi.MixerProvider
+    javax.sound.midi.spi.MidiDeviceProvider \
+    javax.sound.midi.spi.MidiFileReader \
+    javax.sound.midi.spi.MidiFileWriter \
+    javax.sound.midi.spi.SoundbankReader \
+    javax.sound.sampled.spi.AudioFileReader \
+    javax.sound.sampled.spi.AudioFileWriter \
+    javax.sound.sampled.spi.FormatConversionProvider \
+    javax.sound.sampled.spi.MixerProvider
 
-COPY_EXTRA += $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,$(JAVAX_SOUND_SRC_FILES))
+COPY_EXTRA += $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, $(JAVAX_SOUND_SRC_FILES))
 
-JAVAX_SOUND_RULES := $(foreach F,$(JAVAX_SOUND_SRC_FILES),$(JDK_OUTPUTDIR)/classes/META-INF/services/$(notdir $F):$(JAVAX_SOUND_SRC)/$F)
+JAVAX_SOUND_RULES := $(foreach F, $(JAVAX_SOUND_SRC_FILES), $(JDK_OUTPUTDIR)/classes/META-INF/services/$(notdir $F):$(JAVAX_SOUND_SRC)/$F)
 
-$(foreach R,$(JAVAX_SOUND_RULES),$(eval $(call addto_meta-inf_services,$R)))
+$(foreach R, $(JAVAX_SOUND_RULES), $(eval $(call addto_meta-inf_services, $R)))
--- a/makefiles/CopySamples.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/CopySamples.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -41,15 +41,15 @@
 
 ifndef OPENJDK
 # Exclude Main.java in EbayClient dir
-    SAMPLE_CLOSED_SOURCE := $(shell $(FIND) $(SAMPLE_CLOSED_SOURCE_DIR) -type f -print | $(GREP) -v EbayClient/Main.java)
-    SAMPLE_CLOSED_TARGET := $(subst $(SAMPLE_CLOSED_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_CLOSED_SOURCE))
-    SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
+  SAMPLE_CLOSED_SOURCE := $(shell $(FIND) $(SAMPLE_CLOSED_SOURCE_DIR) -type f -print | $(GREP) -v EbayClient/Main.java)
+  SAMPLE_CLOSED_TARGET := $(subst $(SAMPLE_CLOSED_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_CLOSED_SOURCE))
+  SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
 endif
 
 ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
-    SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
-    SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
-    SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
+  SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
+  SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
+  SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
 endif
 
 $(SAMPLE_TARGET_DIR)/dtrace/%: $(SAMPLE_SOLARIS_SOURCE_DIR)/dtrace/%
@@ -63,6 +63,6 @@
 
 COPY_FILES += $(SAMPLE_TARGET)
 
-all: $(COPY_FILES) 
+all: $(COPY_FILES)
 
 .PHONY: all
--- a/makefiles/CreateJars.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/CreateJars.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -31,7 +31,7 @@
 default: all
 
 # Prepare the find cache. Only used if running on windows.
-$(eval $(call FillCacheFind,$(JDK_OUTPUTDIR)/classes))
+$(eval $(call FillCacheFind, $(JDK_OUTPUTDIR)/classes))
 
 include Tools.gmk
 
@@ -40,53 +40,53 @@
 #
 # This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
 #
-MAKEFILE=$(JDK_TOPDIR)/makefiles/CreateJars.gmk
+MAKEFILE = $(JDK_TOPDIR)/makefiles/CreateJars.gmk
 #
 # And similarly for the Profiles
-PROFILE_MAKEFILES=$(JDK_TOPDIR)/makefiles/Profiles.gmk $(JDK_TOPDIR)/makefiles/profile-rtjar-includes.txt
+PROFILE_MAKEFILES = $(JDK_TOPDIR)/makefiles/Profiles.gmk $(JDK_TOPDIR)/makefiles/profile-rtjar-includes.txt
 
 MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
 BEANMANIFEST := $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
 
-$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/lib))
+$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/lib))
 
 ##########################################################################################
 
-$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		SUFFIXES:=.class .gif .png .properties,\
-		INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
-		JARMAIN:=sun.tools.jconsole.JConsole,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar,\
-		SKIP_METAINF:=true))
+$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    SUFFIXES := .class .gif .png .properties, \
+    INCLUDES := sun/tools/jconsole com/sun/tools/jconsole, \
+    JARMAIN := sun.tools.jconsole.JConsole, \
+    JAR := $(IMAGES_OUTPUTDIR)/lib/jconsole.jar, \
+    SKIP_METAINF := true))
 
 
 ##########################################################################################
 
-$(eval $(call SetupArchive,BUILD_DNS_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		INCLUDES:=sun/net/spi/nameservice/dns,\
-		EXTRA_FILES:=META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar,\
-		SKIP_METAINF:=true))
+$(eval $(call SetupArchive,BUILD_DNS_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    INCLUDES := sun/net/spi/nameservice/dns, \
+    EXTRA_FILES := META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor, \
+    JAR := $(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar, \
+    SKIP_METAINF := true))
 
 
 ##########################################################################################
 
 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
+    iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
+    th tr uk vi zh
 
-LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/,$(LOCALEDATA_INCLUDE_LOCALES)) \
-		       $(addprefix sun/util/resources/,$(LOCALEDATA_INCLUDE_LOCALES))
+LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/, $(LOCALEDATA_INCLUDE_LOCALES)) \
+    $(addprefix sun/util/resources/, $(LOCALEDATA_INCLUDE_LOCALES))
 
-$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		SUFFIXES:=.class _dict _th,\
-		INCLUDES:=$(LOCALEDATA_INCLUDES),\
-		EXCLUDES:=sun/text/resources/th/BreakIteratorRules_th.class,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar,\
-		SKIP_METAINF:=true))
+$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    SUFFIXES := .class _dict _th, \
+    INCLUDES := $(LOCALEDATA_INCLUDES), \
+    EXCLUDES := sun/text/resources/th/BreakIteratorRules_th.class, \
+    JAR := $(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar, \
+    SKIP_METAINF := true))
 
 ##########################################################################################
 #
@@ -102,123 +102,123 @@
 # This value should exclude types destined for jars other than rt.jar and resources.jar.
 # When building a Profile this value augments the profile specific exclusions
 RT_JAR_EXCLUDES += \
-	com/oracle/security \
-	com/sun/codemodel \
-	com/sun/crypto/provider \
-	com/sun/istack/internal/tools \
-	com/sun/jarsigner \
-	com/sun/java/accessibility \
-	com/sun/javadoc \
-	com/sun/jdi \
-	com/sun/net/ssl/internal/ssl \
-	com/sun/source \
-	com/sun/tools \
-	com/sun/xml/internal/dtdparser \
-	com/sun/xml/internal/rngom \
-	com/sun/xml/internal/xsom \
-	javax/crypto \
-	javax/swing/AbstractButtonBeanInfo.class \
-	javax/swing/beaninfo \
-	javax/swing/BoxBeanInfo.class \
-	javax/swing/JAppletBeanInfo.class \
-	javax/swing/JButtonBeanInfo.class \
-	javax/swing/JCheckBoxBeanInfo.class \
-	javax/swing/JCheckBoxMenuItemBeanInfo.class \
-	javax/swing/JColorChooserBeanInfo.class \
-	javax/swing/JComboBoxBeanInfo.class \
-	javax/swing/JComponentBeanInfo.class \
-	javax/swing/JDesktopPaneBeanInfo.class \
-	javax/swing/JDialogBeanInfo.class \
-	javax/swing/JEditorPaneBeanInfo.class \
-	javax/swing/JFileChooserBeanInfo.class \
-	javax/swing/JFormattedTextFieldBeanInfo.class \
-	javax/swing/JFrameBeanInfo.class \
-	javax/swing/JInternalFrameBeanInfo.class \
-	javax/swing/JLabelBeanInfo.class \
-	javax/swing/JLayeredPaneBeanInfo.class \
-	javax/swing/JListBeanInfo.class \
-	javax/swing/JMenuBarBeanInfo.class \
-	javax/swing/JMenuBeanInfo.class \
-	javax/swing/JMenuItemBeanInfo.class \
-	javax/swing/JOptionPaneBeanInfo.class \
-	javax/swing/JPanelBeanInfo.class \
-	javax/swing/JPasswordFieldBeanInfo.class \
-	javax/swing/JPopupMenuBeanInfo.class \
-	javax/swing/JProgressBarBeanInfo.class \
-	javax/swing/JRadioButtonBeanInfo.class \
-	javax/swing/JRadioButtonMenuItemBeanInfo.class \
-	javax/swing/JScrollBarBeanInfo.class \
-	javax/swing/JScrollPaneBeanInfo.class \
-	javax/swing/JSeparatorBeanInfo.class \
-	javax/swing/JSliderBeanInfo.class \
-	javax/swing/JSpinnerBeanInfo.class \
-	javax/swing/JSplitPaneBeanInfo.class \
-	javax/swing/JTabbedPaneBeanInfo.class \
-	javax/swing/JTableBeanInfo.class \
-	javax/swing/JTextAreaBeanInfo.class \
-	javax/swing/JTextFieldBeanInfo.class \
-	javax/swing/JTextPaneBeanInfo.class \
-	javax/swing/JToggleButtonBeanInfo.class \
-	javax/swing/JToolBarBeanInfo.class \
-	javax/swing/JTreeBeanInfo.class \
-	javax/swing/JWindowBeanInfo.class \
-	javax/swing/SwingBeanInfoBase.class \
-	javax/swing/text/JTextComponentBeanInfo.class \
-	META-INF/services/com.sun.jdi.connect.Connector \
-	META-INF/services/com.sun.jdi.connect.spi.TransportService \
-	META-INF/services/com.sun.tools.attach.spi.AttachProvider \
-	META-INF/services/com.sun.tools.xjc.Plugin \
-	META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
-	org/relaxng/datatype \
-	sun/awt/HKSCS.class \
-	sun/awt/motif/X11GB2312.class \
-	sun/awt/motif/X11GB2312\$$$$Decoder.class \
-	sun/awt/motif/X11GB2312\$$$$Encoder.class \
-	sun/awt/motif/X11GBK.class \
-	sun/awt/motif/X11GBK\$$$$Encoder.class \
-	sun/awt/motif/X11KSC5601.class \
-	sun/awt/motif/X11KSC5601\$$$$Decoder.class \
-	sun/awt/motif/X11KSC5601\$$$$Encoder.class \
-	sun/jvmstat \
-	sun/net/spi/nameservice/dns \
-	sun/nio/cs/ext \
-	sun/rmi/rmic \
-	sun/security/ec \
-	sun/security/internal \
-	sun/security/mscapi \
-	sun/security/pkcs11 \
-	sun/security/provider/Sun.class \
-	sun/security/rsa/SunRsaSign.class \
-	sun/security/ssl \
-	sun/security/tools/jarsigner \
-	sun/swing/BeanInfoUtils.class \
-	sun/text/resources/cldr \
-	sun/tools/asm \
-	sun/tools/attach \
-	sun/tools/java \
-	sun/tools/javac \
-	sun/tools/jcmd \
-	sun/tools/jconsole \
-	sun/tools/jinfo \
-	sun/tools/jmap \
-	sun/tools/jps \
-	sun/tools/jstack \
-	sun/tools/jstat \
-	sun/tools/jstatd \
-	sun/tools/native2ascii \
-	sun/tools/serialver \
-	sun/tools/tree \
-	sun/tools/util \
-	sun/util/cldr/CLDRLocaleDataMetaInfo.class \
-	sun/util/resources/cldr \
-	$(LOCALEDATA_INCLUDES) \
-	com/oracle/jrockit/jfr \
-	oracle/jrockit/jfr \
-	jdk/jfr
+    com/oracle/security \
+    com/sun/codemodel \
+    com/sun/crypto/provider \
+    com/sun/istack/internal/tools \
+    com/sun/jarsigner \
+    com/sun/java/accessibility \
+    com/sun/javadoc \
+    com/sun/jdi \
+    com/sun/net/ssl/internal/ssl \
+    com/sun/source \
+    com/sun/tools \
+    com/sun/xml/internal/dtdparser \
+    com/sun/xml/internal/rngom \
+    com/sun/xml/internal/xsom \
+    javax/crypto \
+    javax/swing/AbstractButtonBeanInfo.class \
+    javax/swing/beaninfo \
+    javax/swing/BoxBeanInfo.class \
+    javax/swing/JAppletBeanInfo.class \
+    javax/swing/JButtonBeanInfo.class \
+    javax/swing/JCheckBoxBeanInfo.class \
+    javax/swing/JCheckBoxMenuItemBeanInfo.class \
+    javax/swing/JColorChooserBeanInfo.class \
+    javax/swing/JComboBoxBeanInfo.class \
+    javax/swing/JComponentBeanInfo.class \
+    javax/swing/JDesktopPaneBeanInfo.class \
+    javax/swing/JDialogBeanInfo.class \
+    javax/swing/JEditorPaneBeanInfo.class \
+    javax/swing/JFileChooserBeanInfo.class \
+    javax/swing/JFormattedTextFieldBeanInfo.class \
+    javax/swing/JFrameBeanInfo.class \
+    javax/swing/JInternalFrameBeanInfo.class \
+    javax/swing/JLabelBeanInfo.class \
+    javax/swing/JLayeredPaneBeanInfo.class \
+    javax/swing/JListBeanInfo.class \
+    javax/swing/JMenuBarBeanInfo.class \
+    javax/swing/JMenuBeanInfo.class \
+    javax/swing/JMenuItemBeanInfo.class \
+    javax/swing/JOptionPaneBeanInfo.class \
+    javax/swing/JPanelBeanInfo.class \
+    javax/swing/JPasswordFieldBeanInfo.class \
+    javax/swing/JPopupMenuBeanInfo.class \
+    javax/swing/JProgressBarBeanInfo.class \
+    javax/swing/JRadioButtonBeanInfo.class \
+    javax/swing/JRadioButtonMenuItemBeanInfo.class \
+    javax/swing/JScrollBarBeanInfo.class \
+    javax/swing/JScrollPaneBeanInfo.class \
+    javax/swing/JSeparatorBeanInfo.class \
+    javax/swing/JSliderBeanInfo.class \
+    javax/swing/JSpinnerBeanInfo.class \
+    javax/swing/JSplitPaneBeanInfo.class \
+    javax/swing/JTabbedPaneBeanInfo.class \
+    javax/swing/JTableBeanInfo.class \
+    javax/swing/JTextAreaBeanInfo.class \
+    javax/swing/JTextFieldBeanInfo.class \
+    javax/swing/JTextPaneBeanInfo.class \
+    javax/swing/JToggleButtonBeanInfo.class \
+    javax/swing/JToolBarBeanInfo.class \
+    javax/swing/JTreeBeanInfo.class \
+    javax/swing/JWindowBeanInfo.class \
+    javax/swing/SwingBeanInfoBase.class \
+    javax/swing/text/JTextComponentBeanInfo.class \
+    META-INF/services/com.sun.jdi.connect.Connector \
+    META-INF/services/com.sun.jdi.connect.spi.TransportService \
+    META-INF/services/com.sun.tools.attach.spi.AttachProvider \
+    META-INF/services/com.sun.tools.xjc.Plugin \
+    META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
+    org/relaxng/datatype \
+    sun/awt/HKSCS.class \
+    sun/awt/motif/X11GB2312.class \
+    sun/awt/motif/X11GB2312\$$$$Decoder.class \
+    sun/awt/motif/X11GB2312\$$$$Encoder.class \
+    sun/awt/motif/X11GBK.class \
+    sun/awt/motif/X11GBK\$$$$Encoder.class \
+    sun/awt/motif/X11KSC5601.class \
+    sun/awt/motif/X11KSC5601\$$$$Decoder.class \
+    sun/awt/motif/X11KSC5601\$$$$Encoder.class \
+    sun/jvmstat \
+    sun/net/spi/nameservice/dns \
+    sun/nio/cs/ext \
+    sun/rmi/rmic \
+    sun/security/ec \
+    sun/security/internal \
+    sun/security/mscapi \
+    sun/security/pkcs11 \
+    sun/security/provider/Sun.class \
+    sun/security/rsa/SunRsaSign.class \
+    sun/security/ssl \
+    sun/security/tools/jarsigner \
+    sun/swing/BeanInfoUtils.class \
+    sun/text/resources/cldr \
+    sun/tools/asm \
+    sun/tools/attach \
+    sun/tools/java \
+    sun/tools/javac \
+    sun/tools/jcmd \
+    sun/tools/jconsole \
+    sun/tools/jinfo \
+    sun/tools/jmap \
+    sun/tools/jps \
+    sun/tools/jstack \
+    sun/tools/jstat \
+    sun/tools/jstatd \
+    sun/tools/native2ascii \
+    sun/tools/serialver \
+    sun/tools/tree \
+    sun/tools/util \
+    sun/util/cldr/CLDRLocaleDataMetaInfo.class \
+    sun/util/resources/cldr \
+    $(LOCALEDATA_INCLUDES) \
+    com/oracle/jrockit/jfr \
+    oracle/jrockit/jfr \
+    jdk/jfr
 
 # Find all files in the classes dir to use as dependencies. This could be more fine granular.
-ALL_FILES_IN_CLASSES := $(call not-containing,_the.,$(filter-out %javac_state,\
-                        $(call CacheFind,$(JDK_OUTPUTDIR)/classes)))
+ALL_FILES_IN_CLASSES := $(call not-containing, _the., $(filter-out %javac_state, \
+    $(call CacheFind, $(JDK_OUTPUTDIR)/classes)))
 
 RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar_manifest
 RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar_manifest
@@ -226,9 +226,9 @@
 $(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
-	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
-	       $(MAINMANIFEST) >> $@.tmp
+	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+	    -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+	    $(MAINMANIFEST) >> $@.tmp
 	$(ECHO) >> $@.tmp
 	$(CAT) $(BEANMANIFEST) >> $@.tmp
 	$(MV) $@.tmp $@
@@ -236,9 +236,9 @@
 $(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
-	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
-	       $(MAINMANIFEST) >> $@.tmp
+	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+	    -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+	    $(MAINMANIFEST) >> $@.tmp
 	$(MV) $@.tmp $@
 
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude: $(MAKEFILE) $(PROFILE_MAKEFILES)
@@ -247,32 +247,32 @@
 	$(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@.tmp)
 	$(MV) $@.tmp $@
 
-$(IMAGES_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
-  $(MAKEFILE)
+$(IMAGES_OUTPUTDIR)/lib/classlist: $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
+    $(MAKEFILE)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(TOOL_ADDJSUM) $< $@.tmp
 	$(MV) $@.tmp $@
 
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
-					 $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
+    $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	($(CD) $(JDK_OUTPUTDIR)/classes && \
-	    $(TOOL_JARREORDER) \
-		-o  $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
+	$(TOOL_JARREORDER) \
+	    -o $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
 	$(MV) $@.tmp $@
 
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
-ifneq ($(PROFILE),)
-#       # Add back classes from excluded packages (fixing the $ substitution in the process)
-	for type in  $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
-	  $(ECHO) $$type >> $@.tmp ; \
-	done
-endif
+        ifneq ($(PROFILE), )
+          # # Add back classes from excluded packages (fixing the $ substitution in the process)
+	  for type in $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
+	    $(ECHO) $$type >> $@.tmp ; \
+	  done
+        endif
 	$(MV) $@.tmp $@
 
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
@@ -281,21 +281,21 @@
 	$(GREP) -v -e '\.class$$' \
 	    -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
 	    $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
-ifneq ($(PROFILE),)
-#       # Strip out all META-INF/services/ entries
-	$(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
-#       # Add back the required services
-#       # FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
-#       # we get a syntax error from sh. That doesn't happen on linux
-	for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
-	  $(ECHO) $$service >> $@.tmp2; \
-	done
-	$(MV) $@.tmp2 $@.tmp
-endif
+        ifneq ($(PROFILE), )
+          # # Strip out all META-INF/services/ entries
+	  $(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
+          # # Add back the required services
+          # # FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
+          # # we get a syntax error from sh. That doesn't happen on linux
+	  for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
+	    $(ECHO) $$service >> $@.tmp2; \
+	  done
+	  $(MV) $@.tmp2 $@.tmp
+        endif
 	$(MV) $@.tmp $@
 
 # This is a hack but I don't know how to make this fit into the existing scheme
-$(PROFILE_VERSION_CLASS_TARGETS) : $(PROFILE_VERSION_JAVA_TARGETS)
+$(PROFILE_VERSION_CLASS_TARGETS): $(PROFILE_VERSION_JAVA_TARGETS)
 	@$(JAVAC) -d $(@D)/../../ $(@D)/$(VERSION_JAVA_FILE)
 
 
@@ -317,102 +317,102 @@
     com/sun/java/util/jar/pack/PackerImpl.class \
     com/sun/java/util/jar/pack/UnpackerImpl.class
 
-ifneq ($(PROFILE),)
-    BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN))
+ifneq ($(PROFILE), )
+  BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN))
 endif
 
 
 RT_JAR_CREATE_OPTIONS := c0fm
 RT_JAR_UPDATE_OPTIONS := u0f
 ifeq ($(COMPRESS_JARS), true)
-    RT_JAR_CREATE_OPTIONS := cfm
-    RT_JAR_UPDATE_OPTIONS := uf
+  RT_JAR_CREATE_OPTIONS := cfm
+  RT_JAR_UPDATE_OPTIONS := uf
 endif
 
 # This defines a target-specific variables to make the shell logic easier to see.
 # We need to find the Version.class file for the profile currently being built
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: \
-  CLASS_FILE = $(if $(PROFILE),$(strip $(foreach class,$(PROFILE_VERSION_CLASS_TARGETS),$(if $(findstring $(PROFILE),$(class)),$(class)))), NO_SUCH_FILE)
+    CLASS_FILE = $(if $(PROFILE), $(strip $(foreach class, $(PROFILE_VERSION_CLASS_TARGETS), $(if $(findstring $(PROFILE), $(class)), $(class)))), NO_SUCH_FILE)
 # This is the real target
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE) $(PROFILE_VERSION_CLASS_TARGETS) $(BEANLESS_CLASSES_TARGETS)
 	$(ECHO) Creating rt.jar $(PROFILE) Compressed=$(COMPRESS_JARS)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(CD) $(JDK_OUTPUTDIR)/classes && \
-	    $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
-	        @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents && \
-	    if [ -f $(CLASS_FILE) ]; then \
-	      $(ECHO)  Updating rt.jar $(PROFILE) && \
-	      $(CD) $(patsubst %$(VERSION_CLASS_PATH),%,$(CLASS_FILE)) && \
-                $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
-	      $(CD) $(BEANLESS_CLASSES) && \
-		$(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(CLASSES_TO_DEBEAN); \
-            fi
+	$(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
+	    @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents && \
+	if [ -f $(CLASS_FILE) ]; then \
+	  $(ECHO) Updating rt.jar $(PROFILE) && \
+	  $(CD) $(patsubst %$(VERSION_CLASS_PATH), %, $(CLASS_FILE)) && \
+	  $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
+	  $(CD) $(BEANLESS_CLASSES) && \
+	  $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(CLASSES_TO_DEBEAN); \
+	fi
 	$(MV) $@.tmp $@
 
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/resources.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents \
-				    $(RESOURCE_JAR_MANIFEST_FILE)
+    $(RESOURCE_JAR_MANIFEST_FILE)
 	$(ECHO) Creating resources.jar
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(CD) $(JDK_OUTPUTDIR)/classes && \
-	    $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
-	        @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents
+	$(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
+	    @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents
 	$(MV) $@.tmp $@
 
 ##########################################################################################
 
 ifneq ($(OPENJDK_TARGET_OS), windows)
-    CHARSETS_EXTRA_FILES:=sun/awt/motif/X11GBK.class \
-                          sun/awt/motif/X11GB2312\$$$$Decoder.class \
-                          sun/awt/motif/X11GB2312.class \
-                          sun/awt/motif/X11KSC5601\$$$$Decoder.class \
-                          sun/awt/motif/X11KSC5601\$$$$Encoder.class \
-                          sun/awt/motif/X11GB2312\$$$$Encoder.class \
-                          sun/awt/motif/X11GBK\$$$$Encoder.class \
-                          sun/awt/motif/X11KSC5601.class
+  CHARSETS_EXTRA_FILES := sun/awt/motif/X11GBK.class \
+      sun/awt/motif/X11GB2312\$$$$Decoder.class \
+      sun/awt/motif/X11GB2312.class \
+      sun/awt/motif/X11KSC5601\$$$$Decoder.class \
+      sun/awt/motif/X11KSC5601\$$$$Encoder.class \
+      sun/awt/motif/X11GB2312\$$$$Encoder.class \
+      sun/awt/motif/X11GBK\$$$$Encoder.class \
+      sun/awt/motif/X11KSC5601.class
 endif
 
-$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes, \
-		SUFFIXES:=.class .dat,\
-		INCLUDES:=sun/nio/cs/ext,\
-		EXTRA_FILES := sun/awt/HKSCS.class \
-			       $(CHARSETS_EXTRA_FILES), \
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
-		SKIP_METAINF := true, \
-                CHECK_COMPRESS_JAR:=true))
+$(eval $(call SetupArchive,BUILD_CHARSETS_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    SUFFIXES := .class .dat, \
+    INCLUDES := sun/nio/cs/ext, \
+    EXTRA_FILES := sun/awt/HKSCS.class \
+        $(CHARSETS_EXTRA_FILES), \
+    JAR := $(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
+    SKIP_METAINF := true, \
+    CHECK_COMPRESS_JAR := true))
 
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(ENABLE_JFR), true)
-    $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		SUFFIXES:=.class .jfc .xsd,\
-		INCLUDES:=com/oracle/jrockit/jfr \
-			  oracle/jrockit/jfr \
-			  jdk/jfr,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
-		SKIP_METAINF:=true,\
-		MANIFEST:=$(MAINMANIFEST), \
-                CHECK_COMPRESS_JAR:=true))
+  ifeq ($(ENABLE_JFR), true)
+    $(eval $(call SetupArchive,BUILD_JFR_JAR, , \
+        SRCS := $(JDK_OUTPUTDIR)/classes, \
+        SUFFIXES := .class .jfc .xsd, \
+        INCLUDES := com/oracle/jrockit/jfr \
+            oracle/jrockit/jfr \
+            jdk/jfr, \
+        JAR := $(IMAGES_OUTPUTDIR)/lib/jfr.jar, \
+        SKIP_METAINF := true, \
+        MANIFEST := $(MAINMANIFEST), \
+        CHECK_COMPRESS_JAR := true))
 
-endif
+  endif
 endif
 
 ##########################################################################################
 
-$(eval $(call SetupArchive,BUILD_JSSE_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		INCLUDES:=sun/security/provider/Sun.class \
-			  sun/security/rsa/SunRsaSign.class \
-			  sun/security/ssl \
-			  com/sun/net/ssl/internal/ssl,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/jsse.jar,\
-		SKIP_METAINF:=true,\
-		MANIFEST:=$(MAINMANIFEST), \
-                CHECK_COMPRESS_JAR:=true))
+$(eval $(call SetupArchive,BUILD_JSSE_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    INCLUDES := sun/security/provider/Sun.class \
+        sun/security/rsa/SunRsaSign.class \
+        sun/security/ssl \
+        com/sun/net/ssl/internal/ssl, \
+    JAR := $(IMAGES_OUTPUTDIR)/lib/jsse.jar, \
+    SKIP_METAINF := true, \
+    MANIFEST := $(MAINMANIFEST), \
+    CHECK_COMPRESS_JAR := true))
 
 ##########################################################################################
 # Create manifest for security jars
@@ -424,9 +424,9 @@
 $(JCE_MANIFEST): $(MAINMANIFEST)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
-	$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#"       \
-               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
-               $(MAINMANIFEST) >> $@.tmp
+	$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
+	    -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+	    $(MAINMANIFEST) >> $@.tmp
 	$(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
 	$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
 	$(MV) $@.tmp $@
@@ -445,23 +445,23 @@
 SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
 SUNPKCS11_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunpkcs11.jar
 
-$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,,\
-	SRCS:=$(JDK_OUTPUTDIR)/classes, \
-	SUFFIXES:=.class,\
-	INCLUDES:=sun/security/pkcs11,\
-	JAR:=$(SUNPKCS11_JAR_UNSIGNED), \
-        MANIFEST:=$(JCE_MANIFEST), \
-	SKIP_METAINF := true))
+$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    SUFFIXES := .class, \
+    INCLUDES := sun/security/pkcs11, \
+    JAR := $(SUNPKCS11_JAR_UNSIGNED), \
+    MANIFEST := $(JCE_MANIFEST), \
+    SKIP_METAINF := true))
 
 $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
 
 ifndef OPENJDK
-    SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
-    $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
+  SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
+  $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
 	$(install-file)
 else
-    $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_UNSIGNED)
+  $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
 	$(install-file)
 endif
 
@@ -472,23 +472,23 @@
 SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
 SUNEC_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunec.jar
 
-$(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes, \
-		SUFFIXES:=.class,\
-		INCLUDES:=sun/security/ec,\
-		JAR:=$(SUNEC_JAR_UNSIGNED), \
-                MANIFEST:=$(JCE_MANIFEST), \
-		SKIP_METAINF := true))
+$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    SUFFIXES := .class, \
+    INCLUDES := sun/security/ec, \
+    JAR := $(SUNEC_JAR_UNSIGNED), \
+    MANIFEST := $(JCE_MANIFEST), \
+    SKIP_METAINF := true))
 
 $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
 
 ifndef OPENJDK
-    SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
-    $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
+  SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
+  $(SUNEC_JAR_DST): $(SUNEC_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
 	$(install-file)
 else
-    $(SUNEC_JAR_DST) : $(SUNEC_JAR_UNSIGNED)
+  $(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
 	$(install-file)
 endif
 
@@ -496,28 +496,28 @@
 
 ##########################################################################################
 
-$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		SUFFIXES:=BeanInfo.class .gif,\
-		INCLUDES:=javax/swing sun/swing,\
-		EXCLUDES:=javax/swing/plaf,\
-		EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/dt.jar,\
-		SKIP_METAINF:=true))
+$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    SUFFIXES := BeanInfo.class .gif, \
+    INCLUDES := javax/swing sun/swing, \
+    EXCLUDES := javax/swing/plaf, \
+    EXTRA_FILES := javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class, \
+    JAR := $(IMAGES_OUTPUTDIR)/lib/dt.jar, \
+    SKIP_METAINF := true))
 
 ##########################################################################################
 
 SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
 SUNJCE_PROVIDER_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunjce_provider.jar
 
-ifneq ($(BUILD_CRYPTO),no)
-  $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes, \
-		SUFFIXES:=.class,\
-		INCLUDES:= com/sun/crypto/provider,\
-		JAR:=$(SUNJCE_PROVIDER_JAR_UNSIGNED), \
-                MANIFEST:=$(JCE_MANIFEST), \
-		SKIP_METAINF := true))
+ifneq ($(BUILD_CRYPTO), no)
+  $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
+      SRCS := $(JDK_OUTPUTDIR)/classes, \
+      SUFFIXES := .class, \
+      INCLUDES := com/sun/crypto/provider, \
+      JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
+      MANIFEST := $(JCE_MANIFEST), \
+      SKIP_METAINF := true))
 
   $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
 
@@ -525,12 +525,12 @@
 endif
 
 ifndef OPENJDK
-    SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
-    $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
+  SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
+  $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
 	$(install-file)
 else
-    $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_UNSIGNED)
+  $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
 	$(install-file)
 endif
 
@@ -539,27 +539,27 @@
 JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
 JCE_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/jce.jar
 
-ifneq ($(BUILD_CRYPTO),no)
-  $(eval $(call SetupArchive,BUILD_JCE_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes, \
-		SUFFIXES:=.class,\
-		INCLUDES:= javax/crypto sun/security/internal,\
-		JAR:=$(JCE_JAR_UNSIGNED), \
-                MANIFEST:=$(JCE_MANIFEST), \
-		SKIP_METAINF := true))
+ifneq ($(BUILD_CRYPTO), no)
+  $(eval $(call SetupArchive,BUILD_JCE_JAR, , \
+      SRCS := $(JDK_OUTPUTDIR)/classes, \
+      SUFFIXES := .class, \
+      INCLUDES := javax/crypto sun/security/internal, \
+      JAR := $(JCE_JAR_UNSIGNED), \
+      MANIFEST := $(JCE_MANIFEST), \
+      SKIP_METAINF := true))
 
   $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
 
-  JARS +=  $(JCE_JAR_UNSIGNED)
+  JARS += $(JCE_JAR_UNSIGNED)
 endif
 
 ifndef OPENJDK
   JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
-  $(JCE_JAR_DST) : $(JCE_JAR_SRC)
+  $(JCE_JAR_DST): $(JCE_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
 	$(install-file)
 else
-  $(JCE_JAR_DST) : $(JCE_JAR_UNSIGNED)
+  $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
 	$(install-file)
 endif
 
@@ -568,28 +568,28 @@
 US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
 US_EXPORT_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/US_export_policy.jar
 
-ifneq ($(BUILD_CRYPTO),no)
+ifneq ($(BUILD_CRYPTO), no)
   #
   # TODO fix so that SetupArchive does not write files into SRCS
-  #   then we don't need this extra copying
+  # then we don't need this extra copying
 
-  # NOTE:  We currently do not place restrictions on our limited export
-  # policy.  This was not a typo.
+  # NOTE: We currently do not place restrictions on our limited export
+  # policy. This was not a typo.
   #
   US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
   US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
 
-  $(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
+  $(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
 	$(install-file)
 
   US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
 
-  $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
-		SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
-		SUFFIXES:= .policy,\
-		JAR:=$(US_EXPORT_POLICY_JAR_UNSIGNED), \
-		EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
-		SKIP_METAINF := true))
+  $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
+      SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
+      SUFFIXES := .policy, \
+      JAR := $(US_EXPORT_POLICY_JAR_UNSIGNED), \
+      EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
+      SKIP_METAINF := true))
 
   JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED)
 endif
@@ -608,10 +608,10 @@
 LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
 LOCAL_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/local_policy.jar
 
-ifneq ($(BUILD_CRYPTO),no)
+ifneq ($(BUILD_CRYPTO), no)
   #
   # TODO fix so that SetupArchive does not write files into SRCS
-  #   then we don't need this extra copying
+  # then we don't need this extra copying
   #
   LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
 
@@ -622,19 +622,19 @@
   else
     LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
     LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
-                             $(LOCAL_POLICY_JAR_TMP)/default_local.policy
+        $(LOCAL_POLICY_JAR_TMP)/default_local.policy
     LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
   endif
 
-  $(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
+  $(LOCAL_POLICY_JAR_TMP)/%: $(LOCAL_POLICY_JAR_SRC_DIR)/%
 	$(install-file)
 
-  $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
-		SRCS:=$(LOCAL_POLICY_JAR_TMP),\
-		SUFFIXES:= .policy,\
-		JAR:=$(LOCAL_POLICY_JAR_UNSIGNED), \
-		EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
-		SKIP_METAINF := true))
+  $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR, $(LOCAL_POLICY_JAR_DEPS), \
+      SRCS := $(LOCAL_POLICY_JAR_TMP), \
+      SUFFIXES := .policy, \
+      JAR := $(LOCAL_POLICY_JAR_UNSIGNED), \
+      EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
+      SKIP_METAINF := true))
 
   JARS += $(LOCAL_POLICY_JAR_UNSIGNED)
 endif
@@ -650,153 +650,153 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
 
-SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
-SUNMSCAPI_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunmscapi.jar
+  SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
+  SUNMSCAPI_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunmscapi.jar
 
-$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes, \
-		SUFFIXES:=.class,\
-		INCLUDES:= sun/security/mscapi,\
-		JAR:=$(SUNMSCAPI_JAR_UNSIGNED), \
-		MANIFEST:=$(JCE_MANIFEST), \
-		SKIP_METAINF:=true))
+  $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
+      SRCS := $(JDK_OUTPUTDIR)/classes, \
+      SUFFIXES := .class, \
+      INCLUDES := sun/security/mscapi, \
+      JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
+      MANIFEST := $(JCE_MANIFEST), \
+      SKIP_METAINF := true))
 
-$(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
+  $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
 
-ifndef OPENJDK
+  ifndef OPENJDK
     SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
-    $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
+    $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
 	$(install-file)
-else
-    $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_UNSIGNED)
+  else
+    $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
 	$(install-file)
-endif
+  endif
 
-JARS += $(SUNMSCAPI_JAR_UNSIGNED)
+  JARS += $(SUNMSCAPI_JAR_UNSIGNED)
 
 endif
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-ifndef OPENJDK
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifndef OPENJDK
 
-UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
-UCRYPTO_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/ucrypto.jar
-UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
+    UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
+    UCRYPTO_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/ucrypto.jar
+    UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
 
-$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes, \
-		SUFFIXES:=.class,\
-		INCLUDES:=com/oracle/security/ucrypto,\
-		JAR:=$(UCRYPTO_JAR_UNSIGNED), \
-		MANIFEST:=$(JCE_MANIFEST), \
-		SKIP_METAINF:=true))
+    $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
+        SRCS := $(JDK_OUTPUTDIR)/classes, \
+        SUFFIXES := .class, \
+        INCLUDES := com/oracle/security/ucrypto, \
+        JAR := $(UCRYPTO_JAR_UNSIGNED), \
+        MANIFEST := $(JCE_MANIFEST), \
+        SKIP_METAINF := true))
 
-$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
+    $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
 
-$(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
+    $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
 	$(install-file)
 
-JARS += $(UCRYPTO_JAR_UNSIGNED)
+    JARS += $(UCRYPTO_JAR_UNSIGNED)
 
-endif
+  endif
 endif
 
 ##########################################################################################
 
 # Get the CLDRVERSION
-include GensrcCLDR.gmk
+include gensrc/GensrcCLDR.gmk
 
 CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
 
-$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		SUFFIXES:=.class,\
-		INCLUDES:=sun/text/resources/cldr \
-			  sun/util/cldr \
-			  sun/util/resources/cldr,\
-		EXCLUDES:=sun/util/cldr/CLDRLocaleProviderAdapter,\
-		JAR:=$(CLDRDATA_JAR_DST),\
-		EXTRA_MANIFEST_ATTR:=CLDR-Version: $(CLDRVERSION),\
-		SKIP_METAINF:=true))
+$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    SUFFIXES := .class, \
+    INCLUDES := sun/text/resources/cldr \
+        sun/util/cldr \
+        sun/util/resources/cldr, \
+    EXCLUDES := sun/util/cldr/CLDRLocaleProviderAdapter, \
+    JAR := $(CLDRDATA_JAR_DST), \
+    EXTRA_MANIFEST_ATTR := CLDR-Version: $(CLDRVERSION), \
+    SKIP_METAINF := true))
 
 ##########################################################################################
 
 TOOLS_JAR_INCLUDES := \
-        com/sun/codemodel       \
-	com/sun/istack/internal/tools       \
-	com/sun/jarsigner	\
-	com/sun/javadoc		\
-	com/sun/jdi		\
-	com/sun/source          \
-	com/sun/tools/attach	\
-	com/sun/tools/classfile \
-	com/sun/tools/corba     \
-	com/sun/tools/doclets   \
-	com/sun/tools/doclint   \
-	com/sun/tools/example/debug/expr \
-	com/sun/tools/example/debug/tty  \
-	com/sun/tools/extcheck  \
-	com/sun/tools/hat       \
-        com/sun/tools/internal/jxc             \
-	com/sun/tools/internal/jxc/ap   \
-	com/sun/tools/internal/ws       \
-	com/sun/tools/internal/ws/wscompile/plugin/at_generated \
-	com/sun/tools/internal/xjc       \
-	com/sun/tools/javac     \
-	com/sun/tools/javadoc   \
-	com/sun/tools/javah     \
-	com/sun/tools/javap     \
-	com/sun/tools/jdeps	\
-	com/sun/tools/jdi	\
-	com/sun/tools/script/shell	\
-	com/sun/xml/internal/dtdparser \
-        com/sun/xml/internal/rngom       \
-        com/sun/xml/internal/xsom       \
-        org/relaxng/datatype   \
-	sun/applet		\
-	sun/jvmstat		\
-	sun/rmi/rmic		\
-	sun/security/tools/jarsigner \
-	sun/tools/asm		\
-	sun/tools/attach	\
-	sun/tools/jar		\
-	sun/tools/java		\
-	sun/tools/javac		\
-	sun/tools/jcmd		\
-	sun/tools/jinfo         \
-	sun/tools/jmap		\
-	sun/tools/jps		\
-	sun/tools/jstack        \
-	sun/tools/jstat		\
-	sun/tools/jstatd	\
-	sun/tools/native2ascii	\
-	sun/tools/serialver	\
-	sun/tools/tree		\
-	sun/tools/util
+    com/sun/codemodel \
+    com/sun/istack/internal/tools \
+    com/sun/jarsigner \
+    com/sun/javadoc \
+    com/sun/jdi \
+    com/sun/source \
+    com/sun/tools/attach \
+    com/sun/tools/classfile \
+    com/sun/tools/corba \
+    com/sun/tools/doclets \
+    com/sun/tools/doclint \
+    com/sun/tools/example/debug/expr \
+    com/sun/tools/example/debug/tty \
+    com/sun/tools/extcheck \
+    com/sun/tools/hat \
+    com/sun/tools/internal/jxc \
+    com/sun/tools/internal/jxc/ap \
+    com/sun/tools/internal/ws \
+    com/sun/tools/internal/ws/wscompile/plugin/at_generated \
+    com/sun/tools/internal/xjc \
+    com/sun/tools/javac \
+    com/sun/tools/javadoc \
+    com/sun/tools/javah \
+    com/sun/tools/javap \
+    com/sun/tools/jdeps \
+    com/sun/tools/jdi \
+    com/sun/tools/script/shell \
+    com/sun/xml/internal/dtdparser \
+    com/sun/xml/internal/rngom \
+    com/sun/xml/internal/xsom \
+    org/relaxng/datatype \
+    sun/applet \
+    sun/jvmstat \
+    sun/rmi/rmic \
+    sun/security/tools/jarsigner \
+    sun/tools/asm \
+    sun/tools/attach \
+    sun/tools/jar \
+    sun/tools/java \
+    sun/tools/javac \
+    sun/tools/jcmd \
+    sun/tools/jinfo \
+    sun/tools/jmap \
+    sun/tools/jps \
+    sun/tools/jstack \
+    sun/tools/jstat \
+    sun/tools/jstatd \
+    sun/tools/native2ascii \
+    sun/tools/serialver \
+    sun/tools/tree \
+    sun/tools/util
 
 # The sjavac tools is not ready for public consumption.
-TOOLS_JAR_EXCLUDES=com/sun/tools/sjavac
+TOOLS_JAR_EXCLUDES = com/sun/tools/sjavac
 
-$(eval $(call SetupArchive,BUILD_TOOLS_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		SUFFIXES:=.class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
-			  Tool aliasmap options,\
-		INCLUDES:=$(TOOLS_JAR_INCLUDES),\
-		EXCLUDES:=$(TOOLS_JAR_EXCLUDES),\
-		EXTRA_FILES:=META-INF/services/com.sun.jdi.connect.Connector \
-			     META-INF/services/com.sun.jdi.connect.spi.TransportService \
-			     META-INF/services/com.sun.tools.attach.spi.AttachProvider \
-			     META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
-			     META-INF/services/com.sun.tools.internal.xjc.Plugin,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/tools.jar,\
-		SKIP_METAINF:=true, \
-                CHECK_COMPRESS_JAR:=true))
+$(eval $(call SetupArchive,BUILD_TOOLS_JAR, , \
+    SRCS := $(JDK_OUTPUTDIR)/classes, \
+    SUFFIXES := .class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
+        Tool aliasmap options, \
+    INCLUDES := $(TOOLS_JAR_INCLUDES), \
+    EXCLUDES := $(TOOLS_JAR_EXCLUDES), \
+    EXTRA_FILES := META-INF/services/com.sun.jdi.connect.Connector \
+        META-INF/services/com.sun.jdi.connect.spi.TransportService \
+        META-INF/services/com.sun.tools.attach.spi.AttachProvider \
+        META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
+        META-INF/services/com.sun.tools.internal.xjc.Plugin, \
+    JAR := $(IMAGES_OUTPUTDIR)/lib/tools.jar, \
+    SKIP_METAINF := true, \
+    CHECK_COMPRESS_JAR := true))
 
 
 ##########################################################################################
@@ -816,9 +816,9 @@
 # Swing has taken this approach only as a temporary measure to avoid
 # the compiler warnings until we can properly document these packages.
 # This is covered under 6491853.
-EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows  \
-                        com.sun.java.swing.plaf.motif    \
-                        com.sun.java.swing.plaf.gtk
+EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
+    com.sun.java.swing.plaf.motif \
+    com.sun.java.swing.plaf.gtk
 
 #
 # Include the exported private packages in ct.sym.
@@ -826,7 +826,7 @@
 # with a new module system (being discussed for JDK 8).
 #
 EXPORTED_PRIVATE_PKGS = com.oracle.net \
-                        com.oracle.nio
+    com.oracle.nio
 
 $(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
 	$(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
@@ -841,50 +841,50 @@
 	    $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
 	$(TOUCH) $@
 
-$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/symbols))
-$(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
-		SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
-		INCLUDES:=META-INF/sym,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ct.sym, \
-		CHECK_COMPRESS_JAR:=true))
+$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/symbols))
+$(eval $(call SetupArchive,BUILD_CT_SYM, $(IMAGES_OUTPUTDIR)/symbols/_the.symbols, \
+    SRCS := $(IMAGES_OUTPUTDIR)/symbols, \
+    INCLUDES := META-INF/sym, \
+    JAR := $(IMAGES_OUTPUTDIR)/lib/ct.sym, \
+    CHECK_COMPRESS_JAR := true))
 
 
 ##########################################################################################
 
 SRC_ZIP_INCLUDES = \
-	com/sun/corba			\
-	com/sun/image/codec/jpeg	\
-	com/sun/imageio                 \
-	com/sun/java_cup		\
-	com/sun/javadoc			\
-	com/sun/java/swing		\
-	com/sun/jmx			\
-	com/sun/naming			\
-	com/sun/org/apache		\
-	com/sun/security/auth		\
-	com/sun/security/jgss		\
-	com/sun/source			\
-	java				\
-	javax/accessibility		\
-	javax/annotation		\
-	javax/imageio			\
-	javax/lang			\
-	javax/management		\
-	javax/naming			\
-	javax/print			\
-	javax/rmi			\
-	javax/script			\
-	javax/security			\
-	javax/sound			\
-	javax/sql			\
-	javax/swing			\
-	javax/tools			\
-	javax/xml			\
-	org/ietf			\
-	org/omg				\
-	org/w3c/dom			\
-	org/xml/sax			\
-        #
+    com/sun/corba \
+    com/sun/image/codec/jpeg \
+    com/sun/imageio \
+    com/sun/java_cup \
+    com/sun/javadoc \
+    com/sun/java/swing \
+    com/sun/jmx \
+    com/sun/naming \
+    com/sun/org/apache \
+    com/sun/security/auth \
+    com/sun/security/jgss \
+    com/sun/source \
+    java \
+    javax/accessibility \
+    javax/annotation \
+    javax/imageio \
+    javax/lang \
+    javax/management \
+    javax/naming \
+    javax/print \
+    javax/rmi \
+    javax/script \
+    javax/security \
+    javax/sound \
+    javax/sql \
+    javax/swing \
+    javax/tools \
+    javax/xml \
+    org/ietf \
+    org/omg \
+    org/w3c/dom \
+    org/xml/sax \
+    #
 
 SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
 SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
@@ -897,10 +897,10 @@
 # Need to copy launcher src files into desired directory structure
 # before zipping the sources.
 LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
-                      $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/java_md*)
-LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
-		    $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
-			$(LAUNCHER_SRC_FILES)))
+    $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/java_md*)
+LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%, $(IMAGES_OUTPUTDIR)/src/launcher/%, \
+    $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%, $(IMAGES_OUTPUTDIR)/src/launcher/%, \
+    $(LAUNCHER_SRC_FILES)))
 
 $(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
 	$(install-file)
@@ -911,76 +911,76 @@
 $(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
 
 # This dir needs to exist before macro is evaluated to avoid warning from find.
-$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/src))
-$(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
-		SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
-		INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
-		EXCLUDES:=javax/swing/beaninfo,\
-		SUFFIXES:=.java .c .h,\
-		ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
-		EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))
+$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/src))
+$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
+    SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
+    INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
+    EXCLUDES := javax/swing/beaninfo, \
+    SUFFIXES := .java .c .h, \
+    ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
+    EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
 
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
+  ifeq ($(OPENJDK_TARGET_OS), windows)
 
-    $(eval $(call SetupArchive,BUILD_JACCESS_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		INCLUDES:=com/sun/java/accessibility/util,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar,\
-		SKIP_METAINF:=true))
+    $(eval $(call SetupArchive,BUILD_JACCESS_JAR, , \
+        SRCS := $(JDK_OUTPUTDIR)/classes, \
+        INCLUDES := com/sun/java/accessibility/util, \
+        JAR := $(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar, \
+        SKIP_METAINF := true))
 
     JARS += $(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar
 
     ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/32bit,\
-		INCLUDES:=com/sun/java/accessibility,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar,\
-		SKIP_METAINF:=true))
+      $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR, , \
+          SRCS := $(JDK_OUTPUTDIR)/classes_ab/32bit, \
+          INCLUDES := com/sun/java/accessibility, \
+          JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar, \
+          SKIP_METAINF := true))
 
-        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/legacy,\
-		INCLUDES:=com/sun/java/accessibility,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar,\
-		SKIP_METAINF:=true))
+      $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR, , \
+          SRCS := $(JDK_OUTPUTDIR)/classes_ab/legacy, \
+          INCLUDES := com/sun/java/accessibility, \
+          JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar, \
+          SKIP_METAINF := true))
 
-        JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar \
-		$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
+      JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar \
+          $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
     else
-        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/64bit,\
-		INCLUDES:=com/sun/java/accessibility,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar,\
-		SKIP_METAINF:=true))
+      $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR, , \
+          SRCS := $(JDK_OUTPUTDIR)/classes_ab/64bit, \
+          INCLUDES := com/sun/java/accessibility, \
+          JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar, \
+          SKIP_METAINF := true))
 
-        JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar
+      JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar
     endif
-endif
+  endif
 endif
 
 ##########################################################################################
 
 #
 # This is an empty jar (only contains manifest) and fits poorly into framework...
-#   create simple rule instead
+# create simple rule instead
 #
-$(IMAGES_OUTPUTDIR)/lib/management-agent.jar : $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
+$(IMAGES_OUTPUTDIR)/lib/management-agent.jar: $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
 	$(JAR) cfm $@ $<
 
 ##########################################################################################
 
-$(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar : $(JDK_OUTPUTDIR)/demo/nio/zipfs/zipfs.jar
+$(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar: $(JDK_OUTPUTDIR)/demo/nio/zipfs/zipfs.jar
 	$(install-file)
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-    $(eval $(call SetupArchive,BUILD_JOBJC_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/jobjc_classes,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \
-		JARINDEX:=true))
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  $(eval $(call SetupArchive,BUILD_JOBJC_JAR, , \
+      SRCS := $(JDK_OUTPUTDIR)/jobjc_classes, \
+      JAR := $(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \
+      JARINDEX := true))
 endif
 
 # This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
@@ -993,25 +993,25 @@
 #
 # sec-bin.zip is used by builds where the corresponding sources are not available
 #
-$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP,\
-		SRC:=$(JDK_OUTPUTDIR),\
-		INCLUDES:=classes/javax/net \
-			  classes/javax/security/cert \
-			  classes/com/sun/net/ssl \
-			  classes/com/sun/security/cert \
-			  classes/sun/net/www/protocol/https \
-			  classes/sun/security/pkcs12 \
-			  classes/sun/security/ssl \
-			  classes/sun/security/krb5 \
-			  classes/sun/security/krb5/internal \
-			  classes/sun/security/krb5/internal/ccache \
-			  classes/sun/security/krb5/internal/crypto \
-			  classes/sun/security/krb5/internal/ktab \
-			  classes/sun/security/krb5/internal/rcache \
-			  classes/sun/security/krb5/internal/util,\
-		INCLUDE_FILES:=classes/sun/security/jgss/spi/GSSContextSpi.class,\
-		EXCLUDES:=classes/sun/security/krb5/internal/tools,\
-		ZIP:=$(IMAGES_OUTPUTDIR)/sec-bin.zip))
+$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \
+    SRC := $(JDK_OUTPUTDIR), \
+    INCLUDES := classes/javax/net \
+        classes/javax/security/cert \
+        classes/com/sun/net/ssl \
+        classes/com/sun/security/cert \
+        classes/sun/net/www/protocol/https \
+        classes/sun/security/pkcs12 \
+        classes/sun/security/ssl \
+        classes/sun/security/krb5 \
+        classes/sun/security/krb5/internal \
+        classes/sun/security/krb5/internal/ccache \
+        classes/sun/security/krb5/internal/crypto \
+        classes/sun/security/krb5/internal/ktab \
+        classes/sun/security/krb5/internal/rcache \
+        classes/sun/security/krb5/internal/util, \
+    INCLUDE_FILES := classes/sun/security/jgss/spi/GSSContextSpi.class, \
+    EXCLUDES := classes/sun/security/krb5/internal/tools, \
+    ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip))
 
 JARS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
 
@@ -1019,30 +1019,30 @@
 #
 # Windows specific binary security packages.
 #
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    # sec-windows-bin.zip is used by builds where the corresponding sources are not available
-    $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP,\
-		SRC:=$(JDK_OUTPUTDIR),\
-		INCLUDES:=classes/sun/security/krb5/internal/tools,\
-		ZIP:=$(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  # sec-windows-bin.zip is used by builds where the corresponding sources are not available
+  $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
+      SRC := $(JDK_OUTPUTDIR), \
+      INCLUDES := classes/sun/security/krb5/internal/tools, \
+      ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))
 
-    JARS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
+  JARS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
 
-    # JGSS files contain the native Kerberos library
-    ifeq ($(OPENJDK_TARGET_CPU),x86_64)
-        JGSS_ZIP_NAME=jgss-windows-x64-bin.zip
-    else
-        JGSS_ZIP_NAME=jgss-windows-i586-bin.zip
-    endif
+  # JGSS files contain the native Kerberos library
+  ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+    JGSS_ZIP_NAME = jgss-windows-x64-bin.zip
+  else
+    JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
+  endif
 
-    $(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP,\
-		SRC:=$(JDK_OUTPUTDIR),\
-		INCLUDE_FILES:=bin/w2k_lsa_auth.dll \
-			       bin/w2k_lsa_auth.map \
-			       bin/w2k_lsa_auth.pdb,\
-		ZIP:=$(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))
+  $(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP, \
+      SRC := $(JDK_OUTPUTDIR), \
+      INCLUDE_FILES := bin/w2k_lsa_auth.dll \
+          bin/w2k_lsa_auth.map \
+          bin/w2k_lsa_auth.pdb, \
+      ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))
 
-    JARS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
+  JARS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
 endif
 
 ##########################################################################################
--- a/makefiles/GendataBreakIterator.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-#
-# Make file for generating BreakIterator data files.
-#
-
-# input
-#
-#   Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
-#     They are used at JDK build phase in order to create $(BIFILES) which
-#     are used on runtime instead.
-#
-TEXT_SRCDIR = $(JDK_TOPDIR)/src/share/classes
-TEXT_PKG  = sun/text/resources
-TEXT_SOURCES = 	$(TEXT_PKG)/BreakIteratorRules.java \
-		$(TEXT_PKG)/BreakIteratorInfo.java \
-		$(TEXT_PKG)/th/BreakIteratorRules_th.java \
-		$(TEXT_PKG)/th/BreakIteratorInfo_th.java
-
-# Generate BreakIteratorData
-BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator
-BREAK_ITERATOR_CLASSES = $(BREAK_ITERATOR_DIR)/classes
-
-# JAVAC_SOURCE_PATH_UGLY_OVERRIDE is set to isolate the compile to just those
-# two files in that directory and not get anything implicit from
-# surrounding directories which aren't jdk 6 compatible. 
-# Because we are targeting jdk 6, but the surrounding source code is jdk 7. Ugh.
-# These two files should be moved out to a build tool! We have to disable
-# sjavac here as well.
-$(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR,\
-		SETUP:=GENERATE_OLDBYTECODE,\
-		SRC:=$(TEXT_SRCDIR),\
-		DISABLE_SJAVAC:=true,\
-		JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=$(TEXT_SRCDIR)/$(TEXT_PKG),\
-		INCLUDES:=$(TEXT_PKG),\
-		INCLUDE_FILES:=$(TEXT_SOURCES),\
-		BIN:=$(BREAK_ITERATOR_CLASSES)))
-
-# Generate data resource files.
-# input
-UNICODEDATA  = $(JDK_TOPDIR)/make/tools/UnicodeData/UnicodeData.txt
-
-# output
-DATA_PKG_DIR = $(JDK_OUTPUTDIR)/classes/sun/text/resources
-BIFILES	= 	$(DATA_PKG_DIR)/CharacterBreakIteratorData \
-		$(DATA_PKG_DIR)/WordBreakIteratorData \
-		$(DATA_PKG_DIR)/LineBreakIteratorData \
-		$(DATA_PKG_DIR)/SentenceBreakIteratorData
-BIFILES_TH =	$(DATA_PKG_DIR)/th/WordBreakIteratorData_th \
-		$(DATA_PKG_DIR)/th/LineBreakIteratorData_th
-
-$(BIFILES): $(DATA_PKG_DIR)/_the.bifiles
-$(DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
-$(DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
-	$(ECHO) $(LOG_INFO) "Generating BreakIteratorData"
-	$(MKDIR) -p  $(DATA_PKG_DIR)
-	$(RM) $(BIFILES)
-	$(TOOL_GENERATEBREAKITERATORDATA) \
-		-o $(DATA_PKG_DIR) \
-		-spec $(UNICODEDATA)
-	$(TOUCH) $@
-
-$(BIFILES_TH): $(DATA_PKG_DIR)/_the.bifiles_th
-$(DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
-$(DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
-	$(ECHO) $(LOG_INFO) "Generating BreakIteratorData_th"
-	$(MKDIR) -p  $(DATA_PKG_DIR)/th
-	$(RM) $(BIFILES_TH)
-	$(TOOL_GENERATEBREAKITERATORDATA) \
-		-o $(DATA_PKG_DIR) \
-		-spec $(UNICODEDATA) \
-		-language th
-	$(TOUCH) $@
-
-
-BREAK_ITERATOR += $(BIFILES) $(BIFILES_TH)
--- a/makefiles/GendataFontConfig.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-GENDATA_FONT_CONFIG_DST := $(JDK_OUTPUTDIR)/lib
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-  GENDATA_FONT_CONFIG_SRC_DIR    := $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows
-  GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
-  GENDATA_FONT_CONFIG_SRC_PREFIX := 
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), linux)
-  GENDATA_FONT_CONFIG_SRC_PREFIX := linux.
-  ifdef OPENJDK
-    GENDATA_FONT_CONFIG_SRC_DIR   := \
-        $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
-    # This is placeholder for possible fonconfig files which may
-    # useful for some highly specialized Linux distributions 
-    GENDATA_FONT_CONFIG_SRC_FILES := 
-  else
-    GENDATA_FONT_CONFIG_SRC_DIR   := \
-        $(JDK_TOPDIR)/src/closed/solaris/classes/sun/awt/fontconfigs
-    GENDATA_FONT_CONFIG_SRC_FILES := \
-	fontconfig.properties				\
-	fontconfig.RedHat.5.properties			\
-	fontconfig.RedHat.6.properties			\
-	fontconfig.Turbo.properties			\
-	fontconfig.SuSE.10.properties                   \
-	fontconfig.SuSE.11.properties
-  endif
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  GENDATA_FONT_CONFIG_SRC_DIR    := \
-      $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
-  GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
-  GENDATA_FONT_CONFIG_SRC_PREFIX := solaris.
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  GENDATA_FONT_CONFIG_SRC_DIR    := \
-      $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
-  GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
-  GENDATA_FONT_CONFIG_SRC_PREFIX := macosx.
-endif
-
-###
-
-$(GENDATA_FONT_CONFIG_DST)/%.src : \
-    $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%
-	$(call install-file)
-
-$(GENDATA_FONT_CONFIG_DST)/%.bfc : \
-    $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(TOOL_COMPILEFONTCONFIG) $< $@
-	$(CHMOD) 444 $@
-
-###
-
-GENDATA_FONT_CONFIGS := $(GENDATA_FONT_CONFIG_SRC_FILES:%=$(GENDATA_FONT_CONFIG_DST)/%.src)
-GENDATA_BFONT_CONFIGS := $(GENDATA_FONT_CONFIG_SRC_FILES:%.properties=$(GENDATA_FONT_CONFIG_DST)/%.bfc)
-
-GENDATA_FONT_CONFIG := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
-
-###
-
--- a/makefiles/GendataHtml32dtd.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-GENDATA_HTML32DTD := 
-
-HTML32DTD = $(JDK_OUTPUTDIR)/classes/javax/swing/text/html/parser/html32.bdtd
-$(HTML32DTD): $(BUILD_TOOLS)
-	$(ECHO) "Generating HTML DTD file"
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1
-
-GENDATA_HTML32DTD += $(HTML32DTD)
--- a/makefiles/GendataTZDB.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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.
-#
-
-GENDATA_TZDB :=
-
-#
-# Time zone data file creation
-#
-TZDATA_DIR := $(JDK_TOPDIR)/make/sun/javazic/tzdata
-TZDATA_TZFILE := africa antarctica asia australasia europe northamerica pacificnew southamerica backward etcetera gmt jdk11_backward
-TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE))
-
-GENDATA_TZDB_DAT := $(JDK_OUTPUTDIR)/lib/tzdb.dat
-
-$(GENDATA_TZDB_DAT) : $(TZDATA_TZFILES)
-	$(RM) $(GENDATA_TZDB_DAT)
-	$(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE)
-
-GENDATA_TZDB += $(GENDATA_TZDB_DAT)
--- a/makefiles/GendataTimeZone.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-GENDATA_TIMEZONE :=
-
-# TODO: read from make/sun/javazic/tzdata/VERSION
-GENDATA_TIMEZONE_VERSION := tzdata2012i
-
-GENDATA_TIMEZONE_DST := $(JDK_OUTPUTDIR)/lib/zi
-GENDATA_TIMEZONE_TMP := $(JDK_OUTPUTDIR)/gendata_timezone
-
-TZFILE0 := \
-    africa antarctica asia australasia europe northamerica \
-    pacificnew southamerica backward \
-    etcetera systemv
-
-TZFILE1 := \
-    gmt jdk11_backward
-
-TZFILES := \
-    $(addprefix $(JDK_TOPDIR)/make/sun/javazic/tzdata/,$(TZFILE0)) \
-    $(addprefix $(JDK_TOPDIR)/make/sun/javazic/tzdata_jdk/,$(TZFILE1))
-
-GENDATA_TIMEZONE_MAPFILE:=ZoneInfoMappings
-
-$(GENDATA_TIMEZONE_DST)/$(GENDATA_TIMEZONE_MAPFILE) : $(TZFILES)
-	$(RM) -r $(GENDATA_TIMEZONE_TMP)
-	$(MKDIR) -p $(GENDATA_TIMEZONE_TMP)
-	$(RM) -r $(GENDATA_TIMEZONE_DST)
-	$(MKDIR) -p $(GENDATA_TIMEZONE_DST)
-	$(TOOL_JAVAZIC) -V "$(GENDATA_TIMEZONE_VERSION)" -d $(GENDATA_TIMEZONE_TMP) $(TZFILES)
-	$(CP) -r $(GENDATA_TIMEZONE_TMP)/* $(GENDATA_TIMEZONE_DST)/
-
-GENDATA_TIMEZONE += $(GENDATA_TIMEZONE_DST)/$(GENDATA_TIMEZONE_MAPFILE)
--- a/makefiles/GenerateClasses.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/GenerateClasses.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -28,69 +28,92 @@
 include $(SPEC)
 include MakeBase.gmk
 include RMICompilation.gmk
+include JavaCompilation.gmk
+include Setup.gmk
 
-# To ensure the latest stub generator files are picked up from corba repo
-# when available, we need to run with latest rmic version available. 
-ifneq ($(COMPILE_TYPE),cross)
-    RMIC := $(FIXPATH) $(JDK_OUTPUTDIR)/bin/rmic
-endif  
+##########################################################################################
+
+RMIC_PKGS := \
+    sun/rmi/rmic \
+    sun/tools/asm \
+    sun/tools/java \
+    sun/tools/javac \
+    sun/tools/tree \
+    sun/tools/util \
+    #
+
+$(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_RMIC, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    SRC := $(JDK_TOPDIR)/src/share/classes, \
+    INCLUDES := $(RMIC_PKGS), \
+    BIN := $(JDK_OUTPUTDIR)/btclasses_rmic, \
+    COPY := .properties, \
+    JAVAC_SOURCE_PATH_OVERRIDE := $(addprefix $(JDK_TOPDIR)/src/share/classes/, $(RMIC_PKGS))))
+
+##########################################################################################
+
+BTRMIC_CP := $(CORBA_OUTPUTDIR)/btjars/btcorba.jar$(PATH_SEP)$(JDK_OUTPUTDIR)/btclasses_rmic$(PATH_SEP)$(BOOTSTRAP_JAVAC_JAR)
+BTRMIC_ARGS := "-Xbootclasspath/p:$(BTRMIC_CP)" -cp "$(BTRMIC_CP)"
+RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
 
 CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
-# NOTE: If the smart javac dependency management is reintroduced, these classes risk 
+# NOTE: If the smart javac dependency management is reintroduced, these classes risk
 # interfering with the dependency checking. In that case they will need to be kept separate.
 STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
 RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
 
-GENCLASSES :=
+GENCLASSES := 
 
 ##########################################################################################
 #
 # Generate RMI stubs
 #
 
-$(eval $(call SetupRMICompilation,RMI_12,\
-		CLASSES:=sun.rmi.server.Activation$$$$ActivationSystemImpl\
-			 java.rmi.activation.ActivationGroup\
-			 com.sun.jndi.rmi.registry.ReferenceWrapper,\
-		CLASSES_DIR:=$(CLASSES_DIR),\
-		STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
-		RUN_V12:=true))
+$(eval $(call SetupRMICompilation,RMI_12, \
+    CLASSES := sun.rmi.server.Activation$$$$ActivationSystemImpl \
+        java.rmi.activation.ActivationGroup \
+        com.sun.jndi.rmi.registry.ReferenceWrapper, \
+    CLASSES_DIR := $(CLASSES_DIR), \
+    STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
+    RUN_V12 := true))
 GENCLASSES += $(RMI_12)
 
-$(eval $(call SetupRMICompilation,RMI_11,\
-		CLASSES:=sun.rmi.registry.RegistryImpl\
-			 sun.rmi.transport.DGCImpl,\
-		CLASSES_DIR:=$(CLASSES_DIR),\
-		STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
-		RUN_V11:=true))
+$(eval $(call SetupRMICompilation,RMI_11, \
+    CLASSES := sun.rmi.registry.RegistryImpl \
+        sun.rmi.transport.DGCImpl, \
+    CLASSES_DIR := $(CLASSES_DIR), \
+    STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
+    RUN_V11 := true))
 GENCLASSES += $(RMI_11)
 
 # For RMI/IIOP call rmic a second time with -standardPackage option
 # so that *_tie classes are generated in package without the prefix
 # org.omg.stub (6375696)
-JMAN_RMI_CLASSES:=javax.management.remote.rmi.RMIConnectionImpl\
-		  javax.management.remote.rmi.RMIServerImpl
-$(eval $(call SetupRMICompilation,RMI_IIOP,\
-		CLASSES:=$(JMAN_RMI_CLASSES),\
-		CLASSES_DIR:=$(CLASSES_DIR),\
-		STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
-		RUN_V12:=true,\
-		RUN_IIOP:=true,\
-		RUN_IIOP_STDPKG:=true))
+JMAN_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
+    javax.management.remote.rmi.RMIServerImpl
+$(eval $(call SetupRMICompilation,RMI_IIOP, \
+    CLASSES := $(JMAN_RMI_CLASSES), \
+    CLASSES_DIR := $(CLASSES_DIR), \
+    STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
+    RUN_V12 := true, \
+    RUN_IIOP := true, \
+    RUN_IIOP_STDPKG := true))
 GENCLASSES += $(RMI_IIOP)
 
 # Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR
 # so that javadoc can include them in the API (4997471)
-$(eval $(call SetupRMICompilation,RMI_SRC,\
-		CLASSES:=$(JMAN_RMI_CLASSES),\
-		CLASSES_DIR:=$(CLASSES_DIR),\
-		STUB_CLASSES_DIR:=$(RMIC_GENSRC_DIR),\
-		RUN_V12:=true,\
-		KEEP_GENERATED:=true))
-GENCLASSES += $(filter %.java,$(RMI_SRC))
+$(eval $(call SetupRMICompilation,RMI_SRC, \
+    CLASSES := $(JMAN_RMI_CLASSES), \
+    CLASSES_DIR := $(CLASSES_DIR), \
+    STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \
+    RUN_V12 := true, \
+    KEEP_GENERATED := true))
+GENCLASSES += $(filter %.java, $(RMI_SRC))
 
 ##########################################################################################
 
+$(RMI_12) $(RMI_11) $(RMI_IIOP) $(RMI_SRC): $(BUILD_BOOTSTRAP_RMIC)
+
 $(RMIC_GENSRC_DIR)/_the.classes.removed: $(GENCLASSES)
 	$(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
 	$(TOUCH) $@
--- a/makefiles/GenerateData.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/GenerateData.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -38,16 +38,16 @@
 # These are written directly into classes dir.
 GENDATA :=
 
-include GendataBreakIterator.gmk
+include gendata/GendataBreakIterator.gmk
 GENDATA += $(BREAK_ITERATOR)
 
-include GendataFontConfig.gmk
+include gendata/GendataFontConfig.gmk
 GENDATA += $(GENDATA_FONT_CONFIG)
 
-include GendataTZDB.gmk
+include gendata/GendataTZDB.gmk
 GENDATA += $(GENDATA_TZDB)
 
-include GendataHtml32dtd.gmk
+include gendata/GendataHtml32dtd.gmk
 GENDATA += $(GENDATA_HTML32DTD)
 
 ##########################################################################################
@@ -75,9 +75,9 @@
 
 ##########################################################################################
 
-$(GENDATA) : $(BUILD_TOOLS)
+$(GENDATA): $(BUILD_TOOLS)
 
-$(JDK_OUTPUTDIR)/classes/_the.gendata : $(GENDATA)
+$(JDK_OUTPUTDIR)/classes/_the.gendata: $(GENDATA)
 	$(TOUCH) $@
 
 all: $(JDK_OUTPUTDIR)/classes/_the.gendata
--- a/makefiles/GenerateJavaSources.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-include NativeCompilation.gmk
-
-# Setup the java compilers for the JDK build.
-include Setup.gmk
-# We need the tools.
-include Tools.gmk
-
-# Now include all the rules that generate Java sources.
-# The Java sources are written into the gensrc_.... directories.
-
-include GensrcProperties.gmk
-GENSRC += $(GENSRC_PROPERTIES)
-
-include GensrcLocaleDataMetaInfo.gmk
-GENSRC += $(GENSRC_LOCALEDATAMETAINFO)
-
-include GensrcCharacterData.gmk
-GENSRC += $(GENSRC_CHARACTERDATA)
-
-include GensrcJDWP.gmk
-GENSRC += $(GENSRC_JDWP)
-
-include GensrcMisc.gmk
-GENSRC += $(GENSRC_MISC)
-
-include GensrcCharsetMapping.gmk
-GENSRC += $(GENSRC_CHARSETMAPPING)
-
-include GensrcCharsetCoder.gmk
-GENSRC += $(GENSRC_CHARSETCODER)
-
-include GensrcBuffer.gmk
-GENSRC += $(GENSRC_BUFFER)
-
-include GensrcExceptions.gmk
-GENSRC += $(GENSRC_EXCEPTIONS)
-
-ifneq ($(OPENJDK_TARGET_OS),windows)
-include GensrcIcons.gmk
-GENSRC += $(GENSRC_AWT_ICONS)
-
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-GENSRC += $(GENSRC_OSX_ICONS)
-endif
-
-include GensrcX11Wrappers.gmk
-GENSRC += $(GENSRC_X11WRAPPERS)
-endif
-
-include GensrcCLDR.gmk
-GENSRC += $(GENSRC_CLDR)
-
-include GensrcSwing.gmk
-GENSRC += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-     include GensrcJObjC.gmk
-     GENSRC += $(GENSRC_JOBJC)
-endif
-
-$(GENSRC) : $(BUILD_TOOLS)
-
-all: $(GENSRC)
-
-
-.PHONY: all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/GenerateSources.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,96 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+include JavaCompilation.gmk
+include NativeCompilation.gmk
+
+# Setup the java compilers for the JDK build.
+include Setup.gmk
+# We need the tools.
+include Tools.gmk
+
+# Now include all the rules that generate Java sources.
+# The Java sources are written into the gensrc_.... directories.
+
+include gensrc/GensrcProperties.gmk
+GENSRC += $(GENSRC_PROPERTIES)
+
+include gensrc/GensrcLocaleDataMetaInfo.gmk
+GENSRC += $(GENSRC_LOCALEDATAMETAINFO)
+
+include gensrc/GensrcCharacterData.gmk
+GENSRC += $(GENSRC_CHARACTERDATA)
+
+include gensrc/GensrcJDWP.gmk
+GENSRC += $(GENSRC_JDWP)
+
+include gensrc/GensrcMisc.gmk
+GENSRC += $(GENSRC_MISC)
+
+include gensrc/GensrcCharsetMapping.gmk
+GENSRC += $(GENSRC_CHARSETMAPPING)
+
+include gensrc/GensrcCharsetCoder.gmk
+GENSRC += $(GENSRC_CHARSETCODER)
+
+include gensrc/GensrcBuffer.gmk
+GENSRC += $(GENSRC_BUFFER)
+
+include gensrc/GensrcExceptions.gmk
+GENSRC += $(GENSRC_EXCEPTIONS)
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+include gensrc/GensrcIcons.gmk
+GENSRC += $(GENSRC_AWT_ICONS)
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+GENSRC += $(GENSRC_OSX_ICONS)
+endif
+
+include gensrc/GensrcX11Wrappers.gmk
+GENSRC += $(GENSRC_X11WRAPPERS)
+endif
+
+include gensrc/GensrcCLDR.gmk
+GENSRC += $(GENSRC_CLDR)
+
+include gensrc/GensrcSwing.gmk
+GENSRC += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  include gensrc/GensrcJObjC.gmk
+  GENSRC += $(GENSRC_JOBJC)
+endif
+
+$(GENSRC): $(BUILD_TOOLS)
+
+all: $(GENSRC)
+
+
+.PHONY: all
--- a/makefiles/GensrcBuffer.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,380 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-GENSRC_BUFFER :=
-
-GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
-
-GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
-
-###
-
-$(GENSRC_BUFFER_DST)/_the.buffer.dir :
-	$(ECHO) "Generating buffer classes"
-	$(MKDIR) -p $(@D)
-	$(TOUCH) $@
-
-define fixRw
-	$1_RW := $2
-	$1_rwkey := rw
-	ifeq (R,$2)
-		 $1_rwkey := ro
-	endif
-endef
-
-define typesAndBits
-        # param 1 target
-        # param 2 type
-        # param 3 BO
-	$1_a := a
-	$1_A := A
-
-	$1_type := $2
-
-	ifeq ($2, byte)
-		$1_x        := b
-		$1_Type     := Byte
-		$1_fulltype := byte
-		$1_Fulltype := Byte
-		$1_category := integralType
-		$1_LBPV     := 0
-	endif
-
-	ifeq ($2, char)
-		$1_x        := c
-		$1_Type     := Char
-		$1_fulltype := character
-		$1_Fulltype := Character
-		$1_category := integralType
-                $1_streams  := streamableType
-                $1_streamtype := int
-                $1_Streamtype := Int
-		$1_LBPV     := 1
-	endif
-
-	ifeq ($2, short)
-		$1_x        := s
-		$1_Type     := Short
-		$1_fulltype := short
-		$1_Fulltype := Short
-		$1_category := integralType
-		$1_LBPV     := 1
-	endif
-
-	ifeq ($2, int)
-		$1_a := an
-		$1_A := An
-		$1_x        := i
-		$1_Type     := Int
-		$1_fulltype := integer
-		$1_Fulltype := Integer
-		$1_category := integralType
-		$1_LBPV     := 2
-	endif
-
-	ifeq ($2, long)
-		$1_x        := l
-		$1_Type     := Long
-		$1_fulltype := long
-		$1_Fulltype := Long
-		$1_category := integralType	
-		$1_LBPV     := 3
-	endif
-
-	ifeq ($2, float)
-		$1_x        := f
-		$1_Type     := Float
-		$1_fulltype := float
-		$1_Fulltype := Float
-		$1_category := floatingPointType
-		$1_LBPV     := 2
-	endif
-
-	ifeq ($2, double)
-		$1_x        := d
-		$1_Type     := Double
-		$1_fulltype := double
-		$1_Fulltype := Double
-		$1_category := floatingPointType
-		$1_LBPV     := 3
-	endif
-
-	$1_Swaptype := $$($1_Type)
-	$1_memtype := $2
-	$1_Memtype := $$($1_Type)
-
-	ifeq ($2, float)
-		$1_memtype := int
-		$1_Memtype := Int
-		ifneq ($3,U)
-			$1_Swaptype := Int
-			$1_fromBits := Float.intBitsToFloat
-			$1_toBits   := Float.floatToRawIntBits
-		endif
-	endif
-
-	ifeq ($2, double)
-		$1_memtype := long
-		$1_Memtype := Long
-		ifneq ($3,U)
-			$1_Swaptype := Long
-			$1_fromBits := Double.longBitsToDouble
-			$1_toBits   := Double.doubleToRawLongBits
-		endif
-	endif
-
-	ifeq ($3, S)
-		$1_swap := Bits.swap
-	endif
-endef
-
-define genBinOps
-        # param 1 target
-        # param 2 type
-        # param 3 BO
-        # param 4 RW
-        # param 5 nbytes
-        # param 6 nbytesButOne
-	$(call typesAndBits,$1,$2,$3)
-	$(call fixRw,$1,$4)
-	$1_nbytes := $5
-	$1_nbytesButOne := $6
-	$1_CMD := $(TOOL_SPP) \
-		-Dtype=$$($1_type) \
-		-DType=$$($1_Type) \
-		-Dfulltype=$$($1_fulltype) \
-		-Dmemtype=$$($1_memtype) \
-		-DMemtype=$$($1_Memtype) \
-		-DfromBits=$$($1_fromBits) \
-		-DtoBits=$$($1_toBits) \
-		-DLG_BYTES_PER_VALUE=$$($1_LBPV) \
-		-DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
-		-Dnbytes=$$($1_nbytes) \
-		-DnbytesButOne=$$($1_nbytesButOne) \
-		-DRW=$$($1_RW) \
-		-K$$($1_rwkey) \
-		-Da=$$($1_a) \
-		-be
-endef
-
-define SetupGenBuffer
-        # param 1 is for output file
-        # param 2 is template dependency
-        # param 3-9 are named args.
-        #   type :=
-        #   BIN  :=
-        #   RW   := Mutability (R)ead-only (W)ritable
-        #   BO   := (U)nswapped/(S)wapped/(L)ittle/(B)ig
-        #
-	$(if $3,$1_$(strip $3))
-	$(if $4,$1_$(strip $4))
-	$(if $5,$1_$(strip $5))
-	$(if $6,$1_$(strip $6))
-	$(if $7,$1_$(strip $7))
-	$(if $8,$1_$(strip $8))
-	$(if $9,$1_$(strip $9))
-	$(if $(10),$1_$(strip $(10)))
-	$(if $(11),$1_$(strip $(11)))
-	$(if $(12),$1_$(strip $(12)))
-	$(if $(13),$1_$(strip $(13)))
-	$(if $(14),$1_$(strip $(14)))
-	$(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15,$(if $($i),$1_$(strip $($i)))$(NEWLINE))
-	$(call LogSetupMacroEntry,SetupGenBuffer($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
-	$(if $(16),$(error Internal makefile error: Too many arguments to SetupGenBuffer, please update GensrcBuffer.gmk))
-
-	$(call fixRw,$1,$$($1_RW))
-	$(call typesAndBits,$1,$$($1_type),$$($1_BO))
-
-	$1_DST     := $(GENSRC_BUFFER_DST)/$1.java
-	$1_SRC     := $(GENSRC_BUFFER_SRC)/$(strip $2).java.template
-	$1_SRC_BIN := $(GENSRC_BUFFER_SRC)/$(strip $2)-bin.java.template
-
-	$1_DEP := $$($1_SRC)
-	ifneq ($$($1_BIN),1)
-		$1_DEP := $$($1_SRC)
-		$1_OUT := $$($1_DST)
-	else
-		$1_DEP += $$($1_SRC) $$($1_SRC_BIN)
-		$1_OUT := $(GENSRC_BUFFER_DST)/$1.binop.0.java
-	endif
-
-	ifeq ($$($1_BIN),1)
-		$(call genBinOps,$1_char,char,$$($1_BO),$$($1_RW),two,one)
-		$(call genBinOps,$1_short,short,$$($1_BO),$$($1_RW),two,one)
-		$(call genBinOps,$1_int,int,$$($1_BO),$$($1_RW),four,three)
-		$(call genBinOps,$1_long,long,$$($1_BO),$$($1_RW),eight,seven)
-		$(call genBinOps,$1_float,float,$$($1_BO),$$($1_RW),four,three)
-		$(call genBinOps,$1_double,double,$$($1_BO),$$($1_RW),eight,seven)
-	endif
-
-$$($1_DST) : $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
-	$(TOOL_SPP) < $$($1_SRC) > $$($1_OUT).tmp \
-		-K$$($1_type) \
-		-K$$($1_category) \
-		-K$$($1_streams) \
-		-Dtype=$$($1_type) \
-		-DType=$$($1_Type) \
-		-Dfulltype=$$($1_fulltype) \
-		-DFulltype=$$($1_Fulltype) \
-                -Dstreamtype=$$($1_streamtype) \
-                -DStreamtype=$$($1_Streamtype) \
-		-Dx=$$($1_x) \
-		-Dmemtype=$$($1_memtype) \
-		-DMemtype=$$($1_Memtype) \
-		-DSwaptype=$$($1_Swaptype) \
-		-DfromBits=$$($1_fromBits) \
-		-DtoBits=$$($1_toBits) \
-		-DLG_BYTES_PER_VALUE=$$($1_LBPV) \
-		-DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
-		-DBO=$$($1_BO) \
-		-Dswap=$$($1_swap) \
-		-DRW=$$($1_RW) \
-		-K$$($1_rwkey) \
-		-Da=$$($1_a) \
-		-DA=$$($1_A) \
-		-Kbo$$($1_BO)
-		$(MV) $$($1_OUT).tmp $$($1_OUT)
-# Do the extra bin thing
-ifeq ($$($1_BIN),1)
-	$(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).tmp
-	$(RM) $$($1_OUT)
-	$$($1_char_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
-	$$($1_short_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
-	$$($1_int_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
-	$$($1_long_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
-	$$($1_float_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
-	$$($1_double_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
-	$(PRINTF) "}\n" >> $$($1_DST).tmp
-	mv $$($1_DST).tmp $$($1_DST)
-endif
-
-GENSRC_BUFFER += $$($1_DST)
-
-endef
-
-###
-
-X_BUF :=X-Buffer
-
-$(eval $(call SetupGenBuffer,ByteBuffer,  $(X_BUF),type:=byte,BIN:=1))
-$(eval $(call SetupGenBuffer,CharBuffer,  $(X_BUF),type:=char))
-$(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF),type:=short))
-$(eval $(call SetupGenBuffer,IntBuffer,   $(X_BUF),type:=int))
-$(eval $(call SetupGenBuffer,LongBuffer,  $(X_BUF),type:=long))
-$(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF),type:=float))
-$(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF),type:=double))
-
-# Buffers whose contents are heap-allocated
-# 
-HEAP_X_BUF := Heap-X-Buffer
-
-$(eval $(call SetupGenBuffer,HeapByteBuffer,   $(HEAP_X_BUF),type:=byte))
-$(eval $(call SetupGenBuffer,HeapByteBufferR,  $(HEAP_X_BUF),type:=byte,RW:=R))
-$(eval $(call SetupGenBuffer,HeapCharBuffer,   $(HEAP_X_BUF),type:=char))
-$(eval $(call SetupGenBuffer,HeapCharBufferR,  $(HEAP_X_BUF),type:=char,RW:=R))
-$(eval $(call SetupGenBuffer,HeapShortBuffer,  $(HEAP_X_BUF),type:=short))
-$(eval $(call SetupGenBuffer,HeapShortBufferR, $(HEAP_X_BUF),type:=short,RW:=R))
-$(eval $(call SetupGenBuffer,HeapIntBuffer,    $(HEAP_X_BUF),type:=int))
-$(eval $(call SetupGenBuffer,HeapIntBufferR,   $(HEAP_X_BUF),type:=int,RW:=R))
-$(eval $(call SetupGenBuffer,HeapLongBuffer,   $(HEAP_X_BUF),type:=long))
-$(eval $(call SetupGenBuffer,HeapLongBufferR,  $(HEAP_X_BUF),type:=long,RW:=R))
-$(eval $(call SetupGenBuffer,HeapFloatBuffer,  $(HEAP_X_BUF),type:=float))
-$(eval $(call SetupGenBuffer,HeapFloatBufferR, $(HEAP_X_BUF),type:=float,RW:=R))
-$(eval $(call SetupGenBuffer,HeapDoubleBuffer, $(HEAP_X_BUF),type:=double))
-$(eval $(call SetupGenBuffer,HeapDoubleBufferR,$(HEAP_X_BUF),type:=double,RW:=R))
-
-# Direct byte buffer
-# 
-DIRECT_X_BUF := Direct-X-Buffer
-
-$(eval $(call SetupGenBuffer,DirectByteBuffer, $(DIRECT_X_BUF),type:=byte,BIN:=1))
-$(eval $(call SetupGenBuffer,DirectByteBufferR,$(DIRECT_X_BUF),type:=byte,BIN:=1,RW:=R))
-
-# Unswapped views of direct byte buffers
-#
-$(eval $(call SetupGenBuffer,DirectCharBufferU,   $(DIRECT_X_BUF),type:=char,BO:=U))
-$(eval $(call SetupGenBuffer,DirectCharBufferRU,  $(DIRECT_X_BUF),type:=char,RW:=R,BO:=U))
-$(eval $(call SetupGenBuffer,DirectShortBufferU,  $(DIRECT_X_BUF),type:=short,BO:=U))
-$(eval $(call SetupGenBuffer,DirectShortBufferRU, $(DIRECT_X_BUF),type:=short,RW:=R,BO:=U))
-$(eval $(call SetupGenBuffer,DirectIntBufferU,    $(DIRECT_X_BUF),type:=int,BO:=U))
-$(eval $(call SetupGenBuffer,DirectIntBufferRU,   $(DIRECT_X_BUF),type:=int,RW:=R,BO:=U))
-$(eval $(call SetupGenBuffer,DirectLongBufferU,   $(DIRECT_X_BUF),type:=long,BO:=U))
-$(eval $(call SetupGenBuffer,DirectLongBufferRU,  $(DIRECT_X_BUF),type:=long,RW:=R,BO:=U))
-$(eval $(call SetupGenBuffer,DirectFloatBufferU,  $(DIRECT_X_BUF),type:=float,BO:=U))
-$(eval $(call SetupGenBuffer,DirectFloatBufferRU, $(DIRECT_X_BUF),type:=float,RW:=R,BO:=U))
-$(eval $(call SetupGenBuffer,DirectDoubleBufferU, $(DIRECT_X_BUF),type:=double,BO:=U))
-$(eval $(call SetupGenBuffer,DirectDoubleBufferRU,$(DIRECT_X_BUF),type:=double,RW:=R,BO:=U))
-
-# Swapped views of direct byte buffers
-#
-$(eval $(call SetupGenBuffer,DirectCharBufferS,   $(DIRECT_X_BUF),type:=char,BO:=S))
-$(eval $(call SetupGenBuffer,DirectCharBufferRS,  $(DIRECT_X_BUF),type:=char,RW:=R,BO:=S))
-$(eval $(call SetupGenBuffer,DirectShortBufferS,  $(DIRECT_X_BUF),type:=short,BO:=S))
-$(eval $(call SetupGenBuffer,DirectShortBufferRS, $(DIRECT_X_BUF),type:=short,RW:=R,BO:=S))
-$(eval $(call SetupGenBuffer,DirectIntBufferS,    $(DIRECT_X_BUF),type:=int,BO:=S))
-$(eval $(call SetupGenBuffer,DirectIntBufferRS,   $(DIRECT_X_BUF),type:=int,RW:=R,BO:=S))
-$(eval $(call SetupGenBuffer,DirectLongBufferS,   $(DIRECT_X_BUF),type:=long,BO:=S))
-$(eval $(call SetupGenBuffer,DirectLongBufferRS,  $(DIRECT_X_BUF),type:=long,RW:=R,BO:=S))
-$(eval $(call SetupGenBuffer,DirectFloatBufferS,  $(DIRECT_X_BUF),type:=float,BO:=S))
-$(eval $(call SetupGenBuffer,DirectFloatBufferRS, $(DIRECT_X_BUF),type:=float,RW:=R,BO:=S))
-$(eval $(call SetupGenBuffer,DirectDoubleBufferS, $(DIRECT_X_BUF),type:=double,BO:=S))
-$(eval $(call SetupGenBuffer,DirectDoubleBufferRS,$(DIRECT_X_BUF),type:=double,RW:=R,BO:=S))
-
-# Big-endian views of byte buffers
-#
-BYTE_X_BUF := ByteBufferAs-X-Buffer
-
-$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferB,   $(BYTE_X_BUF),type:=char,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRB,  $(BYTE_X_BUF),type:=char,RW:=R,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferB,  $(BYTE_X_BUF),type:=short,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRB, $(BYTE_X_BUF),type:=short,RW:=R,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferB,    $(BYTE_X_BUF),type:=int,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRB,   $(BYTE_X_BUF),type:=int,RW:=R,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferB,   $(BYTE_X_BUF),type:=long,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRB,  $(BYTE_X_BUF),type:=long,RW:=R,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferB,  $(BYTE_X_BUF),type:=float,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRB, $(BYTE_X_BUF),type:=float,RW:=R,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferB, $(BYTE_X_BUF),type:=double,BO:=B))
-$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRB,$(BYTE_X_BUF),type:=double,RW:=R,BO:=B))
-
-# Little-endian views of byte buffers
-#
-$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferL,   $(BYTE_X_BUF),type:=char,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRL,  $(BYTE_X_BUF),type:=char,RW:=R,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferL,  $(BYTE_X_BUF),type:=short,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRL, $(BYTE_X_BUF),type:=short,RW:=R,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferL,    $(BYTE_X_BUF),type:=int,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRL,   $(BYTE_X_BUF),type:=int,RW:=R,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferL,   $(BYTE_X_BUF),type:=long,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRL,  $(BYTE_X_BUF),type:=long,RW:=R,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferL,  $(BYTE_X_BUF),type:=float,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRL, $(BYTE_X_BUF),type:=float,RW:=R,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferL, $(BYTE_X_BUF),type:=double,BO:=L))
-$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF),type:=double,RW:=R,BO:=L))
-
-###
-
-$(GENSRC_BUFFER) : $(BUILD_TOOLS)
--- a/makefiles/GensrcCLDR.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +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.  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.
-#
-
-CLDRVERSION := 21.0.1
-CLDRSRCDIR := $(JDK_TOPDIR)/src/share/classes/sun/util/cldr/resources/$(subst .,_,$(CLDRVERSION))
-
-GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc
-
-CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java
-
-$(CLDR_METAINFO_FILE): $(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
-			$(wildcard $(CLDRSRCDIR)/common/main/*.xml) \
-			$(wildcard $(CLDRSRCDIR)/common/supplemental/*.xml)
-	$(MKDIR) -p $(@D)
-	$(TOOL_CLDRCONVERTER) -base $(CLDRSRCDIR) -o $(GENSRC_DIR)
-
-GENSRC_CLDR := $(CLDR_METAINFO_FILE)
--- a/makefiles/GensrcCharacterData.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-#
-# Rules to create $(JDK_OUTPUTDIR)/gensrc/sun/lang/CharacterData*.java 
-#
-
-GENSRC_CHARACTERDATA:=
-
-CHARACTERDATA = $(JDK_TOPDIR)/make/tools/GenerateCharacter
-UNICODEDATA   = $(JDK_TOPDIR)/make/tools/UnicodeData
-
-define SetupCharacterData
-    $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java : $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS)
-	$(MKDIR) -p $$(@D)
-	$(ECHO) $(LOG_INFO) Generating $1.java
-	$(TOOL_GENERATECHARACTER) $2 \
-		-template $(CHARACTERDATA)/$1.java.template \
-		-spec $(UNICODEDATA)/UnicodeData.txt \
-		-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-		-proplist $(UNICODEDATA)/PropList.txt \
-		-o $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java -string \
-		-usecharforbyte $3
-
-    GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java
-endef
-
-$(eval $(call SetupCharacterData,CharacterDataLatin1,,-latin1 8))
-$(eval $(call SetupCharacterData,CharacterData00,-plane 0,11 4 1))
-$(eval $(call SetupCharacterData,CharacterData01,-plane 1,11 4 1))
-$(eval $(call SetupCharacterData,CharacterData02,-plane 2,11 4 1))
-$(eval $(call SetupCharacterData,CharacterData0E,-plane 14,11 4 1))
-
-# Copy two Java files that need no preprocessing.
-$(JDK_OUTPUTDIR)/gensrc/java/lang/%.java : $(CHARACTERDATA)/%.java.template
-	$(ECHO) $(LOG_INFO) Generating $(@F)
-	$(call install-file)
-
-GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataUndefined.java \
-                       $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataPrivateUse.java
-
-$(GENSRC_CHARACTERDATA) : $(BUILD_TOOLS)
--- a/makefiles/GensrcCharsetCoder.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-GENSRC_CHARSETCODER :=
-
-GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio/charset
-
-GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
-
-GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
-
-###
-
-$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java : $(GENSRC_CHARSETCODER_TEMPLATE)
-	$(MKDIR) -p $(@D)
-	-$(RM) $@.tmp
-	$(TOOL_SPP) < $< >$@.tmp \
-		-Kdecoder \
-		-DA='A' \
-		-Da='a' \
-		-DCode='Decode' \
-		-Dcode='decode' \
-		-DitypesPhrase='bytes in a specific charset' \
-		-DotypesPhrase='sixteen-bit Unicode characters' \
-		-Ditype='byte' \
-		-Dotype='character' \
-		-DItype='Byte' \
-		-DOtype='Char' \
-		-Dcoder='decoder' \
-		-DCoder='Decoder' \
-		-Dcoding='decoding' \
-		-DOtherCoder='Encoder' \
-		-DreplTypeName='string' \
-		-DdefaultRepl='"\\uFFFD"' \
-		-DdefaultReplName='<tt>"\&#92;uFFFD"<\/tt>' \
-		-DreplType='String' \
-		-DreplFQType='java.lang.String' \
-		-DreplLength='length()' \
-		-DItypesPerOtype='CharsPerByte' \
-		-DnotLegal='not legal for this charset' \
-		-Dotypes-per-itype='chars-per-byte' \
-		-DoutSequence='Unicode character'
-	$(MV) $@.tmp $@
-
-GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
-
-###
-
-$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java : $(GENSRC_CHARSETCODER_TEMPLATE)
-	$(MKDIR) -p $(@D)
-	-$(RM) $@.tmp
-	$(TOOL_SPP) < $< >$@.tmp \
-		-Kencoder \
-		-DA='An' \
-		-Da='an' \
-		-DCode='Encode' \
-		-Dcode='encode' \
-		-DitypesPhrase='sixteen-bit Unicode characters' \
-		-DotypesPhrase='bytes in a specific charset' \
-		-Ditype='character' \
-		-Dotype='byte' \
-		-DItype='Char' \
-		-DOtype='Byte' \
-		-Dcoder='encoder' \
-		-DCoder='Encoder' \
-		-Dcoding='encoding' \
-		-DOtherCoder='Decoder' \
-		-DreplTypeName='byte array' \
-		-DdefaultRepl='new byte[] { (byte)'"'"\\?"'"' }' \
-		-DdefaultReplName='<tt>{<\/tt>\&nbsp;<tt>(byte)'"'"\\?"'"'<\/tt>\&nbsp;<tt>}<\/tt>' \
-		-DreplType='byte[]' \
-		-DreplFQType='byte[]' \
-		-DreplLength='length' \
-		-DItypesPerOtype='BytesPerChar' \
-		-DnotLegal='not a legal sixteen-bit Unicode sequence' \
-		-Dotypes-per-itype='bytes-per-char' \
-		-DoutSequence='byte sequence in the given charset'
-	$(MV) $@.tmp $@
-
-GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
-
-###
-
-$(GENSRC_CHARSETCODER) : $(BUILD_TOOLS)
--- a/makefiles/GensrcCharsetMapping.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-GENSRC_CHARSETMAPPING:=
-
-GENSRC_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
-
-GENSRC_SRC := $(JDK_TOPDIR)/make/tools/CharsetMapping
-GENSRC_JAVA_SRC := $(JDK_TOPDIR)/make/tools/src/build/tools/charsetmapping
-
-GENSRC_TEMPLATES := $(GENSRC_SRC)/SingleByte-X.java.template $(GENSRC_SRC)/DoubleByte-X.java.template
-
-###
-
-$(GENSRC_TMP)/_the.charsetmapping.dir :
-	$(ECHO) Generating charsetmapping classes
-	$(MKDIR) -p $(GENSRC_DST)/ext
-	$(TOUCH) $@
-
-###
-
-GENSRC_SB := $(GENSRC_TMP)/_the.charsetmapping.sbcs
-
-$(GENSRC_SB) : $(GENSRC_SRC)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.charsetmapping.dir
-	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST) sbcs
-	$(TOUCH) $@
-
-GENSRC_CHARSETMAPPING += $(GENSRC_SB)
-
-###
-
-$(GENSRC_DST)/ext/sjis0213.dat : $(GENSRC_SRC)/sjis0213.map $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $< $@ sjis0213
-
-GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/sjis0213.dat
-
-###
-
-$(GENSRC_DST)/ext/EUC_TWMapping.java : $(GENSRC_JAVA_SRC)/EUC_TW.java $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST)/ext euctw $(GENSRC_JAVA_SRC)/EUC_TW.java
-
-GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/EUC_TWMapping.java
-
-###
-
-$(GENSRC_DST)/ext/HKSCSMapping.java : $(GENSRC_JAVA_SRC)/HKSCS.java $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST)/ext hkscs $(GENSRC_JAVA_SRC)/HKSCS.java
-
-GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/HKSCSMapping.java
-
-###
-
-$(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs : $(GENSRC_SRC)/extsbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(LOG_INFO) $(GENSRC_DST)/ext extsbcs
-	$(TOUCH) $@
-
-GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs
-
-###
-
-$(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs : $(GENSRC_SRC)/dbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(LOG_INFO) $(GENSRC_DST)/ext dbcs
-	$(TOUCH) $@
-
-GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs
-
-###
-
-GENSRC_CHARSET_PROVIDER_CMD := $(JDK_TOPDIR)/makefiles/scripts/genCharsetProvider.sh
-
-$(GENSRC_DST)/StandardCharsets.java : $(JDK_TOPDIR)/src/share/classes/sun/nio/cs/standard-charsets \
-                                      $(GENSRC_CHARSET_PROVIDER_CMD) \
-                                      $(GENSRC_TMP)/_the.charsetmapping.dir
-
-	NAWK="$(NAWK)" TEMPDIR="$(GENSRC_TMP)" SH="$(SH)" \
-	  HASHER="$(TOOL_HASHER)" \
-          SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" \
-	  $(SH) -e $(GENSRC_CHARSET_PROVIDER_CMD) $(LOG_INFO) $< $(@D)
-
-GENSRC_CHARSETMAPPING += $(GENSRC_DST)/StandardCharsets.java
-
-$(GENSRC_CHARSETMAPPING) : $(BUILD_TOOLS)
--- a/makefiles/GensrcExceptions.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-GENSRC_EXCEPTIONS :=
-
-GENSRC_EXCEPTIONS_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
-
-GENSRC_EXCEPTIONS_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
-GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/makefiles/scripts/genExceptions.sh
-
-GENSRC_EXCEPTIONS_SRC_DIRS := . charset channels 
-
-###
-
-$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir :
-	$(ECHO) "Generating exceptions classes"
-	$(MKDIR) -p $(@D)
-	$(TOUCH) $@
-
-
-###
-
-$(GENSRC_EXCEPTIONS_DST)/_the.% : $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
-                                  $(GENSRC_EXCEPTIONS_CMD) \
-                                  $(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir
-	$(MKDIR) -p $(@D)/$*
-	SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_INFO) 
-	$(TOUCH) $@
-
-GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D))
-
-$(GENSRC_EXCEPTIONS) : $(BUILD_TOOLS)
--- a/makefiles/GensrcIcons.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-#
-# 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
-# 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.
-#
-
-GENSRC_AWT_ICONS :=
-GENSRC_AWT_ICONS_SRC :=
-GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/
-
-ifdef OPENJDK
-  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)
-else
-  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
-endif
-
-GENSRC_AWT_ICONS_SRC += \
-    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
-    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
-    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
-    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
-
-
-AWT_ICONPATH := $(JDK_TOPDIR)/src/share/classes/sun/awt/resources
-
-GENSRC_AWT_ICONS_SRC += \
-   $(AWT_ICONPATH)/security-icon-bw16.png \
-   $(AWT_ICONPATH)/security-icon-interim16.png \
-   $(AWT_ICONPATH)/security-icon-yellow16.png \
-   $(AWT_ICONPATH)/security-icon-bw24.png \
-   $(AWT_ICONPATH)/security-icon-interim24.png \
-   $(AWT_ICONPATH)/security-icon-yellow24.png \
-   $(AWT_ICONPATH)/security-icon-bw32.png \
-   $(AWT_ICONPATH)/security-icon-interim32.png \
-   $(AWT_ICONPATH)/security-icon-yellow32.png \
-   $(AWT_ICONPATH)/security-icon-bw48.png \
-   $(AWT_ICONPATH)/security-icon-interim48.png \
-   $(AWT_ICONPATH)/security-icon-yellow48.png
-
-GENSRC_AWT_ICONS_FILES := $(notdir $(GENSRC_AWT_ICONS_SRC))
-
-GENSRC_AWT_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
-GENSRC_AWT_ICONS_DST_NAME = AWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
-
-###
-
-$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir :
-	$(ECHO) Generating icon classes
-	$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
-	$(TOUCH) $@
-
-###
-
-define SetupGensrcAWTIcon
-        # param 1 is for src-file
-        # param 2 is for src-dir
-	$1_SHORTNAME := $(call GENSRC_AWT_ICONS_SHORT_NAME,$1)
-	$1_NAME32 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,32)
-	$1_TARGET32 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME32).java
-	$1_NAME64 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,64)
-	$1_TARGET64 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME64).java
-
-$$($1_TARGET32) : $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
-	$(RM) $$@ $$@.tmp
-	$(ECHO) "package sun.awt;" > $$@.tmp
-	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
-	$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
-	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
-	$(ECHO) "}; }" >> $$@.tmp
-	$(MV) $$@.tmp $$@
-
-GENSRC_AWT_ICONS += $$($1_TARGET32)
-
-$$($1_TARGET64) : $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
-	$(RM) $$@ $$@.tmp
-	$(ECHO) "package sun.awt;" > $$@.tmp
-	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
-	$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
-	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
-	$(ECHO) "}; }" >> $$@.tmp
-	$(MV) $$@.tmp $$@
-
-GENSRC_AWT_ICONS += $$($1_TARGET64)
-endef
-
-$(foreach I,$(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I)))))
-
-###
-
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-
-  GENSRC_OSX_ICONS_TMP  := $(JDK_OUTPUTDIR)/gensrc
-  GENSRC_OSX_ICONS_DST  := $(GENSRC_OSX_ICONS_TMP)/sun/osxapp
-  GENSRC_OSX_ICONS      := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
-
-  ifdef OPENJDK
-    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
-  else
-    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/closed/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
-  endif
-
-$(GENSRC_OSX_ICONS_DST)/AWTIconData.h: $(GENSRC_OSX_ICONS_SRC)
-	$(RM) $@ $@.tmp
-	$(MKDIR) -p $(dir $@)
-	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
-	$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
-	$(ECHO) "};" >> $@.tmp
-	$(MV) $@.tmp $@
-
-endif
-
--- a/makefiles/GensrcJDWP.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-# Translate the Java debugger wire protocol (jdwp.spec) file into a JDWP.java file
-# and a JDWPCommands.h C-header file.
-
-$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
-
-$(JDK_OUTPUTDIR)/gensrc/com/sun/tools/jdi/JDWP.java : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
-	$(MKDIR) -p $(@D)
-	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
-	$(RM) $@ $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
-	$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
-	$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
-
-$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
-	$(TOOL_JDWPGEN) $< -doc $@
-
-GENSRC_JDWP:=	$(JDK_OUTPUTDIR)/gensrc/com/sun/tools/jdi/JDWP.java \
-		$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h \
-		$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
--- a/makefiles/GensrcJObjC.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-GENSRC_JOBJC :=
-
-JOBJC_FRAMEWORKS := Foundation CoreFoundation AppKit
-FRAMEWORKS_DIR := /System/Library/Frameworks
-GBM := /usr/bin/gen_bridge_metadata
-
-JOBJC_SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc
-JOBJC_TMP := $(JDK_OUTPUTDIR)/gensrc_jobjc
-JOBJC_DST := $(JDK_OUTPUTDIR)/gensrc_jobjc/src
-
-#
-# Build generator
-#
-$(eval $(call SetupJavaCompilation,BUILD_JOBJC_PRIMITIVE_CODER,\
-		SETUP:=GENERATE_OLDBYTECODE,\
-		DISABLE_SJAVAC:=true,\
-		INCLUDES:=core/java \
-                          com/apple,\
-		SRC:=$(JOBJC_SRC)/src \
-                     $(JOBJC_SRC)/src/generator/java, \
-		BIN:=$(JOBJC_TMP)/bin))
-
-GENSRC_JOBJC += $(BUILD_JOBJC_PRIMITIVE_CODER)
-
-#
-# Generate bridge support for select frameworks
-#
-BRIDGESUPPORT := $(addprefix $(JOBJC_TMP)/bridge/,$(addsuffix Full.bridgesupport,$(JOBJC_FRAMEWORKS)))
-
-#
-# Define macro for rules to create bridge support
-#    Not sure why, but if the system has this framework bridge support,
-#    we appear to copy that, otherwise we run GBM which can be very slow.
-#
-define CreateBridgeSupport # Framework
-$(RM) $@ $@.tmp
-$(MKDIR) -p $(@D)
-if [ -f $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) ]; then \
-    $(CP) $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) $@.tmp ;\
-else \
-    $(GBM) $(LOG_INFO) -F complete --framework $1 -o $@.tmp ; \
-fi
-$(MV) $@.tmp $@
-endef
-
-#
-# Currently 3 frameworks, avoid pattern rule due to the names being conflicting
-#
-$(JOBJC_TMP)/bridge/FoundationFull.bridgesupport : \
-		$(wildcard $(FRAMEWORKS_DIR)/Foundation.framework/Headers/*.h)
-	$(call CreateBridgeSupport,Foundation)
-$(JOBJC_TMP)/bridge/CoreFoundationFull.bridgesupport : \
-		$(wildcard $(FRAMEWORKS_DIR)/CoreFoundation.framework/Headers/*.h)
-	$(call CreateBridgeSupport,CoreFoundation)
-$(JOBJC_TMP)/bridge/AppKitFull.bridgesupport : \
-		$(wildcard $(FRAMEWORKS_DIR)/AppKit.framework/Headers/*.h)
-	$(call CreateBridgeSupport,AppKit)
-
-#
-# Find Xbootclasspath, for some reason, this involves firing up Java just
-#     so we can get the boot classpath, so we can remove anything in that
-#     classpath that ends with "JObjC.jar", and emit the new bootclasspath.
-#
-$(JOBJC_TMP)/_the.generator_bootclasspath : $(BUILD_JOBJC_PRIMITIVE_CODER)
-	$(ECHO) Generating jobjc framework bridge
-	$(RM) $@
-	$(JAVA) $(LOG_INFO) -cp $(JOBJC_TMP)/bin com.apple.internal.jobjc.generator.BootClassPathMinus JObjC.jar > $@.tmp
-	$(MV) $@.tmp $@
-
-#
-# Run generator
-#    Now we use bootclasspath to run java again, with the bridge support to
-#    generate more source.
-#
-$(JOBJC_TMP)/_the.generator : $(JOBJC_TMP)/_the.generator_bootclasspath $(BRIDGESUPPORT)
-	$(RM) $@
-	$(JAVA) $(LOG_INFO) -d64 -Xbootclasspath:`$(CAT) $(JOBJC_TMP)/_the.generator_bootclasspath` -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator dst=$(JOBJC_DST) frameworks=$(JOBJC_TMP)/bridge
-	$(TOUCH) $@
-
-# The generator delets all files in the target dir so it has to work in its
-# own dir and have the files copied over to gensrc aftewards.
-$(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files : $(JOBJC_TMP)/_the.generator
-	$(MKDIR) -p $(@D)
-	$(CP) -rp $(JOBJC_DST)/* $(@D)
-	$(TOUCH) $@
-
-GENSRC_JOBJC += $(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files
--- a/makefiles/GensrcLocaleDataMetaInfo.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-# Scan for all locale resources and extract for which locales there exists
-# resources. Then put this meta information about exiting (supported?) locales
-# into LocaleDataMetaInfo.java
-
-# First go look for all locale files
-LOCALE_FILES:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes \
-	-name "FormatData_*.java" -o -name "FormatData_*.properties" -o \
-	-name "CollationData_*.java" -o -name "CollationData_*.properties" -o \
-	-name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
-	-name "LocaleNames_*.java" -o -name "LocaleNames_*.properties" -o \
-	-name "CurrencyNames_*.java" -o -name "CurrencyNames_*.properties" -o \
-	-name "CalendarData_*.java" -o -name "CalendarData_*.properties")
-
-# Then translate the locale files into for example: FormatData_sv 
-LOCALE_RESOURCES:=$(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
-
-# Include the list of resources found during the previous compile.
--include $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
-
-MISSING_RESOURCES:=$(filter-out $(LOCALE_RESOURCES),$(PREV_LOCALE_RESOURCES))
-NEW_RESOURCES:=$(filter-out $(PREV_LOCALE_RESOURCES),$(LOCALE_RESOURCES))
-
-ifneq (,$(MISSING_RESOURCES)$(NEW_RESOURCES))
-    # There is a difference in the number of supported resources. Trigger a regeneration.
-    $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java)
-endif
-
-# The EN locales
-EN_LOCALES:=en%
-
-# ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
-ALL_NON_EN_LOCALES:=ja-JP-JP th-TH-TH
-
-SED_ARGS:=-e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'
-
-# This macro creates a sed expression that substitues for example:
-# #FormatData_ENLocales# with: en% locales.
-define CaptureLocale
-    $1_LOCALES := $$(subst _,-,$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES)))))
-    $1_EN_LOCALES := $$(filter $(EN_LOCALES),$$($1_LOCALES))
-    $1_NON_EN_LOCALES := $$(filter-out $(EN_LOCALES),$$($1_LOCALES))
-
-    ALL_EN_LOCALES += $$($1_EN_LOCALES)
-    ALL_NON_EN_LOCALES += $$($1_NON_EN_LOCALES)
-
-    # Don't sed in a space if there are no locales.
-    SED_ARGS+= -e 's/$$(HASH)$1_ENLocales$$(HASH)/$$(if $$($1_EN_LOCALES),$$(SPACE)$$($1_EN_LOCALES),)/g'
-    SED_ARGS+= -e 's/$$(HASH)$1_NonENLocales$$(HASH)/$$(if $$($1_NON_EN_LOCALES),$$(SPACE)$$($1_NON_EN_LOCALES),)/g'
-endef
-
-#sun.text.resources.FormatData
-$(eval $(call CaptureLocale,FormatData))
-
-#sun.text.resources.CollationData
-$(eval $(call CaptureLocale,CollationData))
-
-#sun.util.resources.TimeZoneNames
-$(eval $(call CaptureLocale,TimeZoneNames))
-
-#sun.util.resources.LocaleNames
-$(eval $(call CaptureLocale,LocaleNames))
-
-#sun.util.resources.CurrencyNames
-$(eval $(call CaptureLocale,CurrencyNames))
-
-#sun.util.resources.CalendarData
-$(eval $(call CaptureLocale,CalendarData))
-
-SED_ARGS+= -e 's/$(HASH)AvailableLocales_ENLocales$(HASH)/$(sort $(ALL_EN_LOCALES))/g'
-SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonENLocales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g'
-
-$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java: \
-		$(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
-	$(MKDIR) -p $(@D)
-	$(ECHO) Creating sun/util/LocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
-	$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
-	$(SED) $(SED_ARGS) $< > $@
-
-GENSRC_LOCALEDATAMETAINFO:=$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java
-
-###
-
-GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/util/CoreResourceBundleControl.java
-GENSRC_CRBC_CMD := $(JDK_TOPDIR)/makefiles/scripts/localelist.sh
-
-JRE_NONEXIST_LOCALES := en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
-
-$(GENSRC_CRBC_DST) : $(JDK_TOPDIR)/src/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template \
-                     $(GENSRC_CRBC_CMD)
-	$(MKDIR) -p $(@D)
-	NAWK="$(NAWK)" SED="$(SED)" $(SH) $(GENSRC_CRBC_CMD) "$(JRE_NONEXIST_LOCALES)" $< $@ 
-
-GENSRC_LOCALEDATAMETAINFO += $(GENSRC_CRBC_DST)
-
-###
--- a/makefiles/GensrcMisc.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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 ProfileNames.gmk
-
-##########################################################################################
-# Install the launcher name, release version string, full version
-# string and the runtime name into the Version.java file.
-# To be printed by java -version
-
-$(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java \
-$(PROFILE_VERSION_JAVA_TARGETS): \
-		$(JDK_TOPDIR)/src/share/classes/sun/misc/Version.java.template
-	$(MKDIR) -p $(@D)
-	$(RM) $@ $@.tmp
-	$(ECHO) Generating sun/misc/Version.java $(call profile_version_name, $@)
-	$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
-	       -e 's/@@java_version@@/$(RELEASE)/g' \
-	       -e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
-	       -e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \
-	       -e 's/@@java_profile_name@@/$(call profile_version_name, $@)/g' \
-            $< > $@.tmp
-	$(MV) $@.tmp $@
-
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java \
-    $(PROFILE_VERSION_JAVA_TARGETS)
-
-##########################################################################################
-# Version file for jconsole
-
-$(JDK_OUTPUTDIR)/gensrc/sun/tools/jconsole/Version.java: \
-                $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/Version.java.template
-	$(MKDIR) -p $(@D)
-	$(RM) $@ $@.tmp
-	$(ECHO) $(LOG_INFO) Generating sun/tools/jconsole/Version.java
-	$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@.tmp
-	$(MV) $@.tmp $@
-
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/tools/jconsole/Version.java
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS_API),posix)
-    UPSUFFIX:=$(OPENJDK_TARGET_OS)
-    ifeq ($(OPENJDK_TARGET_OS),macosx)
-        UPSUFFIX:=bsd
-    endif
-    # UNIXProcess.java is different for solaris and linux. We need to copy
-    # the correct UNIXProcess.java over to $(JDK_OUTPUTDIR)/gensrc/java/lang/.
-
-    $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java : \
-              $(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
-	$(ECHO) $(LOG_INFO) Copying UNIXProcess.java.$(OPENJDK_TARGET_OS) to java/lang/UNIXProcess.java
-	$(call install-file)
-	$(CHMOD) u+rw $@
-
-    GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java
-endif
-
-##########################################################################################
-
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java
-
-GENSRC_SOR_SRC := $(JDK_TOPDIR)/src/share/native/sun/nio/ch
-GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
-GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/gensrc/genSocketOptionRegistry
-
-SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
-	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
-
-$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE,\
-		SRC:=$(GENSRC_SOR_SRC),\
-		INCLUDE_FILES:=$(GENSRC_SOR_SRC_FILE),\
-		LANG:=C,\
-		CC:=$(BUILD_CC),\
-		LDEXE:=$(BUILD_LD),\
-		OBJECT_DIR:=$(GENSRC_SOR_BIN),\
-		OUTPUT_DIR:=$(GENSRC_SOR_BIN),\
-                PROGRAM:=genSocketOptionRegistry))
-
-ifneq ($(wildcard $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java),)
-  HAS_SOCKET_OPTION_REGISTRY:=true
-endif
-
-ifneq ($(HAS_SOCKET_OPTION_REGISTRY),true)
-$(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java : $(BUILD_GENSRC_SOR_EXE)
-	$(MKDIR) -p $(@D)
-	$(RM) $@ $@.tmp
-	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
-	$(BUILD_GENSRC_SOR_EXE) >> $@.tmp
-	$(MV) $@.tmp $@
-else
-$(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
-	$(call install-file)
-endif
-
-##########################################################################################
-
-ifneq ($(OPENJDK_TARGET_OS),windows)
-
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java
-
-GENSRC_UC_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
-GENSRC_UC_SRC_FILE := genUnixConstants.c
-GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/gensrc/genUnixConstants
-
-UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
-	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
-
-$(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE,\
-		SRC:=$(GENSRC_UC_SRC),\
-		INCLUDE_FILES:=$(GENSRC_UC_SRC_FILE),\
-		LANG:=C,\
-		CC:=$(BUILD_CC),\
-		LDEXE:=$(BUILD_CC),\
-		CFLAGS:=$(filter -D%,$(CFLAGS_JDKEXE)),\
-		OBJECT_DIR:=$(GENSRC_UC_BIN),\
-                OUTPUT_DIR:=$(GENSRC_UC_BIN),\
-		PROGRAM:=genUnixConstants))
-
-ifneq ($(wildcard $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java),)
-  HAS_UNIX_CONSTANTS:=true
-endif
-
-ifneq ($(HAS_UNIX_CONSTANTS),true)
-$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java : $(BUILD_GENSRC_UC_EXE)
-	$(MKDIR) -p $(@D)
-	$(RM) $@ $@.tmp
-	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
-	$(BUILD_GENSRC_UC_EXE) >> $@.tmp
-	$(MV) $@.tmp $@
-else
-$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
-	$(call install-file)
-endif
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/SolarisConstants.java
-
-GENSRC_SOL_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
-GENSRC_SOL_SRC_FILE := genSolarisConstants.c
-GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/gensrc/genSolarisConstants
-
-SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
-	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
-
-$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE,\
-		SRC:=$(GENSRC_SOL_SRC),\
-		INCLUDE_FILES:=$(GENSRC_SOL_SRC_FILE),\
-		LANG:=C,\
-		CC:=$(BUILD_CC),\
-		LDEXE:=$(BUILD_CC),\
-		OBJECT_DIR:=$(GENSRC_SOL_BIN),\
-		OUTPUT_DIR:=$(GENSRC_SOL_BIN),\
-		PROGRAM:=genSolarisConstants))
-
-$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/SolarisConstants.java : $(BUILD_GENSRC_SOL_EXE)
-	$(MKDIR) -p $(@D)
-	$(RM) $@ $@.tmp
-	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
-	$(BUILD_GENSRC_SOL_EXE) >> $@.tmp
-	$(MV) $@.tmp $@
-
-
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
-
-    AB_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc_ab
-    AB_SRC_DIR := $(JDK_TOPDIR)/src/closed/windows/classes/com/sun/java/accessibility
-
-    ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-         $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
-			$(AB_SRC_DIR)/32bit/AccessBridgeLoader.java
-		$(install-file)
-
-         $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/AccessBridge.java
-		$(install-file)
-
-         $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java: \
-			$(AB_SRC_DIR)/legacy/AccessBridgeLoader.java
-		$(install-file)
-
-         $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/AccessBridge.java
-		$(install-file)
-
-        GENSRC_MISC += $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java \
-		       $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java \
-			   $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java \
-			   $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java
-
-    else
-         $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
-			$(AB_SRC_DIR)/64bit/AccessBridgeLoader.java
-		$(install-file)
-
-         $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/AccessBridge.java
-		$(install-file)
-
-         GENSRC_MISC += $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java \
-			$(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java
-
-    endif
-
-endif
-endif
-
-##########################################################################################
--- a/makefiles/GensrcProperties.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,395 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-# Prepare the find cache. This is only used on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/windows/classes))
-
-# All .properties files to be compiled are appended to this variable.
-ALL_COMPILED_PROPSOURCES:=
-# All generated .java files from compilation are appended to this variable.
-ALL_COMPILED_PROPJAVAS:=
-# The (very long) command line for compilation, stored in a file, prior to use.
-COMPILE_PROPCMDLINE:=
-
-# All .properties files to be cleaned are appended to this variable.
-ALL_CLEANED_PROPSOURCES:=
-# All generated cleaned .properties files from cleaning are appended to this variable.
-ALL_CLEANED_PROPOUTPUT:=
-# The (very long) command line for cleaning, stored in a file, prior to use.
-CLEAN_PROPCMDLINE:=
-
-define add_properties_to_compile
-  # $1 is the name of the properties group
-  # $2 is the files belonging to this group
-  # $3 is the super class for the generated java file.
-  # $4 is a from pattern for translating stripped name from source to target
-  # $5 is the to pattern replacing $3 in the target
-
-  # Strip away prefix and suffix,
-  # leaving for example: sun/util/resources/CurrencyNames_sv
-  $1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/windows/classes/%.properties,%,\
-		$$(patsubst $(JDK_TOPDIR)/src/macosx/classes/%.properties,%,\
-                $$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties,%,$2)))
-
-  # Apply optional name transformation, example: hz_TW -> hz_HK
-  $(if $4,$1_PROPPATHS:=$$(patsubst $4,$5,$$($1_PROPPATHS)))
-
-  # Accumulate all found properties files.
-  ALL_COMPILED_PROPSOURCES+=$2
-
-  # Generate the list of to be created java files.
-  ALL_COMPILED_PROPJAVAS+=$$(patsubst %,$(JDK_OUTPUTDIR)/gensrc/%.java,$$($1_PROPPATHS))
-
-  # Now generate a sequence of "-compile ...CurrencyNames_sv.properties ...CurrencyNames_sv.java ListResourceBundle"
-  # suitable to be fed into the CompileProperties command.
-  COMPILE_PROPCMDLINE+=$$(subst _SPACE_,$(SPACE),$$(join $$(addprefix -compile_SPACE_,$2), \
-		$$(addsuffix _SPACE_$(strip $3),\
-                    $$(addprefix _SPACE_$(JDK_OUTPUTDIR)/gensrc/,\
-                        $$(addsuffix .java,$$($1_PROPPATHS))))))
-endef
-
-define add_properties_to_clean
-  # $1 is the name of the properties group
-  # $2 is the files belonging to this group
-  # $3 is a from pattern for translating stripped name from source to target
-  # $4 is the to pattern replacing $3 in the target
-  # $5 optional name of extra directory to put properties files in (ex: resources)
-
-  # Strip away prefix and suffix,
-  # leaving for example: sun/util/resources/CurrencyNames_sv
-  $1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/%.properties,%,\
-                $$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties,%,$2))
-
-  # Apply optional name transformation, example: hz_TW -> hz_HK
-  $(if $3,$1_PROPPATHS:=$$(patsubst $3,$4,$$($1_PROPPATHS)))
-
-  # Accumulate all found properties files.
-  ALL_CLEANED_PROPSOURCES+=$2
-
-  # Generate the list of to be created java files.
-  $1_PROPOUTPUT:=$$(patsubst %,$(JDK_OUTPUTDIR)/classes/%.properties,$$($1_PROPPATHS))
-  # If the properties target file isn't in a "resources" dir, add one.
-  ifneq ($5,)
-    $1_PROPOUTPUT:=$$(foreach p,$$($1_PROPOUTPUT), $$(dir $$p)$5/$$(notdir $$p))
-  endif
-
-  ALL_CLEANED_PROPOUTPUT+=$$($1_PROPOUTPUT)
-
-  # Now generate a sequence of "-clean ...[src]...CurrencyNames_sv.properties ...[build]...CurrencyNames_sv.properties"
-  # suitable to be fed into the StripProperties command.
-  CLEAN_PROPCMDLINE+=$$(subst _SPACE_,$(SPACE),$$(join $$(addprefix -clean_SPACE_,$2), \
-                    $$(addprefix _SPACE_,$$($1_PROPOUTPUT))))
-endef
-
-# Some packages contain pregenerated java files instead of properties files.
-# But unfortunately not all properties should be converted, some should be
-# copied....argggghhh.
-
-# For example:
-#    sun/applet/resources
-#    sun/misc/resources
-#    sun/text/resources
-#    sun/tools/jconsole/resources
-#    sun/tools/native2ascii/resources
-#    sun/util/resources
-
-# Some packages have properties that need to be converted to java source files.
-
-#com/apple/laf/resources
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-    $(eval $(call add_properties_to_compile,COM_APPLE_LAF,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/macosx/classes/com/apple/laf/resources)),\
-	ListResourceBundle))
-endif
-
-#com/sun/accessibility/internal/resources
-$(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#com/sun/imageio/plugins/common
-$(eval $(call add_properties_to_clean,COM_SUN_IMAGEIO,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/imageio))))
-#com/sun/java/swing/plaf/gtk/resources
-ifneq ($(OPENJDK_TARGET_OS), windows)
-# Only compile GTK resource bundles on Solaris/Linux
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-endif
-#com/sun/java/swing/plaf/motif/resources
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#com/sun/java/swing/plaf/windows/resources
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#com/sun/java/util/jar/pack
-$(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
-	$(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/intrinsic.properties))
-#com/sun/jndi/cosnaming
-$(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
-	$(JDK_TOPDIR)/src/share/classes/com/sun/jndi/cosnaming/jndiprovider.properties))
-#com/sun/jndi/ldap
-$(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
-	$(JDK_TOPDIR)/src/share/classes/com/sun/jndi/ldap/jndiprovider.properties))
-
-#com/sun/org/apache/xml/internal/security/resource
-#FIXME: The "xmlsecurity*.properties" pattern is not ideal; we might want to find
-#a better way to select the properties files that are needed.
-$(eval $(call add_properties_to_clean,XML_SECURITY,\
-	$(filter $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity%.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource))))
-
-#com/sun/rowset
-$(eval $(call add_properties_to_clean,COM_SUN_ROWSET,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/rowset))))
-$(eval $(call add_properties_to_clean,COM_SUN_ROWSET_HK,\
-	$(filter %zh_TW.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/rowset)),\
-	%zh_TW,%zh_HK))
-
-#com/sun/swing/internal/plaf/basic/resources
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#com/sun/swing/internal/plaf/metal/resources
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL_HK,\
-	$(filter %.properties,$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#com/sun/swing/internal/plaf/synth/resources
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-
-#com/sun/tools/jdi/resources
-$(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/tools/jdi/resources)),\
-	ListResourceBundle))
-
-#com/sun/tools/script/shell
-#java/util
-#javax/sql/rowset
-$(eval $(call add_properties_to_clean,JAVAX_SQL_ROWSET,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/javax/sql/rowset))))
-#sun/awt/resources
-$(eval $(call add_properties_to_compile,SUN_AWT,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/awt/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,SUN_AWT_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/awt/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#sun/awt/windows/
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call add_properties_to_compile,SUN_AWT,\
-	$(filter $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows/awtLocalization%.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)),\
-	ListResourceBundle))
-    $(eval $(call add_properties_to_compile,SUN_AWT_HK,\
-	$(filter $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows/awtLocalization%.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-endif
-# os x specific awt properties
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-$(eval $(call add_properties_to_compile,SUN_AWT,\
-	$(filter $(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources/%.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources)),\
-	ListResourceBundle))
-endif
-
-#sun/launcher/resources
-$(eval $(call add_properties_to_compile,SUN_LAUNCHER,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/launcher/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,SUN_LAUNCHER_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/launcher/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#sun/management/resources
-$(eval $(call add_properties_to_compile,SUN_MANAGEMENT,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/management/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,SUN_MANAGEMENT_KH,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/management/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#sun/print
-#sun/print/resources
-$(eval $(call add_properties_to_compile,SUN_PRINT,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/print/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,SUN_PRINT_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/print/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-#sun/rmi/registry/resources
-$(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources))))
-$(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY_HK,\
-	$(filter %zh_TW.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources)),\
-	%zh_TW,%zh_HK))
-
-#sun/rmi/rmic/resources
-$(eval $(call add_properties_to_clean,SUN_RMI_RMIC,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/rmic/resources))))
-
-#sun/rmi/server/resources
-$(eval $(call add_properties_to_clean,SUN_RMI_SERVER,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources))))
-$(eval $(call add_properties_to_clean,SUN_RMI_SERVER_HK,\
-	$(filter %zh_TW.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources)),\
-	%zh_TW,%zh_HK))
-
-# sun/tools/jar/resources
-$(eval $(call add_properties_to_compile,SUN_TOOLS_JAR,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,SUN_TOOLS_JAR_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-
-#sun/tools/javac/resources
-# It's unclear if the other localized property files here are supposed to be copied or not
-# but the old build system didn't copy them.
-$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
-	$(filter %javac.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources))))
-
-#sun/tools/jconsole/resources
-$(eval $(call add_properties_to_clean,SUN_TOOLS_JCONSOLE,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources))))
-
-#sun/tools/serialver
-$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/serialver)),,,resources))
-
-#sun/util/logging/resources
-$(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources)),\
-	ListResourceBundle))
-$(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING_HK,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources)),\
-	ListResourceBundle,%zh_TW,%zh_HK))
-# sun/util/resources
-$(eval $(call add_properties_to_compile,SUN_UTIL,\
-	$(filter %.properties,\
-	$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/util/resources)),\
-	sun.util.resources.LocaleNamesBundle))
-
-# Now setup the rule for the generation of the resource bundles.
-$(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS)
-#	Generate all output directories in advance since the build tool does not do that...
-	$(MKDIR) -p $(sort $(dir $(ALL_COMPILED_PROPJAVAS)))
-	$(ECHO) Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles
-	$(call ListPathsSafely,COMPILE_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/gensrc/_the.cmdline)
-	$(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc/_the.cmdline
-	$(TOUCH) $@
-
-# Now setup the rule for the generation of the cleaned properties.
-# FIXME: We currently don't handle removed properties incrementally. 
-$(JDK_OUTPUTDIR)/classes/_the.cleaned_properties : $(ALL_CLEANED_PROPSOURCES) $(BUILD_TOOLS)
-	$(RM) $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline
-#	Generate all output directories in advance since the build tool does not do that...
-	$(MKDIR) -p $(sort $(dir $(ALL_CLEANED_PROPOUTPUT)))
-	$(ECHO) Copying and cleaning $(words $(ALL_CLEANED_PROPSOURCES)) properties 
-	$(call ListPathsSafely,CLEAN_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline)
-	$(TOOL_STRIPPROPERTIES) @$(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline
-	$(TOUCH) $@
-
-$(ALL_COMPILED_PROPJAVAS) : $(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties
-
-$(ALL_CLEANED_PROPOUTPUT) : $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties
-
-
-# Some zh_HK resources are just copied of zh_TW
-$(JDK_OUTPUTDIR)/gensrc/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes/%_zh_TW.java
-	$(MKDIR) -p $(@D)
-	$(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@
-
-ZH_HK_JAVA:=	sun/applet/resources/MsgAppletViewer_zh_HK.java \
-		sun/misc/resources/Messages_zh_HK.java \
-		sun/security/util/AuthResources_zh_HK.java \
-                sun/security/util/Resources_zh_HK.java
-
-ZH_HK_JAVA_FILES:=$(addprefix $(JDK_OUTPUTDIR)/gensrc/,$(ZH_HK_JAVA))
-
-
-GENSRC_PROPERTIES:=$(ALL_COMPILED_PROPJAVAS) $(ALL_CLEANED_PROPOUTPUT) $(ZH_HK_JAVA_FILES)
--- a/makefiles/GensrcSwing.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  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.
-#
-
-#
-# Generate java files for javax.swing.plaf package
-# 
-NIMBUS_PACKAGE = javax.swing.plaf
-NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/javax/swing/plaf/nimbus
-NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/skin.laf
-
-$(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS)
-	$(MKDIR) -p $(@D)
-	$(ECHO) "Generating Nimbus source files"
-	$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
-	    -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc \
-	    -packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
-	$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
-	$(TOUCH) $@
-
-GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus
-
-#
-# Generate beaninfo java files
-#
-
-DOCLETSRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans
-
-# javax.swing package
-BEANS	    = AbstractButton Box JComponent JApplet JButton		\
-	      JCheckBox JCheckBoxMenuItem JComboBox JColorChooser	\
-	      JDesktopPane JDialog JEditorPane JFileChooser JFrame	\
-	      JFormattedTextField JInternalFrame JLabel JLayeredPane	\
-	      JList JMenu JMenuBar JMenuItem JOptionPane JPanel		\
-	      JPasswordField JPopupMenu JProgressBar JRadioButton	\
-	      JRadioButtonMenuItem JScrollBar JScrollPane JSeparator	\
-	      JSlider JSplitPane JSpinner JTabbedPane JTable		\
-	      JTextArea JTextField JTextPane JToggleButton JToolBar	\
-	      JTree JWindow
-
-# javax.swing.text package
-BEANS_TEXT = JTextComponent
-
-BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/%.java) \
-	    $(BEANS_TEXT:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/text/%.java)
-
-# Dummy variable so far, in the old build system it was false by default
-SWINGBEAN_DEBUG_FLAG = false
-# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(JDK_OUTPUTDIR)/btclasses
-# LocaleDataMetaInfo needs to be generated before running this to avoid confusing errors
-# in the build log.
-$(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \
-		$(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java \
-		$(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS) \
-		| $(GENSRC_LOCALEDATAMETAINFO)
-	$(ECHO) Generating beaninfo
-	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing
-	$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
-	-sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_OUTPUTDIR)/gensrc" \
-	 -doclet GenDocletBeanInfo \
-	-x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing \
-	-t $(DOCLETSRC_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
-	-XDignore.symbol.file=true \
-	-classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC) $(LOG_INFO)
-#       Move the JTextComponent into its proper package directory.
-	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/text
-	$(MV) $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/JTextComponentBeanInfo.java $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/text/JTextComponentBeanInfo.java 
-	$(TOUCH) $@
-
-# This file is the part of dt.jar
-# For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/javax/swing
-# Should it be moved under $(JDK_TOPDIR)/src/share/classes/javax/swing instead?
-$(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java: $(DOCLETSRC_DIR)/javax/swing/SwingBeanInfoBase.java
-	$(call install-file)
-
-# This file is the part of dt.jar 
-# For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/sun/swing
-# Should it be moved under $(JDK_TOPDIR)/src/share/classes/sun/swing instead?
-$(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java: $(DOCLETSRC_DIR)/sun/swing/BeanInfoUtils.java
-	$(call install-file)
-
-GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo
--- a/makefiles/GensrcX11Wrappers.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +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.  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 responsible for extracting the x11 native struct offsets to
-# the xawt Java library. The tool needs to be run on the os/arch that
-# will host the final jvm, thus the tool cannot be used when cross compiling.
-
-# To enable cross compiling, the two versions of the generated offset file,
-# sizes.32 and sizes.64 are committed into the source code repository.
-# These are the ones used.
-
-# However when not cross compiling, the offset generator tool is built and
-# run, to verify that it still generates the same sizes.32 and sizes.64.
-
-GENSRC_X11WRAPPERS :=
-# Put temporary c-code and executable to calculate offsets here.
-# Also put verification offset file here as well.
-GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
-# Put the generated Java classes used to interface X11 from awt here.
-GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc/sun/awt/X11
-
-# The pre-calculated offset file are stored here:
-GENSRC_SIZER_DIR := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
-
-# Normal case is to generate only according to target bits
-GENSRC_X11_VERSION := $(OPENJDK_TARGET_CPU_BITS)
-ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
-  ifneq ($(OPENJDK_TARGET_OS), linux)
-  # On all 64-bit systems except Linux, generate both 32 and 64 bit versions
-  GENSRC_X11_VERSION := 32 64
-  endif
-else
-  ifeq ($(OPENJDK_TARGET_OS), solaris)
-  # As a special case, solaris 32-bit also generates the 64-bit version
-  GENSRC_X11_VERSION := 32 64
-  endif
-endif
-
-GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes.,$(GENSRC_X11_VERSION))
-
-# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the 
-# file prefix it is given so those not needed need to be hidden.
-$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
-	$(MKDIR) -p $(@D)
-	$(RM) '$@'
-	$(SORT) $< > $@
-
-# Run the tool on the offset files copied from the source repository to generate several Java classes 
-# used in awt.
-$(JDK_OUTPUTDIR)/gensrc/_the.generated.x11 : $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS)
-	$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
-	$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
-	$(TOUCH) $@
-
-GENSRC_X11WRAPPERS += $(JDK_OUTPUTDIR)/gensrc/_the.generated.x11
-
-ifneq ($(COMPILE_TYPE),cross)
-    # This is not a cross compile, regenerate the offset file, so that we
-    # can compare it with the version in the source code repository.
-
-    # Generate the C code for the program that will output the offset file.
-    $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c : $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS)
-	$(ECHO) "Generating X11 wrapper ($*-bit version)"
-	$(MKDIR) -p $(@D)
-	$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
-
-    # use -m32/-m64 only if the compiler supports it
-    ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG),true)
-    MEMORY_MODEL_FLAG="-m$*"
-    endif
-
-    # Compile the C code into an executable.
-    $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
-	$(MKDIR) -p $(@D)
-	(cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
-              $(X_CFLAGS) \
-              $(X_LIBS) \
-              -I$(JDK_OUTPUTDIR)/include \
-              -I$(JDK_TOPDIR)/src/share/javavm/export \
-              -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
-              -I$(JDK_TOPDIR)/src/share/native/common \
-              -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
-              -I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
-	      -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-	      -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
-
-    .PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
-
-    # Run the executable create the offset file and check that it is identical
-    # to the offset file in the source code repository.
-    $(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification : $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
-	$(MKDIR) -p $(@D)
-	$(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
-	$(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
-	$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
-	mv $@.tmp $@
-
-    GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
-endif
-
--- a/makefiles/Images.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/Images.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -31,13 +31,13 @@
 default: images
 
 # Prepare the find cache. Only used if running on windows.
-$(eval $(call FillCacheFind,\
+$(eval $(call FillCacheFind, \
     $(wildcard $(JDK_OUTPUTDIR)/bin \
-               $(JDK_OUTPUTDIR)/lib \
-               $(IMAGES_OUTPUTDIR)/lib \
-               $(JDK_OUTPUTDIR)/include \
-               $(JDK_OUTPUTDIR)/sample \
-               $(JDK_OUTPUTDIR)/demo)))
+        $(JDK_OUTPUTDIR)/lib \
+        $(IMAGES_OUTPUTDIR)/lib \
+        $(JDK_OUTPUTDIR)/include \
+        $(JDK_OUTPUTDIR)/sample \
+        $(JDK_OUTPUTDIR)/demo)))
 
 include Tools.gmk
 
@@ -92,102 +92,102 @@
 ################################################################################
 # /bin dir
 
-ifeq ($(PROFILE),)
-    NOT_JRE_BIN_FILES := \
-	appletviewer$(EXE_SUFFIX) \
-	extcheck$(EXE_SUFFIX) \
-	idlj$(EXE_SUFFIX) \
-	jar$(EXE_SUFFIX) \
-	jarsigner$(EXE_SUFFIX) \
-	java-rmi.cgi \
-	javac$(EXE_SUFFIX) \
-	javadoc$(EXE_SUFFIX) \
-	javah$(EXE_SUFFIX) \
-	javap$(EXE_SUFFIX) \
-	jdeps$(EXE_SUFFIX) \
-	jcmd$(EXE_SUFFIX) \
-	jdb$(EXE_SUFFIX) \
-	jps$(EXE_SUFFIX) \
-	jrunscript$(EXE_SUFFIX) \
-	jstat$(EXE_SUFFIX) \
-	jstatd$(EXE_SUFFIX) \
-	jstack$(EXE_SUFFIX) \
-	packagebean$(SCRIPT_SUFFIX) \
-	rmic$(EXE_SUFFIX) \
-	serialver$(EXE_SUFFIX) \
-	unregbean$(EXE_SUFFIX) \
-	jconsole$(EXE_SUFFIX) \
-	jinfo$(EXE_SUFFIX) \
-	jmap$(EXE_SUFFIX) \
-	native2ascii$(EXE_SUFFIX) \
-	xjc$(EXE_SUFFIX) \
-	wsgen$(EXE_SUFFIX) \
-	wsimport$(EXE_SUFFIX) \
-        schemagen$(EXE_SUFFIX) \
-	jsadebugd$(EXE_SUFFIX) \
-	jhat$(EXE_SUFFIX)
+ifeq ($(PROFILE), )
+  NOT_JRE_BIN_FILES := \
+      appletviewer$(EXE_SUFFIX) \
+      extcheck$(EXE_SUFFIX) \
+      idlj$(EXE_SUFFIX) \
+      jar$(EXE_SUFFIX) \
+      jarsigner$(EXE_SUFFIX) \
+      java-rmi.cgi \
+      javac$(EXE_SUFFIX) \
+      javadoc$(EXE_SUFFIX) \
+      javah$(EXE_SUFFIX) \
+      javap$(EXE_SUFFIX) \
+      jdeps$(EXE_SUFFIX) \
+      jcmd$(EXE_SUFFIX) \
+      jdb$(EXE_SUFFIX) \
+      jps$(EXE_SUFFIX) \
+      jrunscript$(EXE_SUFFIX) \
+      jstat$(EXE_SUFFIX) \
+      jstatd$(EXE_SUFFIX) \
+      jstack$(EXE_SUFFIX) \
+      packagebean$(SCRIPT_SUFFIX) \
+      rmic$(EXE_SUFFIX) \
+      serialver$(EXE_SUFFIX) \
+      unregbean$(EXE_SUFFIX) \
+      jconsole$(EXE_SUFFIX) \
+      jinfo$(EXE_SUFFIX) \
+      jmap$(EXE_SUFFIX) \
+      native2ascii$(EXE_SUFFIX) \
+      xjc$(EXE_SUFFIX) \
+      wsgen$(EXE_SUFFIX) \
+      wsimport$(EXE_SUFFIX) \
+      schemagen$(EXE_SUFFIX) \
+      jsadebugd$(EXE_SUFFIX) \
+      jhat$(EXE_SUFFIX)
 endif
 
 WINDOWS_JDK_BIN_FILES = \
-	$(EXE_SUFFIX) \
-	$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
-	$(notdir $(MSVCR_DLL))
+    $(EXE_SUFFIX) \
+    $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
+    $(notdir $(MSVCR_DLL))
 
 WINDOWS_JDKJRE_BIN_FILES := \
-	$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
-	$(SALIB_NAME)
+    $(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
+    $(SALIB_NAME)
 
 # Find all files in bin dir
-ALL_BIN_LIST := $(call CacheFind,$(JDK_OUTPUTDIR)/bin)
+ALL_BIN_LIST := $(call CacheFind, $(JDK_OUTPUTDIR)/bin)
 
 # Prevent sjavac from entering the images.
-ALL_BIN_LIST := $(filter-out %/sjavac,$(ALL_BIN_LIST))
+ALL_BIN_LIST := $(filter-out %/sjavac, $(ALL_BIN_LIST))
 
 # For unknown reason the debuginfo files for executables are not put into images
 # e.g filter them out
-ifneq ($(OPENJDK_TARGET_OS),windows)
-    ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
 else
-# On windows, the libraries are in the bin dir, only filter out debuginfo files
-# for executables. "java" is both a library and executable.
-    ALL_BIN_EXEC_FILES := $(filter-out java.exe,$(notdir $(filter %.exe,$(ALL_BIN_LIST))))
-    ALL_BIN_DEBUG_FILTER := $(addprefix %,$(patsubst %.exe,%.debuginfo,$(ALL_BIN_EXEC_FILES)) \
-					   $(patsubst %.exe,%.diz,$(ALL_BIN_EXEC_FILES))) %.pdb
-    ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER),$(ALL_BIN_LIST))
+  # On windows, the libraries are in the bin dir, only filter out debuginfo files
+  # for executables. "java" is both a library and executable.
+  ALL_BIN_EXEC_FILES := $(filter-out java.exe, $(notdir $(filter %.exe, $(ALL_BIN_LIST))))
+  ALL_BIN_DEBUG_FILTER := $(addprefix %, $(patsubst %.exe, %.debuginfo, $(ALL_BIN_EXEC_FILES)) \
+      $(patsubst %.exe, %.diz, $(ALL_BIN_EXEC_FILES))) %.pdb
+  ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER), $(ALL_BIN_LIST))
 endif
 
-JDKJRE_BIN_LIST := $(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
-JRE_BIN_LIST := $(filter-out $(addprefix %,$(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
+JDKJRE_BIN_LIST := $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
+JRE_BIN_LIST := $(filter-out $(addprefix %, $(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    JDK_BIN_LIST := $(filter $(addprefix %,$(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
-    # On windows x86, the server jvm is filtered out from the j2re image. This could possibly 
-    # be handled by profiles in the future. If no client jvm is built, leave server in.
-    ifeq ($(OPENJDK_TARGET_CPU),x86)
-        ifeq ($(JVM_VARIANT_CLIENT),true)
-            JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%,$(JRE_BIN_LIST))
-	endif
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  JDK_BIN_LIST := $(filter $(addprefix %, $(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
+  # On windows x86, the server jvm is filtered out from the j2re image. This could possibly
+  # be handled by profiles in the future. If no client jvm is built, leave server in.
+  ifeq ($(OPENJDK_TARGET_CPU), x86)
+    ifeq ($(JVM_VARIANT_CLIENT), true)
+      JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%, $(JRE_BIN_LIST))
     endif
+  endif
 else
-    JDK_BIN_LIST := $(ALL_BIN_LIST)
+  JDK_BIN_LIST := $(ALL_BIN_LIST)
 endif
 
-ifneq ($(OPENJDK_TARGET_CPU_ISADIR),)
-    OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)%
+ifneq ($(OPENJDK_TARGET_CPU_ISADIR), )
+  OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)%
 endif
 
-$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)),\
+$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
-$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)),\
+$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
-$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)),\
+$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
 
-$(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)),\
+$(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
-$(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)),\
+$(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
-$(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)),\
+$(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
 
 ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
@@ -213,88 +213,93 @@
 ################################################################################
 # /lib dir
 ifneq ($(OPENJDK_TARGET_OS), macosx)
-    JDKJRE_LIB_FILES := \
-	$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
-	$(SALIB_NAME)
+  JDKJRE_LIB_FILES := \
+      $(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
+      $(SALIB_NAME)
 endif
 
-ifeq ($(PROFILE),)
-    NOT_JRE_LIB_FILES := \
-	tools.jar \
-	jconsole.jar \
-	sa-jdi.jar \
-	dt.jar \
-	orb.idl \
-	ir.idl \
-	ct.sym
+ifeq ($(PROFILE), )
+  NOT_JRE_LIB_FILES := \
+      tools.jar \
+      jconsole.jar \
+      sa-jdi.jar \
+      dt.jar \
+      orb.idl \
+      ir.idl \
+      ct.sym
 
-    ifeq ($(OPENJDK_TARGET_OS), windows)
-      NOT_JRE_LIB_FILES += jawt.lib jvm.lib
-    endif
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    NOT_JRE_LIB_FILES += jawt.lib jvm.lib
+  endif
 endif
 
 JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
 ifeq ($(OPENJDK_TARGET_OS), linux)
-    JDK_LIB_FILES += jexec
+  JDK_LIB_FILES += jexec
+endif
+
+ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris
+    JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
+		     $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
 endif
 
 # Find all files to copy from $(JDK_OUTPUTDIR)/lib
 # Jar files are not expected to be here
-ALL_JDKOUT_LIB_LIST := $(call not-containing,_the.,$(filter-out %.jar,\
-                            $(call CacheFind,$(JDK_OUTPUTDIR)/lib)))
+ALL_JDKOUT_LIB_LIST := $(call not-containing,_the., $(filter-out %.jar, \
+    $(call CacheFind, $(JDK_OUTPUTDIR)/lib)))
 # Find all files to copy from $(IMAGES_OUTPUTDIR)/lib
 # This is were the jar files are and might not exist if building overlay-images
-ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib),)
-    ALL_IMAGES_LIB_LIST := $(call not-containing,_the.,\
-                            $(call CacheFind,$(IMAGES_OUTPUTDIR)/lib))
+ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib), )
+  ALL_IMAGES_LIB_LIST := $(call not-containing,_the., \
+      $(call CacheFind, $(IMAGES_OUTPUTDIR)/lib))
 endif
 
 # Filter files to copy for each destination
-JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\
-                       $(ALL_JDKOUT_LIB_LIST))
-JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_JDKOUT_LIB_LIST))
-JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_JDKOUT_LIB_LIST))
+JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
+    $(ALL_JDKOUT_LIB_LIST))
+JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST))
+JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST))
 
-JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\
-                       $(ALL_IMAGES_LIB_LIST))
-JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_IMAGES_LIB_LIST))
-JDK_IMAGES_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_IMAGES_LIB_LIST))
+JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
+    $(ALL_IMAGES_LIB_LIST))
+JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_IMAGES_LIB_LIST))
+JDK_IMAGES_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_IMAGES_LIB_LIST))
 
 # Iterate over files to copy to create rules for each one
-$(foreach f,$(JRE_JDKOUT_LIB_LIST),\
+$(foreach f,$(JRE_JDKOUT_LIB_LIST), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS)))
-$(foreach f,$(JDK_JDKOUT_LIB_LIST),\
+$(foreach f,$(JDK_JDKOUT_LIB_LIST), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS)))
-$(foreach f,$(JDKJRE_JDKOUT_LIB_LIST),\
+$(foreach f,$(JDKJRE_JDKOUT_LIB_LIST), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS)))
 
-$(foreach f,$(JRE_IMAGES_LIB_LIST),\
+$(foreach f,$(JRE_IMAGES_LIB_LIST), \
     $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS)))
-$(foreach f,$(JDK_IMAGES_LIB_LIST),\
+$(foreach f,$(JDK_IMAGES_LIB_LIST), \
     $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS)))
-$(foreach f,$(JDKJRE_IMAGES_LIB_LIST),\
+$(foreach f,$(JDKJRE_IMAGES_LIB_LIST), \
     $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS)))
 
-$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_JDKOUT_LIB_LIST)),\
+$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_JDKOUT_LIB_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_OVERLAY_LIB_TARGETS)))
-$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_JDKOUT_LIB_LIST)),\
+$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_JDKOUT_LIB_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_OVERLAY_LIB_TARGETS)))
-$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_JDKOUT_LIB_LIST)),\
+$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_JDKOUT_LIB_LIST)), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_OVERLAY_LIB_TARGETS)))
 
-ifneq ($(PROFILE),)
-# Files in lib$(PROFILE) are excluded from the generic copying routines so 
-# we have to add them back in here
-$(foreach f,$(CUSTOM_PROFILE_JARS),\
-    $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR)/lib$(PROFILE),$(JRE_IMAGE_DIR)/lib,$f,JRE_LIB_TARGETS)))
+ifneq ($(PROFILE), )
+  # Files in lib$(PROFILE) are excluded from the generic copying routines so
+  # we have to add them back in here
+  $(foreach f,$(CUSTOM_PROFILE_JARS), \
+      $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR)/lib$(PROFILE),$(JRE_IMAGE_DIR)/lib,$f,JRE_LIB_TARGETS)))
 endif
 
 # CTE plugin security change require new empty directory lib/applet
-$(JRE_IMAGE_DIR)/lib/applet: 
+$(JRE_IMAGE_DIR)/lib/applet:
 	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $@
 
-$(JDK_IMAGE_DIR)/jre/lib/applet: 
+$(JDK_IMAGE_DIR)/jre/lib/applet:
 	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $@
 
@@ -318,185 +323,187 @@
 ################################################################################
 # /man dir
 # Avoid evaluating this whole section on windows for speed and stability
-ifneq ($(OPENJDK_TARGET_OS),windows)
-    JRE_MAN_PAGES := \
-	java.1		\
-	keytool.1	\
-	orbd.1          \
-	pack200.1	\
-	policytool.1    \
-	rmid.1		\
-	rmiregistry.1	\
-	servertool.1    \
-	tnameserv.1     \
-	unpack200.1
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  JRE_MAN_PAGES := \
+      java.1 \
+      keytool.1 \
+      orbd.1 \
+      pack200.1 \
+      policytool.1 \
+      rmid.1 \
+      rmiregistry.1 \
+      servertool.1 \
+      tnameserv.1 \
+      unpack200.1
 
-    ifndef OPENJDK
-        JRE_MAN_PAGES += javaws.1
+  ifndef OPENJDK
+    ifneq ($(OPENJDK_TARGET_OS), solaris)
+      JRE_MAN_PAGES += javaws.1
     endif
+  endif
 
-    JDK_MAN_PAGES =        \
-	$(JRE_MAN_PAGES)   \
-	appletviewer.1     \
-	extcheck.1         \
-	idlj.1             \
-	jar.1              \
-	jarsigner.1        \
-	javac.1            \
-	javadoc.1          \
-	javah.1            \
-	javap.1            \
-	jconsole.1         \
-	jcmd.1             \
-	jdb.1              \
-	jhat.1             \
-        jinfo.1            \
-        jmap.1             \
-        jps.1              \
-	jrunscript.1       \
-        jsadebugd.1        \
-        jstack.1           \
-        jstat.1            \
-        jstatd.1           \
-	native2ascii.1     \
-	rmic.1             \
-        schemagen.1        \
-	serialver.1        \
-        wsgen.1            \
-        wsimport.1         \
-        xjc.1
+  JDK_MAN_PAGES = \
+      $(JRE_MAN_PAGES) \
+      appletviewer.1 \
+      extcheck.1 \
+      idlj.1 \
+      jar.1 \
+      jarsigner.1 \
+      javac.1 \
+      javadoc.1 \
+      javah.1 \
+      javap.1 \
+      jconsole.1 \
+      jcmd.1 \
+      jdb.1 \
+      jhat.1 \
+      jinfo.1 \
+      jmap.1 \
+      jps.1 \
+      jrunscript.1 \
+      jsadebugd.1 \
+      jstack.1 \
+      jstat.1 \
+      jstatd.1 \
+      native2ascii.1 \
+      rmic.1 \
+      schemagen.1 \
+      serialver.1 \
+      wsgen.1 \
+      wsimport.1 \
+      xjc.1
 
-    ifndef OPENJDK
-        JDK_MAN_PAGES += jvisualvm.1
-    endif
+  ifndef OPENJDK
+    JDK_MAN_PAGES += jvisualvm.1
+  endif
 
-    # This variable is potentially overridden in the closed makefile.
-    MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src
+  # This variable is potentially overridden in the closed makefile.
+  MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src
 
-    ifeq ($(OPENJDK_TARGET_OS), linux)
-        MAN_SRC_DIR:=$(MAN_SRC_BASEDIR)/linux/doc
-        MAN1_SUBDIR:=man
-    endif
-    ifeq ($(OPENJDK_TARGET_OS), solaris)
-        MAN_SRC_DIR:=$(MAN_SRC_BASEDIR)/solaris/doc
-        MAN1_SUBDIR:=sun/man/man1
-    endif
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-        MAN_SRC_DIR:=$(MAN_SRC_BASEDIR)/bsd/doc
-        MAN1_SUBDIR:=man
-        JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES))
-        JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES))
-    endif
+  ifeq ($(OPENJDK_TARGET_OS), linux)
+    MAN_SRC_DIR := $(MAN_SRC_BASEDIR)/linux/doc
+    MAN1_SUBDIR := man
+  endif
+  ifeq ($(OPENJDK_TARGET_OS), solaris)
+    MAN_SRC_DIR := $(MAN_SRC_BASEDIR)/solaris/doc
+    MAN1_SUBDIR := sun/man/man1
+  endif
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    MAN_SRC_DIR := $(MAN_SRC_BASEDIR)/bsd/doc
+    MAN1_SUBDIR := man
+    JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES))
+    JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES))
+  endif
 
 
-    $(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
+  $(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
 	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-    $(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
+  $(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
 	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-    $(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
+  $(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
 	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-    $(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
+  $(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
 	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-    define install-ja-manpage
+  define install-ja-manpage
 	$(MKDIR) -p $(@D)
 	$(CAT) $< \
-		| $(NATIVE2ASCII) -encoding eucJP \
-		| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
-		| $(NATIVE2ASCII) -reverse -encoding $1 \
-		> $@
-    endef
+	    | $(NATIVE2ASCII) -encoding eucJP \
+	    | $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
+	    | $(NATIVE2ASCII) -reverse -encoding $1 \
+	    > $@
+  endef
 
-    $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+  $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
 	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(call install-ja-manpage,UTF-8)
+	$(call install-ja-manpage, UTF-8)
 
-    $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+  $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
 	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(call install-ja-manpage,UTF-8)
+	$(call install-ja-manpage, UTF-8)
 
-    $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+  $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
 	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(call install-ja-manpage,PCK)
+	$(call install-ja-manpage, PCK)
 
-    $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+  $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
 	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(call install-ja-manpage,PCK)
+	$(call install-ja-manpage, PCK)
 
-    ifeq ($(OPENJDK_TARGET_OS), solaris)
-        $(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
-		$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-		$(install-file)
+  ifeq ($(OPENJDK_TARGET_OS), solaris)
+    $(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(install-file)
 
-        $(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
-		$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-		$(install-file)
-    endif
+    $(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(install-file)
+  endif
 
-    # Old build creates empty man page for this, mimicing behaviour.
-    $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja/man1/jcmd.1:
+  # Old build creates empty man page for this, mimicing behaviour.
+  $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja/man1/jcmd.1:
 	$(ECHO) $(LOG_INFO) Creating dummy $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
 
-    ifeq ($(OPENJDK_TARGET_OS), linux)
-        $(JRE_IMAGE_DIR)/man/ja:
-		$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-		$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+  ifeq ($(OPENJDK_TARGET_OS), linux)
+    $(JRE_IMAGE_DIR)/man/ja:
+	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
 
-        $(JDK_IMAGE_DIR)/man/ja:
-		$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-		$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
-    endif
+    $(JDK_IMAGE_DIR)/man/ja:
+	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+  endif
 
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-        $(JRE_IMAGE_DIR)/man/ja:
-		$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-		$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    $(JRE_IMAGE_DIR)/man/ja:
+	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
 
-        $(JDK_IMAGE_DIR)/man/ja:
-		$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-		$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
-    endif
+    $(JDK_IMAGE_DIR)/man/ja:
+	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+  endif
 
-    ifeq ($(OPENJDK_TARGET_OS), linux)
-        JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
-                             $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
-                             $(JRE_IMAGE_DIR)/man/ja
+  ifeq ($(OPENJDK_TARGET_OS), linux)
+    JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
+        $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
+        $(JRE_IMAGE_DIR)/man/ja
 
-        JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
-                             $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
-                             $(JDK_IMAGE_DIR)/man/ja
-    endif
+    JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
+        $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
+    $(JDK_IMAGE_DIR)/man/ja
+  endif
 
-    ifeq ($(OPENJDK_TARGET_OS), solaris)
-        JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
-                             $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/,$(JRE_MAN_PAGES)) \
-                             $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
-                             $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JRE_MAN_PAGES))
+  ifeq ($(OPENJDK_TARGET_OS), solaris)
+    JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
+        $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \
+        $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
+        $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES))
 
-        JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
-                             $(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/,$(JDK_MAN_PAGES)) \
-                             $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
-                             $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JDK_MAN_PAGES))
-    endif
+    JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
+        $(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \
+        $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
+        $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
+  endif
 
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-        JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
-                             $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
-                             $(JRE_IMAGE_DIR)/man/ja
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
+        $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
+        $(JRE_IMAGE_DIR)/man/ja
 
-        JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
-                             $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
-                             $(JDK_IMAGE_DIR)/man/ja
-    endif
+    JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
+        $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
+        $(JDK_IMAGE_DIR)/man/ja
+  endif
 
 endif # Windows
 
@@ -505,9 +512,9 @@
 
 # FIXME: demo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied.
 
-#   The db demo contains an empty dir that needs to be copied. The other 
-#   directories will always trigger the rule for recompile since 
-#   _the.list_of_packages files are touched.
+# The db demo contains an empty dir that needs to be copied. The other
+# directories will always trigger the rule for recompile since
+# _the.list_of_packages files are touched.
 $(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/%
 	if [ ! -d "$@" ]; then \
 	  $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \
@@ -515,36 +522,36 @@
 	  if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \
 	fi
 
-#   Find all files including directories
-JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%,$(JDK_IMAGE_DIR)/demo/%,\
-			$(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) ))
+# Find all files including directories
+JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%, $(JDK_IMAGE_DIR)/demo/%, \
+    $(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) ))
 
 
 
 # Param 1 is source file
 define CreateOverlayDemoRule
-    $1_TARGET:=$$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),\
-			$$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1))
-    $$($1_TARGET): $1
-		$(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)'
-		$$(call install-file)
+  $1_TARGET := $$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR), \
+      $$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1))
+  $$($1_TARGET): $1
+	$(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)'
+	$$(call install-file)
 
-    JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET)
+  JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET)
 endef
-JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX),$(call CacheFind,$(JDK_OUTPUTDIR)/demo))
-$(foreach lib,$(JDK_OVERLAY_DEMO_SOURCES),$(eval $(call CreateOverlayDemoRule,$(lib))))
+JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(JDK_OUTPUTDIR)/demo))
+$(foreach lib, $(JDK_OVERLAY_DEMO_SOURCES), $(eval $(call CreateOverlayDemoRule, $(lib))))
 
 ################################################################################
 # /sample dir
 
-$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample),\
+$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS)))
 
 ################################################################################
 # /db dir
 
 ifndef OPENJDK
-    $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/%
+  $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/%
 	$(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<)
 	$(MKDIR) -p $(JDK_IMAGE_DIR)/db
 	cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x */index.html */KEYS */test/* *javadoc/* */docs/* */demo/* 2> /dev/null
@@ -552,49 +559,51 @@
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
 
-    $(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html
+  $(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html
 	$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
+	$(MKDIR) -p $(@D)
 	$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@
 
-    $(JDK_IMAGE_DIR)/db/3RDPARTY: $(JDK_TOPDIR)/src/closed/share/db/3RDPARTY
+  $(JDK_IMAGE_DIR)/db/3RDPARTY: $(JDK_TOPDIR)/src/closed/share/db/3RDPARTY
 	$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
+	$(MKDIR) -p $(@D)
 	$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@
 
-    JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\
-			$(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)) \
-		      $(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/3RDPARTY
+  JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%, $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped, \
+      $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)) \
+      $(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/3RDPARTY
 
 endif
 
 ################################################################################
 # /include dir
 
-$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include),\
+$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include), \
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS)))
 
 ################################################################################
 # doc files
 
 ifdef OPENJDK
-    JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
-    JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
-    JRE_DOC_LOCATION := $(JDK_TOPDIR)
-    JDK_DOC_LOCATION := $(JDK_TOPDIR)
+  JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
+  JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
+  JRE_DOC_LOCATION := $(JDK_TOPDIR)
+  JDK_DOC_LOCATION := $(JDK_TOPDIR)
 else
-    JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
-    JDK_DOC_FILES := COPYRIGHT README.html  LICENSE THIRDPARTYLICENSEREADME.txt
-    ifeq ($(OPENJDK_TARGET_OS), windows)
-        JRE_DOC_FILES += README.txt
-    else
-        JRE_DOC_FILES += README
-    endif
-    JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
-    JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre
-    JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk
+  JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
+  JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    JRE_DOC_FILES += README.txt
+  else
+    JRE_DOC_FILES += README
+  endif
+  JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
+  JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre
+  JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk
 endif
-JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/,$(JRE_DOC_FILES))
-JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/,$(JRE_DOC_FILES))
-JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/,$(JDK_DOC_FILES))
+JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES))
+JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/, $(JRE_DOC_FILES))
+JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES))
 
 $(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
 	$(process-doc-file)
@@ -625,31 +634,31 @@
 
 # Common way to emit a line into the release or info file
 define info-file-item # name value
-$(PRINTF) '%s="%s"\n' $1 $2 >> $@
+	$(PRINTF) '%s="%s"\n' $1 $2 >> $@
 endef
 
 define create-info-file
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)")
-	$(call info-file-item, "OS_NAME",      "$(REQUIRED_OS_NAME)")
-	$(call info-file-item, "OS_VERSION",   "$(REQUIRED_OS_VERSION)")
-	$(call info-file-item, "OS_ARCH",      "$(OPENJDK_TARGET_CPU_LEGACY)")
+	$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)")
+	$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)")
+	$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
 	if [ -n "$(JDK_ARCH_ABI_PROP_NAME)" ]; then $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"); fi
-	$(call info-file-item, "SOURCE",       "$(ALL_SOURCE_TIPS)")
+	$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
 endef
 
 ALL_SOURCE_TIPS = $(shell \
-  if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \
-    $(CAT) $(OUTPUT_ROOT)/source_tips ; \
-  fi)
+    if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \
+      $(CAT) $(OUTPUT_ROOT)/source_tips ; \
+    fi)
 
 $(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
 	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call create-info-file)
-ifneq ($(PROFILE),)
-	$(call info-file-item, "JAVA_PROFILE", "$(call profile_name, $(call profile_number, $(PROFILE)))")
-endif
+        ifneq ($(PROFILE), )
+	  $(call info-file-item, "JAVA_PROFILE", "$(call profile_name, $(call profile_number, $(PROFILE)))")
+        endif
 
 $(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
 	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
@@ -670,57 +679,57 @@
 ################################################################################
 # Post processing (strip etc)
 
-ifneq ($(POST_STRIP_CMD),)
-    ifeq ($(OPENJDK_TARGET_OS), windows)
-        EXEC_LIST_BIN:=$(filter-out %$(notdir $(MSVCR_DLL)),$(filter %.exe %.dll,$(ALL_BIN_LIST)))
-    else
-        # Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
-        EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \
-		| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
-        # On mac, the old build searches for static libraries for stripping instead of shared.
-        # Not clear if it's intentional.
-	ifneq ($(OPENJDK_TARGET_OS), macosx)
-            EXEC_LIST_LIB:=$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX))
-	endif
+ifneq ($(POST_STRIP_CMD), )
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    EXEC_LIST_BIN := $(filter-out %$(notdir $(MSVCR_DLL)), $(filter %.exe %.dll, $(ALL_BIN_LIST)))
+  else
+    # Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
+    EXEC_LIST_BIN := $(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \
+        | $(EGREP) 'ELF' | $(CUT) -d':' -f1)
+    # On mac, the old build searches for static libraries for stripping instead of shared.
+    # Not clear if it's intentional.
+    ifneq ($(OPENJDK_TARGET_OS), macosx)
+      EXEC_LIST_LIB := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX))
     endif
-    # Filter out sjavac
-    EXEC_LIST_BIN:=$(filter-out %sjavac$(EXE_SUFFIX),$(EXEC_LIST_BIN))
+  endif
+  # Filter out sjavac
+  EXEC_LIST_BIN := $(filter-out %sjavac$(EXE_SUFFIX), $(EXEC_LIST_BIN))
 
-    # Filter out the overlay specific bin files
-    EXEC_LIST:=$(filter-out $(OVERLAY_FILTER),$(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
-    EXEC_LIST_OVERLAY:=$(filter $(OVERLAY_FILTER),$(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
+  # Filter out the overlay specific bin files
+  EXEC_LIST := $(filter-out $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
+  EXEC_LIST_OVERLAY := $(filter $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
 
-    # Filter out non JRE files and convert to unique touch files to depend on
-    JRE_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped,\
-			$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\
-				 $(EXEC_LIST)))
+  # Filter out non JRE files and convert to unique touch files to depend on
+  JRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped, \
+      $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
+      $(EXEC_LIST)))
 
-    JDKJRE_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
-                        $(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \
-			$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
+  JDKJRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
+      $(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \
+      $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
 
-    JDK_BIN_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
-                          $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \
-                          $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST)))
+  JDK_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
+      $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \
+      $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST)))
 
-    # Do the same for overlay image
-    JRE_OVERLAY_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped,\
-			$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\
-				 $(EXEC_LIST_OVERLAY)))
+  # Do the same for overlay image
+  JRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped, \
+      $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
+      $(EXEC_LIST_OVERLAY)))
 
-    JDKJRE_OVERLAY_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
-                        $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \
-			$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST_OVERLAY)))
+  JDKJRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
+      $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \
+      $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST_OVERLAY)))
 
-    JDK_OVERLAY_BIN_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
-                          $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \
-                          $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY)))
+  JDK_OVERLAY_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
+      $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \
+      $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY)))
 
-    define mcs-file
-	$(if $(POST_MCS_CMD),$(POST_MCS_CMD) $<)
-    endef
+  define mcs-file
+	$(if $(POST_MCS_CMD), $(POST_MCS_CMD) $<)
+  endef
 
-    define strip-file
+  define strip-file
 	$(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<)
 	$(CHMOD) u+w $<
 	$(POST_STRIP_CMD) $<
@@ -728,19 +737,19 @@
 	$(CHMOD) go-w $<
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
-    endef
+  endef
 
-    # Setup a rule for stripping files based on touch files
-    $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped: $(JRE_IMAGE_DIR)/%
+  # Setup a rule for stripping files based on touch files
+  $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped: $(JRE_IMAGE_DIR)/%
 	$(call strip-file)
 
-    $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/%
+  $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/%
 	$(call strip-file)
 
-    $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/%
+  $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/%
 	$(call strip-file)
 
-    $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_IMAGE_DIR)/%
+  $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_IMAGE_DIR)/%
 	$(call strip-file)
 
 endif
@@ -749,45 +758,45 @@
 # Main targets
 
 jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \
-	$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
-	$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) \
-	$(JRE_BIN_ISADIR_LINK_TARGETS)
+    $(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
+    $(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) \
+    $(JRE_BIN_ISADIR_LINK_TARGETS)
 
 jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \
-	$(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \
-	$(JDK_IMAGE_DIR)/jre/lib/applet \
-	$(JDK_DEMO_TARGETS) \
-	$(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \
-	$(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \
-	$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \
-	$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \
-	$(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \
-        $(JDK_IMAGE_DIR)/src.zip \
-	$(JDK_BIN_ISADIR_LINK_TARGETS) $(JDKJRE_BIN_ISADIR_LINK_TARGETS)
+    $(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \
+    $(JDK_IMAGE_DIR)/jre/lib/applet \
+    $(JDK_DEMO_TARGETS) \
+    $(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \
+    $(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \
+    $(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \
+    $(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \
+    $(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \
+    $(JDK_IMAGE_DIR)/src.zip \
+    $(JDK_BIN_ISADIR_LINK_TARGETS) $(JDKJRE_BIN_ISADIR_LINK_TARGETS)
 
 jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \
-	 $(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST)
+    $(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST)
 
 jdk-overlay-image: $(JDK_OVERLAY_BIN_TARGETS) $(JDKJRE_OVERLAY_BIN_TARGETS) \
-	$(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \
-	$(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \
-	$(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST) 
+    $(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \
+    $(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \
+    $(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST)
 
-ifneq ($(PROFILE),)
-PROFILE_IMAGE_JARS := $(filter %.jar, $(JRE_LIB_TARGETS))
+ifneq ($(PROFILE), )
+  PROFILE_IMAGE_JARS := $(filter %.jar, $(JRE_LIB_TARGETS))
 
-PROFILE_IMAGE_JARS_CHECKED := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_jars_checked
+  PROFILE_IMAGE_JARS_CHECKED := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_jars_checked
 
-$(PROFILE_IMAGE_JARS_CHECKED) : $(PROFILE_IMAGE_JARS)
+  $(PROFILE_IMAGE_JARS_CHECKED) : $(PROFILE_IMAGE_JARS)
 	$(TOOL_CHECKDEPS) $(JRE_IMAGE_DIR) \
 	    $(call profile_name, $(call profile_number, $(PROFILE)))
 	$(TOUCH) $@
 
-profile-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) \
+  profile-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) \
 	$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
 	$(JRE_INFO_FILE) $(JRE_STRIP_LIST) $(PROFILE_IMAGE_JARS_CHECKED)
 
-.PHONY: profile-image
+  .PHONY: profile-image
 
 endif # Profile
 
--- a/makefiles/Import.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/Import.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -40,25 +40,25 @@
 #######
 
 # Put the libraries here. Different locations for different target apis.
-ifeq ($(OPENJDK_TARGET_OS_API),posix)
-    INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
-    HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+ifeq ($(OPENJDK_TARGET_OS_API), posix)
+  INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+  HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)
 else
-    INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin
-    HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/bin
+  INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
+  HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/bin
 endif
 
 #######
 
 #
 # jar xf/unzip fails when executing them all in parallel
-#   introduce artificial dependency (_DEP) buuhhh 
+# introduce artificial dependency (_DEP) buuhhh
 
 define ImportClasses
-$1_CLASSES_DEP := $$(IMPORT_TARGET_CLASSES)
-IMPORT_TARGET_CLASSES += $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported
+  $1_CLASSES_DEP := $$(IMPORT_TARGET_CLASSES)
+  IMPORT_TARGET_CLASSES += $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported
 
-$(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported : $$($1_DIST)/lib/classes.jar $$($1_CLASSES_DEP)
+  $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported: $$($1_DIST)/lib/classes.jar $$($1_CLASSES_DEP)
 	$(ECHO) Importing $1 classes.jar
 	$(MKDIR) -p $$(@D)
 	$(RM) $$@ $$@.tmp
@@ -67,10 +67,10 @@
 endef
 
 define ImportSources
-$1_SOURCES_DEP := $$(IMPORT_TARGET_SOURCES)
-IMPORT_TARGET_SOURCES += $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported
+  $1_SOURCES_DEP := $$(IMPORT_TARGET_SOURCES)
+  IMPORT_TARGET_SOURCES += $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported
 
-$(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported : $$($1_DIST)/lib/src.zip $$($1_SOURCES_DEP)
+  $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported: $$($1_DIST)/lib/src.zip $$($1_SOURCES_DEP)
 	$(ECHO) Importing $1 src.zip
 	$(MKDIR) -p $$(@D)
 	$(RM) $$@ $$@.tmp
@@ -79,10 +79,10 @@
 endef
 
 define ImportBinaries
-$1_BINARIES_DEP := $$(IMPORT_TARGET_BINARIES)
-IMPORT_TARGET_BINARIES += $(JDK_OUTPUTDIR)/_the.$1.binaries.imported
+  $1_BINARIES_DEP := $$(IMPORT_TARGET_BINARIES)
+  IMPORT_TARGET_BINARIES += $(JDK_OUTPUTDIR)/_the.$1.binaries.imported
 
-$(JDK_OUTPUTDIR)/_the.$1.binaries.imported : $$($1_DIST)/lib/bin.zip $$($1_BINARIES_DEP)
+  $(JDK_OUTPUTDIR)/_the.$1.binaries.imported: $$($1_DIST)/lib/bin.zip $$($1_BINARIES_DEP)
 	$(ECHO) Importing $1 bin.zip
 	$(MKDIR) -p $$(@D)
 	$(RM) $$@ $$@.tmp
@@ -92,19 +92,19 @@
 
 #######
 
-$(foreach I,$(IMPORT_CLASSES), $(eval $(call ImportClasses,$I)))
-$(foreach I,$(IMPORT_SOURCES), $(eval $(call ImportSources,$I)))
-$(foreach I,$(IMPORT_BINARIES), $(eval $(call ImportBinaries,$I)))
+$(foreach I, $(IMPORT_CLASSES), $(eval $(call ImportClasses,$I)))
+$(foreach I, $(IMPORT_SOURCES), $(eval $(call ImportSources,$I)))
+$(foreach I, $(IMPORT_BINARIES), $(eval $(call ImportBinaries,$I)))
 
 IMPORT_TARGET_FILES += $(IMPORT_TARGET_CLASSES) $(IMPORT_TARGET_SOURCES) $(IMPORT_TARGET_BINARIES)
 
 #######
 
 define CopyDir
-        $1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \))
-        $1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
-        IMPORT_TARGET_FILES += $$($1_DST_FILES)
-$3/% : $2/%
+  $1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \))
+  $1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
+  IMPORT_TARGET_FILES += $$($1_DST_FILES)
+  $3/%: $2/%
 	$(ECHO) $(LOG_INFO) Copying $$(@F)
 	$$(install-file)
 endef
@@ -114,41 +114,49 @@
 #
 # Import hotspot
 #
-HOTSPOT_IMPORT_FILES:=$(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \
-                      Xusage.txt sa-jdi.jar
+HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \
+    Xusage.txt sa-jdi.jar
 $(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE), $(HOTSPOT_IMPORT_FILES)))
 $(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib, $(HOTSPOT_IMPORT_FILES)))
 
-JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
-                  $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+    JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.dSYM) \
+                      $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
+else
+    JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
+                      $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
+endif
 
 ifneq ($(OPENJDK_TARGET_OS), windows)
-    ifeq ($(JVM_VARIANT_SERVER), true)
-        IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
-        ifneq (,$(JSIG_DEBUGINFO))
-            IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
-        endif
+  ifeq ($(JVM_VARIANT_SERVER), true)
+    IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
+    ifneq (, $(JSIG_DEBUGINFO))
+      IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
     endif
-    ifeq ($(JVM_VARIANT_CLIENT), true)
-        IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
-        ifneq (,$(JSIG_DEBUGINFO))
-            IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
-        endif
+  endif
+  ifeq ($(JVM_VARIANT_CLIENT), true)
+    IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
+    ifneq (, $(JSIG_DEBUGINFO))
+      IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
     endif
-    ifeq ($(JVM_VARIANT_MINIMAL1), true)
-        IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
-        ifneq (,$(JSIG_DEBUGINFO))
-            IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
+  endif
+    ifneq ($(OPENJDK_TARGET_OS), macosx)
+        ifeq ($(JVM_VARIANT_MINIMAL1), true)
+            IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
+            ifneq (,$(JSIG_DEBUGINFO))
+                IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
+            endif
         endif
     endif
 endif
 
-$(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+$(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../$(@F) $@
 
-$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+$(INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(INSTALL_LIBRARIES_HERE)/%.dSYM
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../$(@F) $@
@@ -156,23 +164,18 @@
 $(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
 	$(MKDIR) -p $(@D)
 	$(RM) $@
-	$(RM) $@.tmp $(basename $@).debuginfo
-	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
-	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
-	$(RM) $(basename $@).debuginfo
+	$(RM) $@.tmp $(basename $@).dSYM
+	$(LN) -s ../$(basename $(@F)).dSYM $(basename $@).dSYM
+	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).dSYM
+	$(RM) $(basename $@).dSYM
 	$(MV) $@.tmp $@
-
-$(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+else
+$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../$(@F) $@
 
-$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-$(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
+$(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(RM) $@.tmp $(basename $@).debuginfo
@@ -180,18 +183,34 @@
 	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
 	$(RM) $(basename $@).debuginfo
 	$(MV) $@.tmp $@
+endif
 
-$(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+$(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(LN) -s ../$(@F) $@
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+$(INSTALL_LIBRARIES_HERE)/client/%.dSYM : $(INSTALL_LIBRARIES_HERE)/%.dSYM
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../$(@F) $@
 
-$(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+$(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(RM) $@.tmp $(basename $@).dSYM
+	$(LN) -s ../$(basename $(@F)).dSYM $(basename $@).dSYM
+	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).dSYM
+	$(RM) $(basename $@).dSYM
+	$(MV) $@.tmp $@
+else
+$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../$(@F) $@
 
-$(INSTALL_LIBRARIES_HERE)/minimal/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
+$(INSTALL_LIBRARIES_HERE)/client/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(RM) $@.tmp $(basename $@).debuginfo
@@ -199,13 +218,35 @@
 	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
 	$(RM) $(basename $@).debuginfo
 	$(MV) $@.tmp $@
+endif
+
+$(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(LN) -s ../$(@F) $@
+
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+$(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(LN) -s ../$(@F) $@
+
+$(INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(RM) $@.tmp $(basename $@).debuginfo
+	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
+	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
+	$(RM) $(basename $@).debuginfo
+	$(MV) $@.tmp $@
+endif
 
 ##########################################################################################
 # Unpack the binary distributions of the crypto classes if they exist.
-SEC_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip
-SEC_FILES_WIN_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip
-JGSS_WIN32_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip
-JGSS_WIN64_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip
+SEC_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip
+SEC_FILES_WIN_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip
+JGSS_WIN32_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip
+JGSS_WIN64_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip
 
 define unzip-sec-file
 	$(ECHO) Unzipping $(<F)
@@ -227,14 +268,14 @@
 $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
 	$(call unzip-sec-file)
 
-ifneq ($(wildcard $(SEC_FILES_ZIP)),)
+ifneq ($(wildcard $(SEC_FILES_ZIP)), )
   IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped
-  ifeq ($(OPENJDK_TARGET_OS),windows)
+  ifeq ($(OPENJDK_TARGET_OS), windows)
     IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped
-    ifeq ($(OPENJDK_TARGET_CPU),x86)
+    ifeq ($(OPENJDK_TARGET_CPU), x86)
       IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped
     endif
-    ifeq ($(OPENJDK_TARGET_CPU),x86_64)
+    ifeq ($(OPENJDK_TARGET_CPU), x86_64)
       IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped
     endif
   endif
--- a/makefiles/Makefile	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/Makefile	Wed Oct 30 18:38:20 2013 +0000
@@ -24,19 +24,19 @@
 #
 
 # Locate this Makefile
-ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
-    makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
+ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
+  makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
 else
-    makefile_path:=$(lastword $(MAKEFILE_LIST))
+  makefile_path := $(lastword $(MAKEFILE_LIST))
 endif
-repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path))
+repo_dir := $(patsubst %/makefiles/Makefile, %, $(makefile_path))
 
 # What is the name of this subsystem (langtools, corba, etc)?
-subsystem_name:=$(notdir $(repo_dir))
+subsystem_name := $(notdir $(repo_dir))
 
 # Try to locate top-level makefile
-top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile
-ifneq ($(wildcard $(top_level_makefile)),)
+top_level_makefile := $(repo_dir)/../common/makefiles/Makefile
+ifneq ($(wildcard $(top_level_makefile)), )
   $(info Will run $(subsystem_name) target on top-level Makefile)
   $(info WARNING: This is a non-recommended way of building!)
   $(info ===================================================)
--- a/makefiles/PatchList.solaris	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/PatchList.solaris	Wed Oct 30 18:38:20 2013 +0000
@@ -19,7 +19,7 @@
 RUNTIME       5.8 Sparc 108773-18 x86 108774-18 REQ "X input method patch"
 RUNTIME       5.8 Sparc 110386-03 x86 none      REQ "RBAC Feature Patch"
 RUNTIME       5.8 Sparc 111023-02 x86 none      REQ "/kernel/fs/mntfs and /kernel/fs/sparcv9/mntfs patch"
-RUNTIME       5.8 Sparc 112472-01 x86 112473-01 OPT "Font2DTest2 patch" 
+RUNTIME       5.8 Sparc 112472-01 x86 112473-01 OPT "Font2DTest2 patch"
 RUNTIME       5.8 Sparc 112438-01 x86 112439-01 REQ "/kernel/drv/random patch"
 
 COMPILER      5.8 Sparc 109505-06 x86 109502-03 REQ "For C 5.0, C++ 5.0"
@@ -28,4 +28,3 @@
 COMPILER      5.8 Sparc 109510-03 x86 109511-03 REQ "For Forte 6.1 Debugger"
 COMPILER      5.8 Sparc 109516-02 x86 109517-02 REQ "For Forte 6.1 Performance Analyzer"
 COMPILER      5.8 Sparc 110480-01 x86 110481-01 REQ "For Forte TeamWare"
-
--- a/makefiles/ProfileNames.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/ProfileNames.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -31,7 +31,7 @@
 PROFILE_NAMES := compact1 compact2 compact3
 
 # The include files use 1,2,3 for simplicity and conciseness. Internally we
-# use profile_1, profile_2 and profile_3. 
+# use profile_1, profile_2 and profile_3.
 
 ALL_PROFILES := profile_1 profile_2 profile_3
 
@@ -48,7 +48,7 @@
 PROFILE_VERSION_CLASS_TARGETS := $(foreach i, $(PROFILE_VERSION_JAVA_TARGETS), $(i:.java=.class))
 
 # Function to map from profile designator, profile_1 etc, to its number
-profile_number = $(if $(patsubst profile_%,%, $(1)),$(patsubst profile_%,%, $(1)), $(words $(PROFILE_NAMES) extra))
+profile_number = $(if $(patsubst profile_%,%, $(1)), $(patsubst profile_%,%, $(1)), $(words $(PROFILE_NAMES) extra))
 
 # Function to map from profile number, 1, 2 etc, to the corresponding name
 # An invalid number maps to an empty name
@@ -58,7 +58,6 @@
 # Evaluates to the arg if the arg is not a profile version target
 profile_version_number = $(patsubst $(JDK_OUTPUTDIR)/gen_profile_%/$(VERSION_JAVA_PATH), %, $(1))
 
-# Function to go from a profile Version.java target to profile name. If not 
+# Function to go from a profile Version.java target to profile name. If not
 # a profile version target then we need a number that maps to an empty name
 profile_version_name = $(word $(if $(filter-out $(call profile_version_number, $(1)), $(1)), $(call profile_version_number, $(1)), $(words $(PROFILE_NAMES) extra)), $(PROFILE_NAMES))
-
--- a/makefiles/Profiles.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/Profiles.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -58,7 +58,7 @@
 # These are the common jar files built for and included with this profile
 # Filter out the custom jars and turn them into targets.
 
-PROFILE_1_JARS :=  \
+PROFILE_1_JARS := \
     $(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(filter-out $(CUSTOM_JARS), $(PROFILE_1_JRE_JAR_FILES)))
 
 PROFILE_2_JARS := \
@@ -70,7 +70,7 @@
     $(PROFILE_2_JARS)
 
 ifneq ($(ENABLE_JFR), true)
-  FULL_JRE_JAR_FILES :=  $(filter-out jfr.jar, $(FULL_JRE_JAR_FILES))
+  FULL_JRE_JAR_FILES := $(filter-out jfr.jar, $(FULL_JRE_JAR_FILES))
 endif
 
 FULL_JRE_JARS := \
@@ -83,43 +83,43 @@
 # rt.jar and resources.jar that we filtered out above
 
 ALL_JARS := $(FULL_JRE_JARS) \
-        $(IMAGES_OUTPUTDIR)/lib/rt.jar \
-        $(IMAGES_OUTPUTDIR)/lib/resources.jar \
-        $(IMAGES_OUTPUTDIR)/lib/jconsole.jar \
-        $(IMAGES_OUTPUTDIR)/lib/dt.jar \
-        $(IMAGES_OUTPUTDIR)/lib/tools.jar \
-        $(IMAGES_OUTPUTDIR)/lib/ct.sym \
-        $(IMAGES_OUTPUTDIR)/src.zip
+    $(IMAGES_OUTPUTDIR)/lib/rt.jar \
+    $(IMAGES_OUTPUTDIR)/lib/resources.jar \
+    $(IMAGES_OUTPUTDIR)/lib/jconsole.jar \
+    $(IMAGES_OUTPUTDIR)/lib/dt.jar \
+    $(IMAGES_OUTPUTDIR)/lib/tools.jar \
+    $(IMAGES_OUTPUTDIR)/lib/ct.sym \
+    $(IMAGES_OUTPUTDIR)/src.zip
 
-ifeq ($(INCLUDE_SA),true)
-    ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
+ifeq ($(INCLUDE_SA), true)
+  ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
 endif
 
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-    ifndef OPENJDK
-        ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
-    endif
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifndef OPENJDK
+    ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
+  endif
 endif
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
 endif
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-    ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/JObjC.jar
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/JObjC.jar
 endif
 
 ifeq ($(PROFILE), profile_1)
-    PROFILE_JARS := $(PROFILE_1_JARS)
+  PROFILE_JARS := $(PROFILE_1_JARS)
 else ifeq ($(PROFILE), profile_2)
-    PROFILE_JARS := $(PROFILE_2_JARS)
+  PROFILE_JARS := $(PROFILE_2_JARS)
 else ifeq ($(PROFILE), profile_3)
-    PROFILE_JARS := $(PROFILE_3_JARS)
+  PROFILE_JARS := $(PROFILE_3_JARS)
 endif
-ifneq ($(PROFILE),)
-    JARS := $(CUSTOM_PROFILE_JARS) $(PROFILE_JARS)
+ifneq ($(PROFILE), )
+  JARS := $(CUSTOM_PROFILE_JARS) $(PROFILE_JARS)
 else
-    JARS := $(ALL_JARS)
+  JARS := $(ALL_JARS)
 endif
 
 ###############################################################################
@@ -128,37 +128,37 @@
 
 
 # we don't need to do anything if not building a profile
-ifneq ($(PROFILE),)
+ifneq ($(PROFILE), )
 
 
 # Need all files to generate the exclude lists
 NEW_ALL_BIN_LIST := $(patsubst $(JDK_OUTPUTDIR)/bin/%,%,$(shell $(FIND) $(JDK_OUTPUTDIR)/bin \( -type f -o -type l \) ! -name "sjavac"))
 
 ALL_JRE_BIN_FILES := \
-   $(PROFILE_1_JRE_BIN_FILES) \
-   $(PROFILE_2_JRE_BIN_FILES) \
-   $(PROFILE_3_JRE_BIN_FILES) \
-   $(FULL_JRE_BIN_FILES)
+    $(PROFILE_1_JRE_BIN_FILES) \
+    $(PROFILE_2_JRE_BIN_FILES) \
+    $(PROFILE_3_JRE_BIN_FILES) \
+    $(FULL_JRE_BIN_FILES)
 
 NOT_JRE_BIN_FILES := $(filter-out $(ALL_JRE_BIN_FILES), $(NEW_ALL_BIN_LIST))
 
 # Additional exclusions for profile JRE
 ifeq ($(PROFILE), profile_1)
-    NOT_JRE_BIN_FILES += \
-        $(PROFILE_2_JRE_BIN_FILES) \
-        $(PROFILE_3_JRE_BIN_FILES) \
-        $(FULL_JRE_BIN_FILES)
+  NOT_JRE_BIN_FILES += \
+      $(PROFILE_2_JRE_BIN_FILES) \
+      $(PROFILE_3_JRE_BIN_FILES) \
+      $(FULL_JRE_BIN_FILES)
 endif
 
 ifeq ($(PROFILE), profile_2)
-    NOT_JRE_BIN_FILES += \
-        $(PROFILE_3_JRE_BIN_FILES) \
-        $(FULL_JRE_BIN_FILES)
+  NOT_JRE_BIN_FILES += \
+      $(PROFILE_3_JRE_BIN_FILES) \
+      $(FULL_JRE_BIN_FILES)
 endif
 
 ifeq ($(PROFILE), profile_3)
-    NOT_JRE_BIN_FILES += \
-        $(FULL_JRE_BIN_FILES)
+  NOT_JRE_BIN_FILES += \
+      $(FULL_JRE_BIN_FILES)
 endif
 
 NOT_JRE_BIN_FILES := $(addprefix $(JDK_OUTPUTDIR)/bin/, $(NOT_JRE_BIN_FILES))
@@ -168,10 +168,10 @@
 NEW_ALL_LIB_LIST += $(patsubst $(IMAGES_OUTPUTDIR)/lib/%,%,$(shell $(FIND) $(IMAGES_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \( -name "_the*" -o -name "javac_state " \) ))
 
 ALL_JRE_LIB_FILES := \
-   $(PROFILE_1_JRE_LIB_FILES) \
-   $(PROFILE_2_JRE_LIB_FILES) \
-   $(PROFILE_3_JRE_LIB_FILES) \
-   $(FULL_JRE_LIB_FILES)
+    $(PROFILE_1_JRE_LIB_FILES) \
+    $(PROFILE_2_JRE_LIB_FILES) \
+    $(PROFILE_3_JRE_LIB_FILES) \
+    $(FULL_JRE_LIB_FILES)
 
 NOT_JRE_LIB_FILES := $(filter-out $(ALL_JRE_LIB_FILES), $(NEW_ALL_LIB_LIST))
 
@@ -184,21 +184,21 @@
 
 # Additional exclusions for profile JREs
 ifeq ($(PROFILE), profile_1)
-    NOT_JRE_LIB_FILES += \
-        $(PROFILE_2_JRE_LIB_FILES) \
-        $(PROFILE_3_JRE_LIB_FILES) \
-        $(FULL_JRE_LIB_FILES)
+  NOT_JRE_LIB_FILES += \
+      $(PROFILE_2_JRE_LIB_FILES) \
+      $(PROFILE_3_JRE_LIB_FILES) \
+      $(FULL_JRE_LIB_FILES)
 endif
 
 ifeq ($(PROFILE), profile_2)
-    NOT_JRE_LIB_FILES += \
-        $(PROFILE_3_JRE_LIB_FILES) \
-        $(FULL_JRE_LIB_FILES)
+  NOT_JRE_LIB_FILES += \
+      $(PROFILE_3_JRE_LIB_FILES) \
+      $(FULL_JRE_LIB_FILES)
 endif
 
 ifeq ($(PROFILE), profile_3)
-    NOT_JRE_LIB_FILES += \
-        $(FULL_JRE_LIB_FILES)
+  NOT_JRE_LIB_FILES += \
+      $(FULL_JRE_LIB_FILES)
 endif
 
 # Exclude the custom jar files as these will be added back via a special rule
@@ -272,58 +272,57 @@
 # NOTE: Classfiles with $ in their name are problematic as that is the
 # meta-character for both make and the shell! Hence the \$$$$ substitution.
 # But note that if you echo these values they will NOT display as expected.
-class_list =  $(patsubst $(JDK_OUTPUTDIR)/classes/%,%,\
-     $(foreach i,$(1), $(subst $$,\$$$$, $(wildcard $(JDK_OUTPUTDIR)/classes/$i))))
+class_list = $(patsubst $(JDK_OUTPUTDIR)/classes/%,%, \
+    $(foreach i, $(1), $(subst $$,\$$$$, $(wildcard $(JDK_OUTPUTDIR)/classes/$i))))
 
 ifeq ($(PROFILE), profile_1)
   RT_JAR_EXCLUDES += \
-    $(call class_list, $(PROFILE_1_RTJAR_EXCLUDE_TYPES)) \
-    $(PROFILE_2_RTJAR_INCLUDE_PACKAGES) \
-    $(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
-    $(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
-    $(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
-    $(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
-    $(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
+      $(call class_list, $(PROFILE_1_RTJAR_EXCLUDE_TYPES)) \
+      $(PROFILE_2_RTJAR_INCLUDE_PACKAGES) \
+      $(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
+      $(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
+      $(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
+      $(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
+      $(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
   RT_JAR_INCLUDE_TYPES := \
-	$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES))
+      $(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES))
   PROFILE_INCLUDE_METAINF_SERVICES := \
-    $(PROFILE_1_INCLUDE_METAINF_SERVICES)
+      $(PROFILE_1_INCLUDE_METAINF_SERVICES)
 endif
 ifeq ($(PROFILE), profile_2)
   RT_JAR_EXCLUDES += \
-    $(call class_list, $(PROFILE_2_RTJAR_EXCLUDE_TYPES)) \
-    $(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
-    $(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
-    $(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
-    $(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
+      $(call class_list, $(PROFILE_2_RTJAR_EXCLUDE_TYPES)) \
+      $(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
+      $(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
+      $(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
+      $(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
   RT_JAR_INCLUDE_TYPES := \
-	$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
-	$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES))
+      $(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
+      $(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES))
   PROFILE_INCLUDE_METAINF_SERVICES := \
-    $(PROFILE_1_INCLUDE_METAINF_SERVICES) \
-    $(PROFILE_2_INCLUDE_METAINF_SERVICES)
+      $(PROFILE_1_INCLUDE_METAINF_SERVICES) \
+      $(PROFILE_2_INCLUDE_METAINF_SERVICES)
 endif
 ifeq ($(PROFILE), profile_3)
   RT_JAR_EXCLUDES += \
-    $(call class_list, $(PROFILE_3_RTJAR_EXCLUDE_TYPES)) \
-    $(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
-    $(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
+      $(call class_list, $(PROFILE_3_RTJAR_EXCLUDE_TYPES)) \
+      $(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
+      $(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
   RT_JAR_INCLUDE_TYPES := \
-	$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
-	$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
-	$(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES))
+      $(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
+      $(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
+      $(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES))
   PROFILE_INCLUDE_METAINF_SERVICES := \
-    $(PROFILE_1_INCLUDE_METAINF_SERVICES) \
-    $(PROFILE_2_INCLUDE_METAINF_SERVICES) \
-    $(PROFILE_3_INCLUDE_METAINF_SERVICES)
+      $(PROFILE_1_INCLUDE_METAINF_SERVICES) \
+      $(PROFILE_2_INCLUDE_METAINF_SERVICES) \
+      $(PROFILE_3_INCLUDE_METAINF_SERVICES)
 endif
 
 # Filter out non-OpenJDK services
 ifdef OPENJDK
   EXCLUDED_SERVICES := META-INF/services/javax.script.ScriptEngineFactory
-  PROFILE_INCLUDE_METAINF_SERVICES := $(filter-out $(EXCLUDED_SERVICES),$(PROFILE_INCLUDE_METAINF_SERVICES))
+  PROFILE_INCLUDE_METAINF_SERVICES := $(filter-out $(EXCLUDED_SERVICES), $(PROFILE_INCLUDE_METAINF_SERVICES))
 endif
 
 
 endif # profile
-
--- a/makefiles/Setup.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/Setup.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -23,40 +23,45 @@
 # questions.
 #
 
-DISABLE_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
+DISABLE_WARNINGS := -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
 
 # To build with all warnings enabled, do the following:
-# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000" 
-JAVAC_WARNINGS:=-Xlint:-unchecked,-deprecation,-overrides,classfile,dep-ann,divzero,varargs -Werror
+# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
+JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,try,varargs -Werror
 
+# Any java code executed during a JDK build to build other parts of the JDK must be 
+# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this 
+# purpose must be built with -target PREVIOUS for bootstrapping purposes, which 
+# requires restricting to language level and api of previous JDK.
+#
 # The generate old bytecode javac setup uses the new compiler to compile for the
 # boot jdk to generate tools that need to be run with the boot jdk.
-# Thus we force the target bytecode to 7.
-$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
-     JVM:=$(JAVA),\
-     JAVAC:=$(NEW_JAVAC),\
-     FLAGS:=-source 7 -target 7 -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS),\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+# Thus we force the target bytecode to the previous JDK version.
+$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
+    JVM := $(JAVA), \
+    JAVAC := $(NEW_JAVAC), \
+    FLAGS := $(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS), \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
 # The generate new bytecode javac setup uses the new compiler to compile for the
 # new jdk. This new bytecode might only be possible to run using the new jvm.
-$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE,\
-     JVM:=$(JAVA),\
-     JAVAC:=$(NEW_JAVAC),\
-     FLAGS:=-bootclasspath $(JDK_OUTPUTDIR)/classes -source 8 -target 8 \
-	    -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS) \
-	    $(GENERATE_JDKBYTECODE_EXTRA_FLAGS),\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
+    JVM := $(JAVA), \
+    JAVAC := $(NEW_JAVAC), \
+    FLAGS := -bootclasspath $(JDK_OUTPUTDIR)/classes -source 8 -target 8 \
+        -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS) \
+        $(GENERATE_JDKBYTECODE_EXTRA_FLAGS), \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
 # After the jdk is built, we want to build demos using only the recently
 # generated jdk classes and nothing else, no jdk source, etc etc.
 # I.e. the rt.jar, but since rt.jar has not yet been generated
 # (it will be in "make images") therefore we use classes instead.
-$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE,\
-     JVM:=$(JAVA),\
-     JAVAC:=$(NEW_JAVAC),\
-     FLAGS:=-bootclasspath $(JDK_OUTPUTDIR)/classes $(DISABLE_WARNINGS),\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
+    JVM := $(JAVA), \
+    JAVAC := $(NEW_JAVAC), \
+    FLAGS := -bootclasspath $(JDK_OUTPUTDIR)/classes $(DISABLE_WARNINGS), \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
--- a/makefiles/SignJars.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/SignJars.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -26,11 +26,11 @@
 include $(SPEC)
 include MakeBase.gmk
 
-# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Oracle JDK 
+# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Oracle JDK
 # builds respectively.)
 #
-# JCE builds are very different between OpenJDK and JDK.  The OpenJDK JCE
-# jar files do not require signing, but those for JDK do.  If an unsigned
+# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
+# jar files do not require signing, but those for JDK do. If an unsigned
 # jar file is installed into JDK, things will break when the crypto
 # routines are called.
 #
@@ -40,15 +40,15 @@
 # For JDK, the binaries use pre-built/pre-signed binary files stored in
 # the closed workspace that are not shipped in the OpenJDK workspaces.
 # We still build the JDK files to verify the files compile, and in
-# preparation for possible signing.  Developers working on JCE in JDK
-# must sign the JCE files before testing.  The JCE signing key is kept
+# preparation for possible signing. Developers working on JCE in JDK
+# must sign the JCE files before testing. The JCE signing key is kept
 # separate from the JDK workspace to prevent its disclosure.
 #
-# SPECIAL NOTE TO JCE/JDK developers:  The source files must eventually
+# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
 # be built, signed, and then the resulting jar files MUST BE CHECKED
-# INTO THE CLOSED PART OF THE WORKSPACE*.  This separate step *MUST NOT
+# INTO THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT
 # BE FORGOTTEN*, otherwise a bug fixed in the source code will not be
-# reflected in the shipped binaries.  The "sign-jars" target in the top
+# reflected in the shipped binaries. The "sign-jars" target in the top
 # level Makefile should be used to generate the required files.
 #
 
@@ -63,19 +63,19 @@
 #
 # Location for JCE codesigning key.
 #
-SIGNING_KEY_DIR    := /security/ws/JCE-signing/src
-SIGNING_KEYSTORE   := $(SIGNING_KEY_DIR)/KeyStore.jks
+SIGNING_KEY_DIR := /security/ws/JCE-signing/src
+SIGNING_KEYSTORE := $(SIGNING_KEY_DIR)/KeyStore.jks
 SIGNING_PASSPHRASE := $(SIGNING_KEY_DIR)/passphrase.txt
-SIGNING_ALIAS      := oracle_jce_rsa
+SIGNING_ALIAS := oracle_jce_rsa
 
 #
 # Defines for signing the various jar files.
 #
 check-keystore:
 	@if [ ! -f $(SIGNING_KEYSTORE) -o ! -f $(SIGNING_PASSPHRASE) ]; then \
-	    $(PRINTF) "\n$(SIGNING_KEYSTORE): Signing mechanism *NOT* available..."; \
-	    $(PRINTF) $(README-MAKEFILE_WARNING); \
-	    exit 2; \
+	  $(PRINTF) "\n$(SIGNING_KEYSTORE): Signing mechanism *NOT* available..."; \
+	  $(PRINTF) $(README-MAKEFILE_WARNING); \
+	  exit 2; \
 	fi
 
 $(JCE_OUTPUTDIR)/%: $(IMAGES_OUTPUTDIR)/unsigned/%
@@ -85,11 +85,11 @@
 	@$(PRINTF) "\nJar codesigning finished.\n"
 
 JAR_LIST := jce.jar \
-            local_policy.jar \
-            sunec.jar \
-            sunjce_provider.jar \
-            sunpkcs11.jar \
-            US_export_policy.jar
+    local_policy.jar \
+    sunec.jar \
+    sunjce_provider.jar \
+    sunpkcs11.jar \
+    US_export_policy.jar
 
 SIGNED_JARS := $(addprefix $(JCE_OUTPUTDIR)/,$(JAR_LIST))
 
@@ -97,7 +97,7 @@
 
 all: $(SIGNED_JARS)
 	@$(PRINTF) "\n***The jar files built by the 'jar-sign' target must***"
-	@$(PRINTF) "\n***still be checked into the closed workspace!     ***"
-	@$(PRINTF)  $(README-MAKEFILE_WARNING)
+	@$(PRINTF) "\n***still be checked into the closed workspace!***"
+	@$(PRINTF) $(README-MAKEFILE_WARNING)
 
-endif  # !OPENJDK
+endif # !OPENJDK
--- a/makefiles/Tools.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/Tools.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -24,131 +24,130 @@
 #
 
 # Cache all finds needed for this file. Only used on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/make/tools \
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/make/tools \
     $(JDK_TOPDIR)/makefiles/sun))
 
-TOOLS_SRC:=$(JDK_TOPDIR)/make/tools/src \
-           $(JDK_TOPDIR)/makefiles/sun/awt/ \
-           $(JDK_TOPDIR)/makefiles/sun/osxapp \
-           $(JDK_TOPDIR)/make/tools/swing-beans
+TOOLS_SRC := $(JDK_TOPDIR)/make/tools/src \
+    $(JDK_TOPDIR)/makefiles/sun/awt/ \
+    $(JDK_TOPDIR)/makefiles/sun/osxapp \
+    $(JDK_TOPDIR)/make/tools/swing-beans
 
-ifneq ($(OPENJDK_TARGET_OS),windows)
-  TOOLS_SRC+=$(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  TOOLS_SRC += $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
 endif
 
 # The exception handling of swing beaninfo which have the own tool directory
-ifeq (,$(BUILD_TOOLS))
-$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
-                SETUP:=GENERATE_OLDBYTECODE,\
-		SRC:=$(TOOLS_SRC),\
-		BIN:=$(JDK_OUTPUTDIR)/btclasses))
-
+ifeq (, $(BUILD_TOOLS))
+  $(eval $(call SetupJavaCompilation,BUILD_TOOLS, \
+      SETUP := GENERATE_OLDBYTECODE, \
+      SRC := $(TOOLS_SRC), \
+      BIN := $(JDK_OUTPUTDIR)/btclasses))
 endif
 
-$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template : \
-		$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
+$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template: \
+    $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
 	$(call install-file)
 
-BUILD_TOOLS += $(foreach i,$(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template),$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
+BUILD_TOOLS += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template), $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
 
 # Resources used by CheckDeps tool
-$(JDK_OUTPUTDIR)/btclasses/build/tools/deps/% : \
-		$(JDK_TOPDIR)/make/tools/src/build/tools/deps/%
+$(JDK_OUTPUTDIR)/btclasses/build/tools/deps/%: \
+    $(JDK_TOPDIR)/make/tools/src/build/tools/deps/%
 	$(call install-file)
 
 BUILD_TOOLS += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed
 
 # Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
-TOOL_ADDJSUM=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.addjsum.AddJsum
+TOOL_ADDJSUM = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.addjsum.AddJsum
 
 # The buildmetaindex tool creates a meta-index to make core class loaders lazier.
-TOOL_BUILDMETAINDEX=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.buildmetaindex.BuildMetaIndex
+TOOL_BUILDMETAINDEX = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.buildmetaindex.BuildMetaIndex
 
 # The comment checker is not currently used. Should it be removed or added to javac?
-TOOL_COMMENTCHECKER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.commentchecker.CommentChecker
+TOOL_COMMENTCHECKER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.commentchecker.CommentChecker
 
-TOOL_COMPILEFONTCONFIG=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.compilefontconfig.CompileFontConfig
+TOOL_COMPILEFONTCONFIG = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.compilefontconfig.CompileFontConfig
 
-TOOL_COMPILEPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.compileproperties.CompileProperties
+TOOL_COMPILEPROPERTIES = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.compileproperties.CompileProperties
 
-TOOL_STRIPPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.stripproperties.StripProperties
+TOOL_STRIPPROPERTIES = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.stripproperties.StripProperties
 
-TOOL_JARREORDER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.jarreorder.JarReorder
+TOOL_JARREORDER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.jarreorder.JarReorder
 
-TOOL_GENERATECHARACTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatecharacter.GenerateCharacter
+TOOL_GENERATECHARACTER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatecharacter.GenerateCharacter
 
-TOOL_CHARACTERNAME=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatecharacter.CharacterName
+TOOL_CHARACTERNAME = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatecharacter.CharacterName
 
-TOOL_DIRDIFF=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.dirdiff.DirDiff
+TOOL_DIRDIFF = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.dirdiff.DirDiff
 
-TOOL_DTDBUILDER=$(JAVA) -Ddtd_home=$(JDK_TOPDIR)/make/tools/dtdbuilder/dtds \
-	-cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
+TOOL_DTDBUILDER = $(JAVA) -Ddtd_home=$(JDK_TOPDIR)/make/tools/dtdbuilder/dtds \
+    -cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
 
-TOOL_GENERATEBREAKITERATORDATA=$(JAVA) \
-	-cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatebreakiteratordata.GenerateBreakIteratorData
+TOOL_GENERATEBREAKITERATORDATA = $(JAVA) \
+    -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatebreakiteratordata.GenerateBreakIteratorData
 
-TOOL_GENERATECURRENCYDATA=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatecurrencydata.GenerateCurrencyData
+TOOL_GENERATECURRENCYDATA = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatecurrencydata.GenerateCurrencyData
 
-TOOL_HASHER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.hasher.Hasher
+TOOL_HASHER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.hasher.Hasher
 
 # Jarsplit used in jdk/makefiles/common/Release.gmk
-TOOL_JARSPLIT=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.jarsplit.JarSplit
+TOOL_JARSPLIT = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.jarsplit.JarSplit
 
-TOOL_TZDB=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.tzdb.TzdbZoneRulesCompiler
+TOOL_TZDB = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.tzdb.TzdbZoneRulesCompiler
 
 
-# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml 
+# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
 # and nbproject/project.properties in the same dir. Needs to be looked at.
-TOOL_JDWPGEN=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
+TOOL_JDWPGEN = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
 
 # TODO: Lots of files in jdk/make/tools/CharsetMapping dir
-TOOL_CHARSETMAPPING=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.charsetmapping.Main
+TOOL_CHARSETMAPPING = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.charsetmapping.Main
 
-TOOL_SPP=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
+TOOL_SPP = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
 
 # TODO: Only referenced in jdk/make/tools/sharing/README.txt. Find out what it means.
-TOOL_MAKECLASSLIST=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.makeclasslist.MakeClasslist
+TOOL_MAKECLASSLIST = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.makeclasslist.MakeClasslist
 
 # Nimbus is used somewhere in the swing build.
-TOOL_GENERATENIMBUS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatenimbus.Generator
+TOOL_GENERATENIMBUS = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatenimbus.Generator
 
-TOOL_WRAPPERGENERATOR=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	WrapperGenerator
+TOOL_WRAPPERGENERATOR = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    WrapperGenerator
 
-TOOL_AWT_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
-	sun.awt.ToBin
+TOOL_AWT_TOBIN = $(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+    sun.awt.ToBin
 
-TOOL_OSX_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
-	sun.osxapp.ToBin
+TOOL_OSX_TOBIN = $(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+    sun.osxapp.ToBin
 
-TOOL_CLDRCONVERTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.cldrconverter.CLDRConverter
+TOOL_CLDRCONVERTER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.cldrconverter.CLDRConverter
 
-TOOL_REMOVEMETHODS=$(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+TOOL_REMOVEMETHODS = $(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
     -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
-        build.tools.classfile.RemoveMethods
+    build.tools.classfile.RemoveMethods
 
-TOOL_CHECKDEPS=$(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+TOOL_CHECKDEPS = $(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
     -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
-        build.tools.deps.CheckDeps
+    build.tools.deps.CheckDeps
 
 TOOL_ADDTORESTRICTEDPKGS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  	build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
@@ -157,22 +156,24 @@
 
 # Tools needed on solaris because OBJCOPY is broken.
 
-$(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK,\
-		SRC:=$(JDK_TOPDIR)/make/tools/add_gnu_debuglink,\
-		LANG:=C,\
-		CC:=$(BUILD_CC),\
-		LDEXE:=$(BUILD_LD),\
-		LDFLAGS:=-lelf,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/add_gnu_debuglink,\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
-                PROGRAM:=add_gnu_debuglink))
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+$(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK, \
+    SRC := $(JDK_TOPDIR)/make/tools/add_gnu_debuglink, \
+    LANG := C, \
+    CC := $(BUILD_CC), \
+    LDEXE := $(BUILD_LD), \
+    LDFLAGS := -lelf, \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/add_gnu_debuglink, \
+    OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \
+    PROGRAM := add_gnu_debuglink))
 
-$(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS,\
-		SRC:=$(JDK_TOPDIR)/make/tools/fix_empty_sec_hdr_flags,\
-		LANG:=C,\
-		CC:=$(BUILD_CC),\
-		LDEXE:=$(BUILD_LD),\
-		LDFLAGS:=-lelf,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags,\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
-                PROGRAM:=fix_empty_sec_hdr_flags))
+$(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
+    SRC := $(JDK_TOPDIR)/make/tools/fix_empty_sec_hdr_flags, \
+    LANG := C, \
+    CC := $(BUILD_CC), \
+    LDEXE := $(BUILD_LD), \
+    LDFLAGS := -lelf, \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \
+    OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \
+    PROGRAM := fix_empty_sec_hdr_flags))
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gendata/GendataBreakIterator.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,99 @@
+#
+# 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
+# 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.
+#
+
+#
+# Make file for generating BreakIterator data files.
+#
+
+# input
+#
+# Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
+# They are used at JDK build phase in order to create $(BIFILES) which
+# are used on runtime instead.
+#
+TEXT_SRCDIR = $(JDK_TOPDIR)/src/share/classes
+TEXT_PKG = sun/text/resources
+TEXT_SOURCES = $(TEXT_PKG)/BreakIteratorRules.java \
+    $(TEXT_PKG)/BreakIteratorInfo.java \
+    $(TEXT_PKG)/th/BreakIteratorRules_th.java \
+    $(TEXT_PKG)/th/BreakIteratorInfo_th.java
+
+# Generate BreakIteratorData
+BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator
+BREAK_ITERATOR_CLASSES = $(BREAK_ITERATOR_DIR)/classes
+
+# JAVAC_SOURCE_PATH_OVERRIDE is set to isolate the compile to just those
+# two files in that directory and not get anything implicit from
+# surrounding directories which aren't jdk N-1 compatible.
+# Because we are targeting jdk N-1, but the surrounding source code is jdk N.
+# These two files should be moved out to a build tool! We have to disable
+# sjavac here as well.
+$(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    SRC := $(TEXT_SRCDIR), \
+    DISABLE_SJAVAC := true, \
+    JAVAC_SOURCE_PATH_OVERRIDE := $(TEXT_SRCDIR)/$(TEXT_PKG), \
+    INCLUDES := $(TEXT_PKG), \
+    INCLUDE_FILES := $(TEXT_SOURCES), \
+    BIN := $(BREAK_ITERATOR_CLASSES)))
+
+# Generate data resource files.
+# input
+UNICODEDATA = $(JDK_TOPDIR)/make/tools/UnicodeData/UnicodeData.txt
+
+# output
+DATA_PKG_DIR = $(JDK_OUTPUTDIR)/classes/sun/text/resources
+BIFILES = $(DATA_PKG_DIR)/CharacterBreakIteratorData \
+    $(DATA_PKG_DIR)/WordBreakIteratorData \
+    $(DATA_PKG_DIR)/LineBreakIteratorData \
+    $(DATA_PKG_DIR)/SentenceBreakIteratorData
+BIFILES_TH = $(DATA_PKG_DIR)/th/WordBreakIteratorData_th \
+    $(DATA_PKG_DIR)/th/LineBreakIteratorData_th
+
+$(BIFILES): $(DATA_PKG_DIR)/_the.bifiles
+$(DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
+$(DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
+	$(ECHO) $(LOG_INFO) "Generating BreakIteratorData"
+	$(MKDIR) -p $(DATA_PKG_DIR)
+	$(RM) $(BIFILES)
+	$(TOOL_GENERATEBREAKITERATORDATA) \
+	    -o $(DATA_PKG_DIR) \
+	    -spec $(UNICODEDATA)
+	$(TOUCH) $@
+
+$(BIFILES_TH): $(DATA_PKG_DIR)/_the.bifiles_th
+$(DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
+$(DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
+	$(ECHO) $(LOG_INFO) "Generating BreakIteratorData_th"
+	$(MKDIR) -p $(DATA_PKG_DIR)/th
+	$(RM) $(BIFILES_TH)
+	$(TOOL_GENERATEBREAKITERATORDATA) \
+	    -o $(DATA_PKG_DIR) \
+	    -spec $(UNICODEDATA) \
+	    -language th
+	$(TOUCH) $@
+
+
+BREAK_ITERATOR += $(BIFILES) $(BIFILES_TH)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gendata/GendataFontConfig.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,89 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+GENDATA_FONT_CONFIG_DST := $(JDK_OUTPUTDIR)/lib
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows
+  GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
+  GENDATA_FONT_CONFIG_SRC_PREFIX :=
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), linux)
+  GENDATA_FONT_CONFIG_SRC_PREFIX := linux.
+  ifdef OPENJDK
+    GENDATA_FONT_CONFIG_SRC_DIR := \
+        $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
+    # This is placeholder for possible fonconfig files which may
+    # useful for some highly specialized Linux distributions
+    GENDATA_FONT_CONFIG_SRC_FILES :=
+  else
+    GENDATA_FONT_CONFIG_SRC_DIR := \
+        $(JDK_TOPDIR)/src/closed/solaris/classes/sun/awt/fontconfigs
+    GENDATA_FONT_CONFIG_SRC_FILES := \
+        fontconfig.properties \
+        fontconfig.RedHat.5.properties \
+        fontconfig.RedHat.6.properties \
+        fontconfig.Turbo.properties \
+        fontconfig.SuSE.10.properties \
+        fontconfig.SuSE.11.properties
+  endif
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  GENDATA_FONT_CONFIG_SRC_DIR := \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
+  GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
+  GENDATA_FONT_CONFIG_SRC_PREFIX := solaris.
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  GENDATA_FONT_CONFIG_SRC_DIR := \
+      $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
+  GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
+  GENDATA_FONT_CONFIG_SRC_PREFIX := macosx.
+endif
+
+###
+
+$(GENDATA_FONT_CONFIG_DST)/%.src: \
+    $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%
+	$(call install-file)
+
+$(GENDATA_FONT_CONFIG_DST)/%.bfc: \
+    $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(TOOL_COMPILEFONTCONFIG) $< $@
+	$(CHMOD) 444 $@
+
+###
+
+GENDATA_FONT_CONFIGS := $(GENDATA_FONT_CONFIG_SRC_FILES:%=$(GENDATA_FONT_CONFIG_DST)/%.src)
+GENDATA_BFONT_CONFIGS := $(GENDATA_FONT_CONFIG_SRC_FILES:%.properties=$(GENDATA_FONT_CONFIG_DST)/%.bfc)
+
+GENDATA_FONT_CONFIG := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
+
+###
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gendata/GendataHtml32dtd.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+GENDATA_HTML32DTD :=
+
+HTML32DTD = $(JDK_OUTPUTDIR)/classes/javax/swing/text/html/parser/html32.bdtd
+$(HTML32DTD): $(BUILD_TOOLS)
+	$(ECHO) "Generating HTML DTD file"
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1
+
+GENDATA_HTML32DTD += $(HTML32DTD)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gendata/GendataTZDB.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,41 @@
+#
+# 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.
+#
+
+GENDATA_TZDB :=
+
+#
+# Time zone data file creation
+#
+TZDATA_DIR := $(JDK_TOPDIR)/make/sun/javazic/tzdata
+TZDATA_TZFILE := africa antarctica asia australasia europe northamerica pacificnew southamerica backward etcetera gmt jdk11_backward
+TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE))
+
+GENDATA_TZDB_DAT := $(JDK_OUTPUTDIR)/lib/tzdb.dat
+
+$(GENDATA_TZDB_DAT): $(TZDATA_TZFILES)
+	$(RM) $(GENDATA_TZDB_DAT)
+	$(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE)
+
+GENDATA_TZDB += $(GENDATA_TZDB_DAT)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gendata/GendataTimeZone.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,56 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+GENDATA_TIMEZONE :=
+
+# TODO: read from make/sun/javazic/tzdata/VERSION
+GENDATA_TIMEZONE_VERSION := tzdata2012i
+
+GENDATA_TIMEZONE_DST := $(JDK_OUTPUTDIR)/lib/zi
+GENDATA_TIMEZONE_TMP := $(JDK_OUTPUTDIR)/gendata_timezone
+
+TZFILE0 := \
+    africa antarctica asia australasia europe northamerica \
+    pacificnew southamerica backward \
+    etcetera systemv
+
+TZFILE1 := \
+    gmt jdk11_backward
+
+TZFILES := \
+    $(addprefix $(JDK_TOPDIR)/make/sun/javazic/tzdata/,$(TZFILE0)) \
+    $(addprefix $(JDK_TOPDIR)/make/sun/javazic/tzdata_jdk/,$(TZFILE1))
+
+GENDATA_TIMEZONE_MAPFILE := ZoneInfoMappings
+
+$(GENDATA_TIMEZONE_DST)/$(GENDATA_TIMEZONE_MAPFILE): $(TZFILES)
+	$(RM) -r $(GENDATA_TIMEZONE_TMP)
+	$(MKDIR) -p $(GENDATA_TIMEZONE_TMP)
+	$(RM) -r $(GENDATA_TIMEZONE_DST)
+	$(MKDIR) -p $(GENDATA_TIMEZONE_DST)
+	$(TOOL_JAVAZIC) -V "$(GENDATA_TIMEZONE_VERSION)" -d $(GENDATA_TIMEZONE_TMP) $(TZFILES)
+	$(CP) -r $(GENDATA_TIMEZONE_TMP)/* $(GENDATA_TIMEZONE_DST)/
+
+GENDATA_TIMEZONE += $(GENDATA_TIMEZONE_DST)/$(GENDATA_TIMEZONE_MAPFILE)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcBuffer.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,380 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+GENSRC_BUFFER := 
+
+GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
+
+GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
+
+###
+
+$(GENSRC_BUFFER_DST)/_the.buffer.dir: 
+	$(ECHO) "Generating buffer classes"
+	$(MKDIR) -p $(@D)
+	$(TOUCH) $@
+
+define fixRw
+  $1_RW := $2
+  $1_rwkey := rw
+  ifeq (R, $2)
+    $1_rwkey := ro
+  endif
+endef
+
+define typesAndBits
+  # param 1 target
+  # param 2 type
+  # param 3 BO
+  $1_a := a
+  $1_A := A
+
+  $1_type := $2
+
+  ifeq ($2, byte)
+    $1_x        := b
+    $1_Type     := Byte
+    $1_fulltype := byte
+    $1_Fulltype := Byte
+    $1_category := integralType
+    $1_LBPV     := 0
+  endif
+
+  ifeq ($2, char)
+    $1_x        := c
+    $1_Type     := Char
+    $1_fulltype := character
+    $1_Fulltype := Character
+    $1_category := integralType
+    $1_streams  := streamableType
+    $1_streamtype := int
+    $1_Streamtype := Int
+    $1_LBPV     := 1
+  endif
+
+  ifeq ($2, short)
+    $1_x        := s
+    $1_Type     := Short
+    $1_fulltype := short
+    $1_Fulltype := Short
+    $1_category := integralType
+    $1_LBPV     := 1
+  endif
+
+  ifeq ($2, int)
+    $1_a        := an
+    $1_A        := An
+    $1_x        := i
+    $1_Type     := Int
+    $1_fulltype := integer
+    $1_Fulltype := Integer
+    $1_category := integralType
+    $1_LBPV     := 2
+  endif
+
+  ifeq ($2, long)
+    $1_x        := l
+    $1_Type     := Long
+    $1_fulltype := long
+    $1_Fulltype := Long
+    $1_category := integralType
+    $1_LBPV     := 3
+  endif
+
+  ifeq ($2, float)
+    $1_x        := f
+    $1_Type     := Float
+    $1_fulltype := float
+    $1_Fulltype := Float
+    $1_category := floatingPointType
+    $1_LBPV     := 2
+  endif
+
+  ifeq ($2, double)
+    $1_x        := d
+    $1_Type     := Double
+    $1_fulltype := double
+    $1_Fulltype := Double
+    $1_category := floatingPointType
+    $1_LBPV     := 3
+  endif
+
+  $1_Swaptype := $$($1_Type)
+  $1_memtype := $2
+  $1_Memtype := $$($1_Type)
+
+  ifeq ($2, float)
+    $1_memtype := int
+    $1_Memtype := Int
+    ifneq ($3, U)
+      $1_Swaptype := Int
+      $1_fromBits := Float.intBitsToFloat
+      $1_toBits   := Float.floatToRawIntBits
+    endif
+  endif
+
+  ifeq ($2, double)
+    $1_memtype := long
+    $1_Memtype := Long
+    ifneq ($3, U)
+      $1_Swaptype := Long
+      $1_fromBits := Double.longBitsToDouble
+      $1_toBits   := Double.doubleToRawLongBits
+    endif
+  endif
+
+  ifeq ($3, S)
+    $1_swap := Bits.swap
+  endif
+endef
+
+define genBinOps
+  # param 1 target
+  # param 2 type
+  # param 3 BO
+  # param 4 RW
+  # param 5 nbytes
+  # param 6 nbytesButOne
+  $(call typesAndBits,$1,$2,$3)
+  $(call fixRw,$1,$4)
+  $1_nbytes := $5
+  $1_nbytesButOne := $6
+  $1_CMD := $(TOOL_SPP) \
+    -Dtype=$$($1_type) \
+    -DType=$$($1_Type) \
+    -Dfulltype=$$($1_fulltype) \
+    -Dmemtype=$$($1_memtype) \
+    -DMemtype=$$($1_Memtype) \
+    -DfromBits=$$($1_fromBits) \
+    -DtoBits=$$($1_toBits) \
+    -DLG_BYTES_PER_VALUE=$$($1_LBPV) \
+    -DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
+    -Dnbytes=$$($1_nbytes) \
+    -DnbytesButOne=$$($1_nbytesButOne) \
+    -DRW=$$($1_RW) \
+    -K$$($1_rwkey) \
+    -Da=$$($1_a) \
+    -be
+endef
+
+define SetupGenBuffer
+  # param 1 is for output file
+  # param 2 is template dependency
+  # param 3-9 are named args.
+  #   type :=
+  #   BIN :=
+  #   RW := Mutability (R)ead-only (W)ritable
+  #   BO := (U)nswapped/(S)wapped/(L)ittle/(B)ig
+  #
+  $(if $3,$1_$(strip $3))
+  $(if $4,$1_$(strip $4))
+  $(if $5,$1_$(strip $5))
+  $(if $6,$1_$(strip $6))
+  $(if $7,$1_$(strip $7))
+  $(if $8,$1_$(strip $8))
+  $(if $9,$1_$(strip $9))
+  $(if $(10),$1_$(strip $(10)))
+  $(if $(11),$1_$(strip $(11)))
+  $(if $(12),$1_$(strip $(12)))
+  $(if $(13),$1_$(strip $(13)))
+  $(if $(14),$1_$(strip $(14)))
+  $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15,$(if $($i),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupGenBuffer($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupGenBuffer, please update GensrcBuffer.gmk))
+
+  $(call fixRw,$1,$$($1_RW))
+  $(call typesAndBits,$1,$$($1_type),$$($1_BO))
+
+  $1_DST := $(GENSRC_BUFFER_DST)/$1.java
+  $1_SRC := $(GENSRC_BUFFER_SRC)/$(strip $2).java.template
+  $1_SRC_BIN := $(GENSRC_BUFFER_SRC)/$(strip $2)-bin.java.template
+
+  $1_DEP := $$($1_SRC)
+  ifneq ($$($1_BIN), 1)
+    $1_DEP := $$($1_SRC)
+    $1_OUT := $$($1_DST)
+  else
+    $1_DEP += $$($1_SRC) $$($1_SRC_BIN)
+    $1_OUT := $(GENSRC_BUFFER_DST)/$1.binop.0.java
+  endif
+
+  ifeq ($$($1_BIN), 1)
+    $(call genBinOps,$1_char,char,$$($1_BO),$$($1_RW),two,one)
+    $(call genBinOps,$1_short,short,$$($1_BO),$$($1_RW),two,one)
+    $(call genBinOps,$1_int,int,$$($1_BO),$$($1_RW),four,three)
+    $(call genBinOps,$1_long,long,$$($1_BO),$$($1_RW),eight,seven)
+    $(call genBinOps,$1_float,float,$$($1_BO),$$($1_RW),four,three)
+    $(call genBinOps,$1_double,double,$$($1_BO),$$($1_RW),eight,seven)
+  endif
+
+  $$($1_DST): $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
+	$(TOOL_SPP) < $$($1_SRC) > $$($1_OUT).tmp \
+	    -K$$($1_type) \
+	    -K$$($1_category) \
+	    -K$$($1_streams) \
+	    -Dtype=$$($1_type) \
+	    -DType=$$($1_Type) \
+	    -Dfulltype=$$($1_fulltype) \
+	    -DFulltype=$$($1_Fulltype) \
+	    -Dstreamtype=$$($1_streamtype) \
+	    -DStreamtype=$$($1_Streamtype) \
+	    -Dx=$$($1_x) \
+	    -Dmemtype=$$($1_memtype) \
+	    -DMemtype=$$($1_Memtype) \
+	    -DSwaptype=$$($1_Swaptype) \
+	    -DfromBits=$$($1_fromBits) \
+	    -DtoBits=$$($1_toBits) \
+	    -DLG_BYTES_PER_VALUE=$$($1_LBPV) \
+	    -DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
+	    -DBO=$$($1_BO) \
+	    -Dswap=$$($1_swap) \
+	    -DRW=$$($1_RW) \
+	    -K$$($1_rwkey) \
+	    -Da=$$($1_a) \
+	    -DA=$$($1_A) \
+	    -Kbo$$($1_BO)
+	$(MV) $$($1_OUT).tmp $$($1_OUT)
+        # Do the extra bin thing
+        ifeq ($$($1_BIN), 1)
+	  $(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).tmp
+	  $(RM) $$($1_OUT)
+	  $$($1_char_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
+	  $$($1_short_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
+	  $$($1_int_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
+	  $$($1_long_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
+	  $$($1_float_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
+	  $$($1_double_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
+	  $(PRINTF) "}\n" >> $$($1_DST).tmp
+	  mv $$($1_DST).tmp $$($1_DST)
+        endif
+
+  GENSRC_BUFFER += $$($1_DST)
+
+endef
+
+###
+
+X_BUF := X-Buffer
+
+$(eval $(call SetupGenBuffer,ByteBuffer,  $(X_BUF), type:=byte, BIN:=1))
+$(eval $(call SetupGenBuffer,CharBuffer,  $(X_BUF), type:=char))
+$(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF), type:=short))
+$(eval $(call SetupGenBuffer,IntBuffer,   $(X_BUF), type:=int))
+$(eval $(call SetupGenBuffer,LongBuffer,  $(X_BUF), type:=long))
+$(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF), type:=float))
+$(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF), type:=double))
+
+# Buffers whose contents are heap-allocated
+#
+HEAP_X_BUF := Heap-X-Buffer
+
+$(eval $(call SetupGenBuffer,HeapByteBuffer,   $(HEAP_X_BUF), type:=byte))
+$(eval $(call SetupGenBuffer,HeapByteBufferR,  $(HEAP_X_BUF), type:=byte, RW:=R))
+$(eval $(call SetupGenBuffer,HeapCharBuffer,   $(HEAP_X_BUF), type:=char))
+$(eval $(call SetupGenBuffer,HeapCharBufferR,  $(HEAP_X_BUF), type:=char, RW:=R))
+$(eval $(call SetupGenBuffer,HeapShortBuffer,  $(HEAP_X_BUF), type:=short))
+$(eval $(call SetupGenBuffer,HeapShortBufferR, $(HEAP_X_BUF), type:=short, RW:=R))
+$(eval $(call SetupGenBuffer,HeapIntBuffer,    $(HEAP_X_BUF), type:=int))
+$(eval $(call SetupGenBuffer,HeapIntBufferR,   $(HEAP_X_BUF), type:=int, RW:=R))
+$(eval $(call SetupGenBuffer,HeapLongBuffer,   $(HEAP_X_BUF), type:=long))
+$(eval $(call SetupGenBuffer,HeapLongBufferR,  $(HEAP_X_BUF), type:=long, RW:=R))
+$(eval $(call SetupGenBuffer,HeapFloatBuffer,  $(HEAP_X_BUF), type:=float))
+$(eval $(call SetupGenBuffer,HeapFloatBufferR, $(HEAP_X_BUF), type:=float, RW:=R))
+$(eval $(call SetupGenBuffer,HeapDoubleBuffer, $(HEAP_X_BUF), type:=double))
+$(eval $(call SetupGenBuffer,HeapDoubleBufferR,$(HEAP_X_BUF), type:=double, RW:=R))
+
+# Direct byte buffer
+#
+DIRECT_X_BUF := Direct-X-Buffer
+
+$(eval $(call SetupGenBuffer,DirectByteBuffer, $(DIRECT_X_BUF), type:=byte, BIN:=1))
+$(eval $(call SetupGenBuffer,DirectByteBufferR,$(DIRECT_X_BUF), type:=byte, BIN:=1, RW:=R))
+
+# Unswapped views of direct byte buffers
+#
+$(eval $(call SetupGenBuffer,DirectCharBufferU,   $(DIRECT_X_BUF), type:=char, BO:=U))
+$(eval $(call SetupGenBuffer,DirectCharBufferRU,  $(DIRECT_X_BUF), type:=char, RW:=R, BO:=U))
+$(eval $(call SetupGenBuffer,DirectShortBufferU,  $(DIRECT_X_BUF), type:=short, BO:=U))
+$(eval $(call SetupGenBuffer,DirectShortBufferRU, $(DIRECT_X_BUF), type:=short, RW:=R, BO:=U))
+$(eval $(call SetupGenBuffer,DirectIntBufferU,    $(DIRECT_X_BUF), type:=int, BO:=U))
+$(eval $(call SetupGenBuffer,DirectIntBufferRU,   $(DIRECT_X_BUF), type:=int, RW:=R, BO:=U))
+$(eval $(call SetupGenBuffer,DirectLongBufferU,   $(DIRECT_X_BUF), type:=long, BO:=U))
+$(eval $(call SetupGenBuffer,DirectLongBufferRU,  $(DIRECT_X_BUF), type:=long, RW:=R, BO:=U))
+$(eval $(call SetupGenBuffer,DirectFloatBufferU,  $(DIRECT_X_BUF), type:=float, BO:=U))
+$(eval $(call SetupGenBuffer,DirectFloatBufferRU, $(DIRECT_X_BUF), type:=float, RW:=R, BO:=U))
+$(eval $(call SetupGenBuffer,DirectDoubleBufferU, $(DIRECT_X_BUF), type:=double, BO:=U))
+$(eval $(call SetupGenBuffer,DirectDoubleBufferRU,$(DIRECT_X_BUF), type:=double, RW:=R, BO:=U))
+
+# Swapped views of direct byte buffers
+#
+$(eval $(call SetupGenBuffer,DirectCharBufferS,   $(DIRECT_X_BUF), type:=char, BO:=S))
+$(eval $(call SetupGenBuffer,DirectCharBufferRS,  $(DIRECT_X_BUF), type:=char, RW:=R, BO:=S))
+$(eval $(call SetupGenBuffer,DirectShortBufferS,  $(DIRECT_X_BUF), type:=short, BO:=S))
+$(eval $(call SetupGenBuffer,DirectShortBufferRS, $(DIRECT_X_BUF), type:=short, RW:=R, BO:=S))
+$(eval $(call SetupGenBuffer,DirectIntBufferS,    $(DIRECT_X_BUF), type:=int, BO:=S))
+$(eval $(call SetupGenBuffer,DirectIntBufferRS,   $(DIRECT_X_BUF), type:=int, RW:=R, BO:=S))
+$(eval $(call SetupGenBuffer,DirectLongBufferS,   $(DIRECT_X_BUF), type:=long, BO:=S))
+$(eval $(call SetupGenBuffer,DirectLongBufferRS,  $(DIRECT_X_BUF), type:=long, RW:=R, BO:=S))
+$(eval $(call SetupGenBuffer,DirectFloatBufferS,  $(DIRECT_X_BUF), type:=float, BO:=S))
+$(eval $(call SetupGenBuffer,DirectFloatBufferRS, $(DIRECT_X_BUF), type:=float, RW:=R, BO:=S))
+$(eval $(call SetupGenBuffer,DirectDoubleBufferS, $(DIRECT_X_BUF), type:=double, BO:=S))
+$(eval $(call SetupGenBuffer,DirectDoubleBufferRS,$(DIRECT_X_BUF), type:=double, RW:=R, BO:=S))
+
+# Big-endian views of byte buffers
+#
+BYTE_X_BUF := ByteBufferAs-X-Buffer
+
+$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferB,   $(BYTE_X_BUF), type:=char, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRB,  $(BYTE_X_BUF), type:=char, RW:=R, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferB,  $(BYTE_X_BUF), type:=short, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRB, $(BYTE_X_BUF), type:=short, RW:=R, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferB,    $(BYTE_X_BUF), type:=int, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRB,   $(BYTE_X_BUF), type:=int, RW:=R, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferB,   $(BYTE_X_BUF), type:=long, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRB,  $(BYTE_X_BUF), type:=long, RW:=R, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferB,  $(BYTE_X_BUF), type:=float, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRB, $(BYTE_X_BUF), type:=float, RW:=R, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferB, $(BYTE_X_BUF), type:=double, BO:=B))
+$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRB,$(BYTE_X_BUF), type:=double, RW:=R, BO:=B))
+
+# Little-endian views of byte buffers
+#
+$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferL,   $(BYTE_X_BUF), type:=char, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRL,  $(BYTE_X_BUF), type:=char, RW:=R, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferL,  $(BYTE_X_BUF), type:=short, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRL, $(BYTE_X_BUF), type:=short, RW:=R, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferL,    $(BYTE_X_BUF), type:=int, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRL,   $(BYTE_X_BUF), type:=int, RW:=R, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferL,   $(BYTE_X_BUF), type:=long, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRL,  $(BYTE_X_BUF), type:=long, RW:=R, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferL,  $(BYTE_X_BUF), type:=float, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRL, $(BYTE_X_BUF), type:=float, RW:=R, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferL, $(BYTE_X_BUF), type:=double, BO:=L))
+$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF), type:=double, RW:=R, BO:=L))
+
+###
+
+$(GENSRC_BUFFER): $(BUILD_TOOLS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcCLDR.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,39 @@
+#
+# 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.  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.
+#
+
+CLDRVERSION := 21.0.1
+CLDRSRCDIR := $(JDK_TOPDIR)/src/share/classes/sun/util/cldr/resources/$(subst .,_,$(CLDRVERSION))
+
+GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc
+
+CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java
+
+$(CLDR_METAINFO_FILE): $(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
+    $(wildcard $(CLDRSRCDIR)/common/main/*.xml) \
+    $(wildcard $(CLDRSRCDIR)/common/supplemental/*.xml)
+	$(MKDIR) -p $(@D)
+	$(TOOL_CLDRCONVERTER) -base $(CLDRSRCDIR) -o $(GENSRC_DIR)
+
+GENSRC_CLDR := $(CLDR_METAINFO_FILE)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcCharacterData.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,64 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+#
+# Rules to create $(JDK_OUTPUTDIR)/gensrc/sun/lang/CharacterData*.java
+#
+
+GENSRC_CHARACTERDATA :=
+
+CHARACTERDATA = $(JDK_TOPDIR)/make/tools/GenerateCharacter
+UNICODEDATA = $(JDK_TOPDIR)/make/tools/UnicodeData
+
+define SetupCharacterData
+  $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java: $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS)
+	$(MKDIR) -p $$(@D)
+	$(ECHO) $(LOG_INFO) Generating $1.java
+	$(TOOL_GENERATECHARACTER) $2 \
+	    -template $(CHARACTERDATA)/$1.java.template \
+	    -spec $(UNICODEDATA)/UnicodeData.txt \
+	    -specialcasing $(UNICODEDATA)/SpecialCasing.txt \
+	    -proplist $(UNICODEDATA)/PropList.txt \
+	    -o $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java -string \
+	    -usecharforbyte $3
+
+  GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java
+endef
+
+$(eval $(call SetupCharacterData,CharacterDataLatin1, , -latin1 8))
+$(eval $(call SetupCharacterData,CharacterData00, -plane 0, 11 4 1))
+$(eval $(call SetupCharacterData,CharacterData01, -plane 1, 11 4 1))
+$(eval $(call SetupCharacterData,CharacterData02, -plane 2, 11 4 1))
+$(eval $(call SetupCharacterData,CharacterData0E, -plane 14, 11 4 1))
+
+# Copy two Java files that need no preprocessing.
+$(JDK_OUTPUTDIR)/gensrc/java/lang/%.java: $(CHARACTERDATA)/%.java.template
+	$(ECHO) $(LOG_INFO) Generating $(@F)
+	$(call install-file)
+
+GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataUndefined.java \
+    $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataPrivateUse.java
+
+$(GENSRC_CHARACTERDATA): $(BUILD_TOOLS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcCharsetCoder.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,107 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+GENSRC_CHARSETCODER :=
+
+GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio/charset
+
+GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
+
+GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
+
+###
+
+$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
+	$(MKDIR) -p $(@D)
+	-$(RM) $@.tmp
+	$(TOOL_SPP) < $< >$@.tmp \
+	    -Kdecoder \
+	    -DA='A' \
+	    -Da='a' \
+	    -DCode='Decode' \
+	    -Dcode='decode' \
+	    -DitypesPhrase='bytes in a specific charset' \
+	    -DotypesPhrase='sixteen-bit Unicode characters' \
+	    -Ditype='byte' \
+	    -Dotype='character' \
+	    -DItype='Byte' \
+	    -DOtype='Char' \
+	    -Dcoder='decoder' \
+	    -DCoder='Decoder' \
+	    -Dcoding='decoding' \
+	    -DOtherCoder='Encoder' \
+	    -DreplTypeName='string' \
+	    -DdefaultRepl='"\\uFFFD"' \
+	    -DdefaultReplName='<tt>"\&#92;uFFFD"<\/tt>' \
+	    -DreplType='String' \
+	    -DreplFQType='java.lang.String' \
+	    -DreplLength='length()' \
+	    -DItypesPerOtype='CharsPerByte' \
+	    -DnotLegal='not legal for this charset' \
+	    -Dotypes-per-itype='chars-per-byte' \
+	    -DoutSequence='Unicode character'
+	$(MV) $@.tmp $@
+
+GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
+
+###
+
+$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
+	$(MKDIR) -p $(@D)
+	-$(RM) $@.tmp
+	$(TOOL_SPP) < $< >$@.tmp \
+	    -Kencoder \
+	    -DA='An' \
+	    -Da='an' \
+	    -DCode='Encode' \
+	    -Dcode='encode' \
+	    -DitypesPhrase='sixteen-bit Unicode characters' \
+	    -DotypesPhrase='bytes in a specific charset' \
+	    -Ditype='character' \
+	    -Dotype='byte' \
+	    -DItype='Char' \
+	    -DOtype='Byte' \
+	    -Dcoder='encoder' \
+	    -DCoder='Encoder' \
+	    -Dcoding='encoding' \
+	    -DOtherCoder='Decoder' \
+	    -DreplTypeName='byte array' \
+	    -DdefaultRepl='new byte[] { (byte)'"'"\\?"'"' }' \
+	    -DdefaultReplName='<tt>{<\/tt>\&nbsp;<tt>(byte)'"'"\\?"'"'<\/tt>\&nbsp;<tt>}<\/tt>' \
+	    -DreplType='byte[]' \
+	    -DreplFQType='byte[]' \
+	    -DreplLength='length' \
+	    -DItypesPerOtype='BytesPerChar' \
+	    -DnotLegal='not a legal sixteen-bit Unicode sequence' \
+	    -Dotypes-per-itype='bytes-per-char' \
+	    -DoutSequence='byte sequence in the given charset'
+	$(MV) $@.tmp $@
+
+GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
+
+###
+
+$(GENSRC_CHARSETCODER): $(BUILD_TOOLS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcCharsetMapping.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,104 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+GENSRC_CHARSETMAPPING :=
+
+GENSRC_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
+
+GENSRC_SRC := $(JDK_TOPDIR)/make/tools/CharsetMapping
+GENSRC_JAVA_SRC := $(JDK_TOPDIR)/make/tools/src/build/tools/charsetmapping
+
+GENSRC_TEMPLATES := $(GENSRC_SRC)/SingleByte-X.java.template $(GENSRC_SRC)/DoubleByte-X.java.template
+
+###
+
+$(GENSRC_TMP)/_the.charsetmapping.dir:
+	$(ECHO) Generating charsetmapping classes
+	$(MKDIR) -p $(GENSRC_DST)/ext
+	$(TOUCH) $@
+
+###
+
+GENSRC_SB := $(GENSRC_TMP)/_the.charsetmapping.sbcs
+
+$(GENSRC_SB): $(GENSRC_SRC)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.charsetmapping.dir
+	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST) sbcs
+	$(TOUCH) $@
+
+GENSRC_CHARSETMAPPING += $(GENSRC_SB)
+
+###
+
+$(GENSRC_DST)/ext/sjis0213.dat: $(GENSRC_SRC)/sjis0213.map $(GENSRC_SB)
+	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $< $@ sjis0213
+
+GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/sjis0213.dat
+
+###
+
+$(GENSRC_DST)/ext/EUC_TWMapping.java: $(GENSRC_JAVA_SRC)/EUC_TW.java $(GENSRC_SB)
+	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST)/ext euctw $(GENSRC_JAVA_SRC)/EUC_TW.java
+
+GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/EUC_TWMapping.java
+
+###
+
+$(GENSRC_DST)/ext/HKSCSMapping.java: $(GENSRC_JAVA_SRC)/HKSCS.java $(GENSRC_SB)
+	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST)/ext hkscs $(GENSRC_JAVA_SRC)/HKSCS.java
+
+GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/HKSCSMapping.java
+
+###
+
+$(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs: $(GENSRC_SRC)/extsbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
+	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(LOG_INFO) $(GENSRC_DST)/ext extsbcs
+	$(TOUCH) $@
+
+GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs
+
+###
+
+$(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs: $(GENSRC_SRC)/dbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
+	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(LOG_INFO) $(GENSRC_DST)/ext dbcs
+	$(TOUCH) $@
+
+GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs
+
+###
+
+GENSRC_CHARSET_PROVIDER_CMD := $(JDK_TOPDIR)/makefiles/scripts/genCharsetProvider.sh
+
+$(GENSRC_DST)/StandardCharsets.java: $(JDK_TOPDIR)/src/share/classes/sun/nio/cs/standard-charsets \
+    $(GENSRC_CHARSET_PROVIDER_CMD) \
+    $(GENSRC_TMP)/_the.charsetmapping.dir
+	NAWK="$(NAWK)" TEMPDIR="$(GENSRC_TMP)" SH="$(SH)" \
+	    HASHER="$(TOOL_HASHER)" \
+	    SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" \
+	    $(SH) -e $(GENSRC_CHARSET_PROVIDER_CMD) $(LOG_INFO) $< $(@D)
+
+GENSRC_CHARSETMAPPING += $(GENSRC_DST)/StandardCharsets.java
+
+$(GENSRC_CHARSETMAPPING): $(BUILD_TOOLS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcExceptions.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+GENSRC_EXCEPTIONS :=
+
+GENSRC_EXCEPTIONS_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
+
+GENSRC_EXCEPTIONS_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
+GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/makefiles/scripts/genExceptions.sh
+
+GENSRC_EXCEPTIONS_SRC_DIRS := . charset channels
+
+###
+
+$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir:
+	$(ECHO) "Generating exceptions classes"
+	$(MKDIR) -p $(@D)
+	$(TOUCH) $@
+
+
+###
+
+$(GENSRC_EXCEPTIONS_DST)/_the.%: $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
+    $(GENSRC_EXCEPTIONS_CMD) \
+    $(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir
+	$(MKDIR) -p $(@D)/$*
+	SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_INFO)
+	$(TOUCH) $@
+
+GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D))
+
+$(GENSRC_EXCEPTIONS): $(BUILD_TOOLS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcIcons.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,130 @@
+#
+# 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
+# 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.
+#
+
+GENSRC_AWT_ICONS :=
+GENSRC_AWT_ICONS_SRC :=
+GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/
+
+ifdef OPENJDK
+  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)
+else
+  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
+endif
+
+GENSRC_AWT_ICONS_SRC += \
+    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
+    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
+    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
+    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
+
+
+AWT_ICONPATH := $(JDK_TOPDIR)/src/share/classes/sun/awt/resources
+
+GENSRC_AWT_ICONS_SRC += \
+    $(AWT_ICONPATH)/security-icon-bw16.png \
+    $(AWT_ICONPATH)/security-icon-interim16.png \
+    $(AWT_ICONPATH)/security-icon-yellow16.png \
+    $(AWT_ICONPATH)/security-icon-bw24.png \
+    $(AWT_ICONPATH)/security-icon-interim24.png \
+    $(AWT_ICONPATH)/security-icon-yellow24.png \
+    $(AWT_ICONPATH)/security-icon-bw32.png \
+    $(AWT_ICONPATH)/security-icon-interim32.png \
+    $(AWT_ICONPATH)/security-icon-yellow32.png \
+    $(AWT_ICONPATH)/security-icon-bw48.png \
+    $(AWT_ICONPATH)/security-icon-interim48.png \
+    $(AWT_ICONPATH)/security-icon-yellow48.png
+
+GENSRC_AWT_ICONS_FILES := $(notdir $(GENSRC_AWT_ICONS_SRC))
+
+GENSRC_AWT_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
+GENSRC_AWT_ICONS_DST_NAME = AWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
+
+###
+
+$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir:
+	$(ECHO) Generating icon classes
+	$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
+	$(TOUCH) $@
+
+###
+
+define SetupGensrcAWTIcon
+  # param 1 is for src-file
+  # param 2 is for src-dir
+  $1_SHORTNAME := $(call GENSRC_AWT_ICONS_SHORT_NAME,$1)
+  $1_NAME32 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,32)
+  $1_TARGET32 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME32).java
+  $1_NAME64 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,64)
+  $1_TARGET64 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME64).java
+
+  $$($1_TARGET32): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
+	$(RM) $$@ $$@.tmp
+	$(ECHO) "package sun.awt;" > $$@.tmp
+	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
+	$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
+	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
+	$(ECHO) "}; }" >> $$@.tmp
+	$(MV) $$@.tmp $$@
+
+  GENSRC_AWT_ICONS += $$($1_TARGET32)
+
+  $$($1_TARGET64): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
+	$(RM) $$@ $$@.tmp
+	$(ECHO) "package sun.awt;" > $$@.tmp
+	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
+	$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
+	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
+	$(ECHO) "}; }" >> $$@.tmp
+	$(MV) $$@.tmp $$@
+
+  GENSRC_AWT_ICONS += $$($1_TARGET64)
+endef
+
+$(foreach I, $(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I)))))
+
+###
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+  GENSRC_OSX_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
+  GENSRC_OSX_ICONS_DST := $(GENSRC_OSX_ICONS_TMP)/sun/osxapp
+  GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
+
+  ifdef OPENJDK
+    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
+  else
+    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/closed/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
+  endif
+
+  $(GENSRC_OSX_ICONS_DST)/AWTIconData.h: $(GENSRC_OSX_ICONS_SRC)
+	$(RM) $@ $@.tmp
+	$(MKDIR) -p $(dir $@)
+	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
+	$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
+	$(ECHO) "};" >> $@.tmp
+	$(MV) $@.tmp $@
+
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcJDWP.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+# Translate the Java debugger wire protocol (jdwp.spec) file into a JDWP.java file
+# and a JDWPCommands.h C-header file.
+
+$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h: $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
+
+$(JDK_OUTPUTDIR)/gensrc/com/sun/tools/jdi/JDWP.java: $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
+	$(MKDIR) -p $(@D)
+	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
+	$(RM) $@ $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
+	$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
+	$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
+
+$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html: $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
+	$(TOOL_JDWPGEN) $< -doc $@
+
+GENSRC_JDWP := $(JDK_OUTPUTDIR)/gensrc/com/sun/tools/jdi/JDWP.java \
+    $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h \
+    $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcJObjC.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,112 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+GENSRC_JOBJC :=
+
+JOBJC_FRAMEWORKS := Foundation CoreFoundation AppKit
+FRAMEWORKS_DIR := /System/Library/Frameworks
+GBM := /usr/bin/gen_bridge_metadata
+
+JOBJC_SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc
+JOBJC_TMP := $(JDK_OUTPUTDIR)/gensrc_jobjc
+JOBJC_DST := $(JDK_OUTPUTDIR)/gensrc_jobjc/src
+
+#
+# Build generator
+#
+$(eval $(call SetupJavaCompilation,BUILD_JOBJC_PRIMITIVE_CODER, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    DISABLE_SJAVAC := true, \
+    INCLUDES := core/java \
+        com/apple, \
+    SRC := $(JOBJC_SRC)/src \
+        $(JOBJC_SRC)/src/generator/java, \
+    BIN := $(JOBJC_TMP)/bin))
+
+GENSRC_JOBJC += $(BUILD_JOBJC_PRIMITIVE_CODER)
+
+#
+# Generate bridge support for select frameworks
+#
+BRIDGESUPPORT := $(addprefix $(JOBJC_TMP)/bridge/, $(addsuffix Full.bridgesupport, $(JOBJC_FRAMEWORKS)))
+
+#
+# Define macro for rules to create bridge support
+# Not sure why, but if the system has this framework bridge support,
+# we appear to copy that, otherwise we run GBM which can be very slow.
+#
+define CreateBridgeSupport # Framework
+	$(RM) $@ $@.tmp
+	$(MKDIR) -p $(@D)
+	if [ -f $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) ]; then \
+	  $(CP) $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) $@.tmp ; \
+	else \
+	  $(GBM) $(LOG_INFO) -F complete --framework $1 -o $@.tmp ; \
+	fi
+	$(MV) $@.tmp $@
+endef
+
+#
+# Currently 3 frameworks, avoid pattern rule due to the names being conflicting
+#
+$(JOBJC_TMP)/bridge/FoundationFull.bridgesupport: \
+    $(wildcard $(FRAMEWORKS_DIR)/Foundation.framework/Headers/*.h)
+	$(call CreateBridgeSupport,Foundation)
+$(JOBJC_TMP)/bridge/CoreFoundationFull.bridgesupport: \
+    $(wildcard $(FRAMEWORKS_DIR)/CoreFoundation.framework/Headers/*.h)
+	$(call CreateBridgeSupport,CoreFoundation)
+$(JOBJC_TMP)/bridge/AppKitFull.bridgesupport: \
+    $(wildcard $(FRAMEWORKS_DIR)/AppKit.framework/Headers/*.h)
+	$(call CreateBridgeSupport,AppKit)
+
+#
+# Find Xbootclasspath, for some reason, this involves firing up Java just
+# so we can get the boot classpath, so we can remove anything in that
+# classpath that ends with "JObjC.jar", and emit the new bootclasspath.
+#
+$(JOBJC_TMP)/_the.generator_bootclasspath: $(BUILD_JOBJC_PRIMITIVE_CODER)
+	$(ECHO) Generating jobjc framework bridge
+	$(RM) $@
+	$(JAVA) $(LOG_INFO) -cp $(JOBJC_TMP)/bin com.apple.internal.jobjc.generator.BootClassPathMinus JObjC.jar > $@.tmp
+	$(MV) $@.tmp $@
+
+#
+# Run generator
+# Now we use bootclasspath to run java again, with the bridge support to
+# generate more source.
+#
+$(JOBJC_TMP)/_the.generator: $(JOBJC_TMP)/_the.generator_bootclasspath $(BRIDGESUPPORT)
+	$(RM) $@
+	$(JAVA) $(LOG_INFO) -d64 -Xbootclasspath:`$(CAT) $(JOBJC_TMP)/_the.generator_bootclasspath` -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator dst=$(JOBJC_DST) frameworks=$(JOBJC_TMP)/bridge
+	$(TOUCH) $@
+
+# The generator delets all files in the target dir so it has to work in its
+# own dir and have the files copied over to gensrc aftewards.
+$(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files: $(JOBJC_TMP)/_the.generator
+	$(MKDIR) -p $(@D)
+	$(CP) -rp $(JOBJC_DST)/* $(@D)
+	$(TOUCH) $@
+
+GENSRC_JOBJC += $(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcLocaleDataMetaInfo.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,120 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+# Scan for all locale resources and extract for which locales there exists
+# resources. Then put this meta information about exiting (supported?) locales
+# into LocaleDataMetaInfo.java
+
+# First go look for all locale files
+LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/share/classes \
+    -name "FormatData_*.java" -o -name "FormatData_*.properties" -o \
+    -name "CollationData_*.java" -o -name "CollationData_*.properties" -o \
+    -name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
+    -name "LocaleNames_*.java" -o -name "LocaleNames_*.properties" -o \
+    -name "CurrencyNames_*.java" -o -name "CurrencyNames_*.properties" -o \
+    -name "CalendarData_*.java" -o -name "CalendarData_*.properties")
+
+# Then translate the locale files into for example: FormatData_sv
+LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
+
+# Include the list of resources found during the previous compile.
+-include $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
+
+MISSING_RESOURCES := $(filter-out $(LOCALE_RESOURCES), $(PREV_LOCALE_RESOURCES))
+NEW_RESOURCES := $(filter-out $(PREV_LOCALE_RESOURCES), $(LOCALE_RESOURCES))
+
+ifneq (, $(MISSING_RESOURCES)$(NEW_RESOURCES))
+  # There is a difference in the number of supported resources. Trigger a regeneration.
+  $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java)
+endif
+
+# The EN locales
+EN_LOCALES := en%
+
+# ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
+ALL_NON_EN_LOCALES := ja-JP-JP th-TH-TH
+
+SED_ARGS := -e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'
+
+# This macro creates a sed expression that substitues for example:
+# #FormatData_ENLocales# with: en% locales.
+define CaptureLocale
+  $1_LOCALES := $$(subst _,-,$$(filter-out $1, $$(subst $1_,,$$(filter $1_%, $(LOCALE_RESOURCES)))))
+  $1_EN_LOCALES := $$(filter $(EN_LOCALES), $$($1_LOCALES))
+  $1_NON_EN_LOCALES := $$(filter-out $(EN_LOCALES), $$($1_LOCALES))
+
+  ALL_EN_LOCALES += $$($1_EN_LOCALES)
+  ALL_NON_EN_LOCALES += $$($1_NON_EN_LOCALES)
+
+  # Don't sed in a space if there are no locales.
+  SED_ARGS += -e 's/$$(HASH)$1_ENLocales$$(HASH)/$$(if $$($1_EN_LOCALES),$$(SPACE)$$($1_EN_LOCALES),)/g'
+  SED_ARGS += -e 's/$$(HASH)$1_NonENLocales$$(HASH)/$$(if $$($1_NON_EN_LOCALES),$$(SPACE)$$($1_NON_EN_LOCALES),)/g'
+endef
+
+#sun.text.resources.FormatData
+$(eval $(call CaptureLocale,FormatData))
+
+#sun.text.resources.CollationData
+$(eval $(call CaptureLocale,CollationData))
+
+#sun.util.resources.TimeZoneNames
+$(eval $(call CaptureLocale,TimeZoneNames))
+
+#sun.util.resources.LocaleNames
+$(eval $(call CaptureLocale,LocaleNames))
+
+#sun.util.resources.CurrencyNames
+$(eval $(call CaptureLocale,CurrencyNames))
+
+#sun.util.resources.CalendarData
+$(eval $(call CaptureLocale,CalendarData))
+
+SED_ARGS += -e 's/$(HASH)AvailableLocales_ENLocales$(HASH)/$(sort $(ALL_EN_LOCALES))/g'
+SED_ARGS += -e 's/$(HASH)AvailableLocales_NonENLocales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g'
+
+$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java: \
+    $(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
+	$(MKDIR) -p $(@D)
+	$(ECHO) Creating sun/util/LocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
+	$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
+	$(SED) $(SED_ARGS) $< > $@
+
+GENSRC_LOCALEDATAMETAINFO := $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java
+
+###
+
+GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/util/CoreResourceBundleControl.java
+GENSRC_CRBC_CMD := $(JDK_TOPDIR)/makefiles/scripts/localelist.sh
+
+JRE_NONEXIST_LOCALES := en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
+
+$(GENSRC_CRBC_DST): $(JDK_TOPDIR)/src/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template \
+    $(GENSRC_CRBC_CMD)
+	$(MKDIR) -p $(@D)
+	NAWK="$(NAWK)" SED="$(SED)" $(SH) $(GENSRC_CRBC_CMD) "$(JRE_NONEXIST_LOCALES)" $< $@
+
+GENSRC_LOCALEDATAMETAINFO += $(GENSRC_CRBC_DST)
+
+###
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcMisc.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,240 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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 ProfileNames.gmk
+
+##########################################################################################
+# Install the launcher name, release version string, full version
+# string and the runtime name into the Version.java file.
+# To be printed by java -version
+
+$(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java \
+$(PROFILE_VERSION_JAVA_TARGETS): \
+    $(JDK_TOPDIR)/src/share/classes/sun/misc/Version.java.template
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	$(ECHO) Generating sun/misc/Version.java $(call profile_version_name, $@)
+	$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
+	    -e 's/@@java_version@@/$(RELEASE)/g' \
+	    -e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
+	    -e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \
+	    -e 's/@@java_profile_name@@/$(call profile_version_name, $@)/g' \
+	    $< > $@.tmp
+	$(MV) $@.tmp $@
+
+GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java \
+    $(PROFILE_VERSION_JAVA_TARGETS)
+
+##########################################################################################
+# Version file for jconsole
+
+$(JDK_OUTPUTDIR)/gensrc/sun/tools/jconsole/Version.java: \
+    $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/Version.java.template
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	$(ECHO) $(LOG_INFO) Generating sun/tools/jconsole/Version.java
+	$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@.tmp
+	$(MV) $@.tmp $@
+
+GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/tools/jconsole/Version.java
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS_API), posix)
+  UPSUFFIX := $(OPENJDK_TARGET_OS)
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    UPSUFFIX := bsd
+  endif
+  # UNIXProcess.java is different for solaris and linux. We need to copy
+  # the correct UNIXProcess.java over to $(JDK_OUTPUTDIR)/gensrc/java/lang/.
+
+  $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java: \
+      $(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
+	$(ECHO) $(LOG_INFO) Copying UNIXProcess.java.$(OPENJDK_TARGET_OS) to java/lang/UNIXProcess.java
+	$(call install-file)
+	$(CHMOD) u+rw $@
+
+  GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java
+endif
+
+##########################################################################################
+
+GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java
+
+GENSRC_SOR_SRC := $(JDK_TOPDIR)/src/share/native/sun/nio/ch
+GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
+GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/gensrc/genSocketOptionRegistry
+
+SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
+    $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
+
+$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
+    SRC := $(GENSRC_SOR_SRC), \
+    INCLUDE_FILES := $(GENSRC_SOR_SRC_FILE), \
+    LANG := C, \
+    CC := $(BUILD_CC), \
+    LDEXE := $(BUILD_LD), \
+    OBJECT_DIR := $(GENSRC_SOR_BIN), \
+    OUTPUT_DIR := $(GENSRC_SOR_BIN), \
+    PROGRAM := genSocketOptionRegistry))
+
+ifneq ($(wildcard $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java), )
+  HAS_SOCKET_OPTION_REGISTRY := true
+endif
+
+ifneq ($(HAS_SOCKET_OPTION_REGISTRY), true)
+  $(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java: $(BUILD_GENSRC_SOR_EXE)
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
+	$(BUILD_GENSRC_SOR_EXE) >> $@.tmp
+	$(MV) $@.tmp $@
+else
+  $(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java: $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
+	$(call install-file)
+endif
+
+##########################################################################################
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+
+  GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java
+
+  GENSRC_UC_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
+  GENSRC_UC_SRC_FILE := genUnixConstants.c
+  GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/gensrc/genUnixConstants
+
+  UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
+      $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
+
+  $(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE, \
+      SRC := $(GENSRC_UC_SRC), \
+      INCLUDE_FILES := $(GENSRC_UC_SRC_FILE), \
+      LANG := C, \
+      CC := $(BUILD_CC), \
+      LDEXE := $(BUILD_CC), \
+      CFLAGS := $(filter -D%, $(CFLAGS_JDKEXE)), \
+      OBJECT_DIR := $(GENSRC_UC_BIN), \
+      OUTPUT_DIR := $(GENSRC_UC_BIN), \
+      PROGRAM := genUnixConstants))
+
+  ifneq ($(wildcard $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java), )
+    HAS_UNIX_CONSTANTS := true
+  endif
+
+  ifneq ($(HAS_UNIX_CONSTANTS), true)
+    $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java: $(BUILD_GENSRC_UC_EXE)
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
+	$(BUILD_GENSRC_UC_EXE) >> $@.tmp
+	$(MV) $@.tmp $@
+  else
+    $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java: $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
+	$(call install-file)
+  endif
+
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+
+  GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/SolarisConstants.java
+
+  GENSRC_SOL_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
+  GENSRC_SOL_SRC_FILE := genSolarisConstants.c
+  GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/gensrc/genSolarisConstants
+
+  SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
+      $(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
+
+  $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE, \
+      SRC := $(GENSRC_SOL_SRC), \
+      INCLUDE_FILES := $(GENSRC_SOL_SRC_FILE), \
+      LANG := C, \
+      CC := $(BUILD_CC), \
+      LDEXE := $(BUILD_CC), \
+      OBJECT_DIR := $(GENSRC_SOL_BIN), \
+      OUTPUT_DIR := $(GENSRC_SOL_BIN), \
+      PROGRAM := genSolarisConstants))
+
+  $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/SolarisConstants.java: $(BUILD_GENSRC_SOL_EXE)
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
+	$(BUILD_GENSRC_SOL_EXE) >> $@.tmp
+	$(MV) $@.tmp $@
+
+
+endif
+
+##########################################################################################
+
+ifndef OPENJDK
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+
+    AB_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc_ab
+    AB_SRC_DIR := $(JDK_TOPDIR)/src/closed/windows/classes/com/sun/java/accessibility
+
+    ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+      $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
+          $(AB_SRC_DIR)/32bit/AccessBridgeLoader.java
+		$(install-file)
+
+      $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java: \
+          $(AB_SRC_DIR)/AccessBridge.java
+		$(install-file)
+
+      $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java: \
+          $(AB_SRC_DIR)/legacy/AccessBridgeLoader.java
+		$(install-file)
+
+      $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java: \
+          $(AB_SRC_DIR)/AccessBridge.java
+		$(install-file)
+
+      GENSRC_MISC += $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java \
+          $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java \
+          $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java \
+          $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java
+
+    else
+      $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
+          $(AB_SRC_DIR)/64bit/AccessBridgeLoader.java
+		$(install-file)
+
+      $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java: \
+          $(AB_SRC_DIR)/AccessBridge.java
+		$(install-file)
+
+      GENSRC_MISC += $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java \
+          $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java
+
+    endif
+  endif
+endif
+
+##########################################################################################
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcProperties.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,395 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+# Prepare the find cache. This is only used on windows.
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/windows/classes))
+
+# All .properties files to be compiled are appended to this variable.
+ALL_COMPILED_PROPSOURCES :=
+# All generated .java files from compilation are appended to this variable.
+ALL_COMPILED_PROPJAVAS :=
+# The (very long) command line for compilation, stored in a file, prior to use.
+COMPILE_PROPCMDLINE :=
+
+# All .properties files to be cleaned are appended to this variable.
+ALL_CLEANED_PROPSOURCES :=
+# All generated cleaned .properties files from cleaning are appended to this variable.
+ALL_CLEANED_PROPOUTPUT :=
+# The (very long) command line for cleaning, stored in a file, prior to use.
+CLEAN_PROPCMDLINE :=
+
+define add_properties_to_compile
+  # $1 is the name of the properties group
+  # $2 is the files belonging to this group
+  # $3 is the super class for the generated java file.
+  # $4 is a from pattern for translating stripped name from source to target
+  # $5 is the to pattern replacing $3 in the target
+
+  # Strip away prefix and suffix,
+  # leaving for example: sun/util/resources/CurrencyNames_sv
+  $1_PROPPATHS := $$(patsubst $(JDK_TOPDIR)/src/windows/classes/%.properties, %, \
+      $$(patsubst $(JDK_TOPDIR)/src/macosx/classes/%.properties, %, \
+      $$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties, %, $2)))
+
+  # Apply optional name transformation, example: hz_TW -> hz_HK
+  $(if $4, $1_PROPPATHS := $$(patsubst $4, $5, $$($1_PROPPATHS)))
+
+  # Accumulate all found properties files.
+  ALL_COMPILED_PROPSOURCES += $2
+
+  # Generate the list of to be created java files.
+  ALL_COMPILED_PROPJAVAS += $$(patsubst %, $(JDK_OUTPUTDIR)/gensrc/%.java, $$($1_PROPPATHS))
+
+  # Now generate a sequence of "-compile ...CurrencyNames_sv.properties ...CurrencyNames_sv.java ListResourceBundle"
+  # suitable to be fed into the CompileProperties command.
+  COMPILE_PROPCMDLINE += $$(subst _SPACE_,$(SPACE),$$(join $$(addprefix -compile_SPACE_, $2), \
+      $$(addsuffix _SPACE_$(strip $3), \
+      $$(addprefix _SPACE_$(JDK_OUTPUTDIR)/gensrc/, \
+      $$(addsuffix .java, $$($1_PROPPATHS))))))
+endef
+
+define add_properties_to_clean
+  # $1 is the name of the properties group
+  # $2 is the files belonging to this group
+  # $3 is a from pattern for translating stripped name from source to target
+  # $4 is the to pattern replacing $3 in the target
+  # $5 optional name of extra directory to put properties files in (ex: resources)
+
+  # Strip away prefix and suffix,
+  # leaving for example: sun/util/resources/CurrencyNames_sv
+  $1_PROPPATHS := $$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/%.properties, %, \
+      $$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties, %, $2))
+
+  # Apply optional name transformation, example: hz_TW -> hz_HK
+  $(if $3, $1_PROPPATHS := $$(patsubst $3, $4, $$($1_PROPPATHS)))
+
+  # Accumulate all found properties files.
+  ALL_CLEANED_PROPSOURCES += $2
+
+  # Generate the list of to be created java files.
+  $1_PROPOUTPUT := $$(patsubst %, $(JDK_OUTPUTDIR)/classes/%.properties, $$($1_PROPPATHS))
+  # If the properties target file isn't in a "resources" dir, add one.
+  ifneq ($5, )
+    $1_PROPOUTPUT := $$(foreach p, $$($1_PROPOUTPUT), $$(dir $$p)$5/$$(notdir $$p))
+  endif
+
+  ALL_CLEANED_PROPOUTPUT += $$($1_PROPOUTPUT)
+
+  # Now generate a sequence of "-clean ...[src]...CurrencyNames_sv.properties ...[build]...CurrencyNames_sv.properties"
+  # suitable to be fed into the StripProperties command.
+  CLEAN_PROPCMDLINE += $$(subst _SPACE_,$(SPACE),$$(join $$(addprefix -clean_SPACE_,$2), \
+      $$(addprefix _SPACE_, $$($1_PROPOUTPUT))))
+endef
+
+# Some packages contain pregenerated java files instead of properties files.
+# But unfortunately not all properties should be converted, some should be
+# copied....argggghhh.
+
+# For example:
+#    sun/applet/resources
+#    sun/misc/resources
+#    sun/text/resources
+#    sun/tools/jconsole/resources
+#    sun/tools/native2ascii/resources
+#    sun/util/resources
+
+# Some packages have properties that need to be converted to java source files.
+
+#com/apple/laf/resources
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  $(eval $(call add_properties_to_compile,COM_APPLE_LAF, \
+      $(filter %.properties, \
+      $(call CacheFind, $(JDK_TOPDIR)/src/macosx/classes/com/apple/laf/resources)), \
+      ListResourceBundle))
+endif
+
+#com/sun/accessibility/internal/resources
+$(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#com/sun/imageio/plugins/common
+$(eval $(call add_properties_to_clean,COM_SUN_IMAGEIO, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/imageio))))
+#com/sun/java/swing/plaf/gtk/resources
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  # Only compile GTK resource bundles on Solaris/Linux
+  $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK, \
+      $(filter %.properties, \
+      $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources)), \
+      ListResourceBundle))
+  $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK_HK, \
+      $(filter %.properties, \
+      $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources)), \
+      ListResourceBundle, %zh_TW, %zh_HK))
+endif
+#com/sun/java/swing/plaf/motif/resources
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#com/sun/java/swing/plaf/windows/resources
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#com/sun/java/util/jar/pack
+$(eval $(call add_properties_to_clean,JNDI_COSNAMING, \
+    $(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/intrinsic.properties))
+#com/sun/jndi/cosnaming
+$(eval $(call add_properties_to_clean,JNDI_COSNAMING, \
+    $(JDK_TOPDIR)/src/share/classes/com/sun/jndi/cosnaming/jndiprovider.properties))
+#com/sun/jndi/ldap
+$(eval $(call add_properties_to_clean,JNDI_COSNAMING, \
+    $(JDK_TOPDIR)/src/share/classes/com/sun/jndi/ldap/jndiprovider.properties))
+
+#com/sun/org/apache/xml/internal/security/resource
+#FIXME: The "xmlsecurity*.properties" pattern is not ideal; we might want to find
+#a better way to select the properties files that are needed.
+$(eval $(call add_properties_to_clean,XML_SECURITY, \
+    $(filter $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity%.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource))))
+
+#com/sun/rowset
+$(eval $(call add_properties_to_clean,COM_SUN_ROWSET, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/rowset))))
+$(eval $(call add_properties_to_clean,COM_SUN_ROWSET_HK, \
+    $(filter %zh_TW.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/rowset)), \
+    %zh_TW, %zh_HK))
+
+#com/sun/swing/internal/plaf/basic/resources
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#com/sun/swing/internal/plaf/metal/resources
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL_HK, \
+    $(filter %.properties, $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#com/sun/swing/internal/plaf/synth/resources
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+
+#com/sun/tools/jdi/resources
+$(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/tools/jdi/resources)), \
+    ListResourceBundle))
+
+#com/sun/tools/script/shell
+#java/util
+#javax/sql/rowset
+$(eval $(call add_properties_to_clean,JAVAX_SQL_ROWSET, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/javax/sql/rowset))))
+#sun/awt/resources
+$(eval $(call add_properties_to_compile,SUN_AWT, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/awt/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,SUN_AWT_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/awt/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#sun/awt/windows/
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call add_properties_to_compile,SUN_AWT, \
+      $(filter $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows/awtLocalization%.properties, \
+      $(call CacheFind, $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)), \
+      ListResourceBundle))
+  $(eval $(call add_properties_to_compile,SUN_AWT_HK, \
+      $(filter $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows/awtLocalization%.properties, \
+      $(call CacheFind, $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)), \
+      ListResourceBundle, %zh_TW, %zh_HK))
+endif
+# os x specific awt properties
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+$(eval $(call add_properties_to_compile,SUN_AWT,\
+	$(filter $(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources/%.properties,\
+	$(call CacheFind,$(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources)),\
+	ListResourceBundle))
+endif
+
+#sun/launcher/resources
+$(eval $(call add_properties_to_compile,SUN_LAUNCHER, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,SUN_LAUNCHER_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#sun/management/resources
+$(eval $(call add_properties_to_compile,SUN_MANAGEMENT, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/management/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,SUN_MANAGEMENT_KH, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/management/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#sun/print
+#sun/print/resources
+$(eval $(call add_properties_to_compile,SUN_PRINT, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/print/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,SUN_PRINT_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/print/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+#sun/rmi/registry/resources
+$(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources))))
+$(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY_HK, \
+    $(filter %zh_TW.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources)), \
+    %zh_TW, %zh_HK))
+
+#sun/rmi/rmic/resources
+$(eval $(call add_properties_to_clean,SUN_RMI_RMIC, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/rmi/rmic/resources))))
+
+#sun/rmi/server/resources
+$(eval $(call add_properties_to_clean,SUN_RMI_SERVER, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources))))
+$(eval $(call add_properties_to_clean,SUN_RMI_SERVER_HK, \
+    $(filter %zh_TW.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources)), \
+    %zh_TW, %zh_HK))
+
+# sun/tools/jar/resources
+$(eval $(call add_properties_to_compile,SUN_TOOLS_JAR, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,SUN_TOOLS_JAR_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+
+#sun/tools/javac/resources
+# It's unclear if the other localized property files here are supposed to be copied or not
+# but the old build system didn't copy them.
+$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER, \
+    $(filter %javac.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources))))
+
+#sun/tools/jconsole/resources
+$(eval $(call add_properties_to_clean,SUN_TOOLS_JCONSOLE, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources))))
+
+#sun/tools/serialver
+$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/tools/serialver)), , ,resources))
+
+#sun/util/logging/resources
+$(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources)), \
+    ListResourceBundle))
+$(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING_HK, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources)), \
+    ListResourceBundle, %zh_TW, %zh_HK))
+# sun/util/resources
+$(eval $(call add_properties_to_compile,SUN_UTIL, \
+    $(filter %.properties, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/util/resources)), \
+    sun.util.resources.LocaleNamesBundle))
+
+# Now setup the rule for the generation of the resource bundles.
+$(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties: $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS)
+        # Generate all output directories in advance since the build tool does not do that...
+	$(MKDIR) -p $(sort $(dir $(ALL_COMPILED_PROPJAVAS)))
+	$(ECHO) Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles
+	$(call ListPathsSafely,COMPILE_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/gensrc/_the.cmdline)
+	$(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc/_the.cmdline
+	$(TOUCH) $@
+
+# Now setup the rule for the generation of the cleaned properties.
+# FIXME: We currently don't handle removed properties incrementally.
+$(JDK_OUTPUTDIR)/classes/_the.cleaned_properties: $(ALL_CLEANED_PROPSOURCES) $(BUILD_TOOLS)
+	$(RM) $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline
+        # Generate all output directories in advance since the build tool does not do that...
+	$(MKDIR) -p $(sort $(dir $(ALL_CLEANED_PROPOUTPUT)))
+	$(ECHO) Copying and cleaning $(words $(ALL_CLEANED_PROPSOURCES)) properties
+	$(call ListPathsSafely,CLEAN_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline)
+	$(TOOL_STRIPPROPERTIES) @$(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline
+	$(TOUCH) $@
+
+$(ALL_COMPILED_PROPJAVAS): $(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties
+
+$(ALL_CLEANED_PROPOUTPUT): $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties
+
+
+# Some zh_HK resources are just copied of zh_TW
+$(JDK_OUTPUTDIR)/gensrc/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes/%_zh_TW.java
+	$(MKDIR) -p $(@D)
+	$(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@
+
+ZH_HK_JAVA := sun/applet/resources/MsgAppletViewer_zh_HK.java \
+    sun/misc/resources/Messages_zh_HK.java \
+    sun/security/util/AuthResources_zh_HK.java \
+    sun/security/util/Resources_zh_HK.java
+
+ZH_HK_JAVA_FILES := $(addprefix $(JDK_OUTPUTDIR)/gensrc/, $(ZH_HK_JAVA))
+
+
+GENSRC_PROPERTIES := $(ALL_COMPILED_PROPJAVAS) $(ALL_CLEANED_PROPOUTPUT) $(ZH_HK_JAVA_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcSwing.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,103 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
+#
+# Generate java files for javax.swing.plaf package
+#
+NIMBUS_PACKAGE = javax.swing.plaf
+NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/javax/swing/plaf/nimbus
+NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/skin.laf
+
+$(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS)
+	$(MKDIR) -p $(@D)
+	$(ECHO) "Generating Nimbus source files"
+	$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
+	    -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc \
+	    -packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
+	$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
+	$(TOUCH) $@
+
+GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus
+
+#
+# Generate beaninfo java files
+#
+
+DOCLETSRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans
+
+# javax.swing package
+BEANS = AbstractButton Box JComponent JApplet JButton \
+    JCheckBox JCheckBoxMenuItem JComboBox JColorChooser \
+    JDesktopPane JDialog JEditorPane JFileChooser JFrame \
+    JFormattedTextField JInternalFrame JLabel JLayeredPane \
+    JList JMenu JMenuBar JMenuItem JOptionPane JPanel \
+    JPasswordField JPopupMenu JProgressBar JRadioButton \
+    JRadioButtonMenuItem JScrollBar JScrollPane JSeparator \
+    JSlider JSplitPane JSpinner JTabbedPane JTable \
+    JTextArea JTextField JTextPane JToggleButton JToolBar \
+    JTree JWindow
+
+# javax.swing.text package
+BEANS_TEXT = JTextComponent
+
+BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/%.java) \
+    $(BEANS_TEXT:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/text/%.java)
+
+# Dummy variable so far, in the old build system it was false by default
+SWINGBEAN_DEBUG_FLAG = false
+# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(JDK_OUTPUTDIR)/btclasses
+# LocaleDataMetaInfo needs to be generated before running this to avoid confusing errors
+# in the build log.
+$(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \
+    $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java \
+    $(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS) \
+    | $(GENSRC_LOCALEDATAMETAINFO)
+	$(ECHO) Generating beaninfo
+	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing
+	$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
+	    -sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_OUTPUTDIR)/gensrc" \
+	    -doclet GenDocletBeanInfo \
+	    -x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing \
+	    -t $(DOCLETSRC_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
+	    -XDignore.symbol.file=true \
+	    -classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC) $(LOG_INFO)
+        # Move the JTextComponent into its proper package directory.
+	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/text
+	$(MV) $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/JTextComponentBeanInfo.java $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/text/JTextComponentBeanInfo.java
+	$(TOUCH) $@
+
+# This file is the part of dt.jar
+# For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/javax/swing
+# Should it be moved under $(JDK_TOPDIR)/src/share/classes/javax/swing instead?
+$(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java: $(DOCLETSRC_DIR)/javax/swing/SwingBeanInfoBase.java
+	$(call install-file)
+
+# This file is the part of dt.jar
+# For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/sun/swing
+# Should it be moved under $(JDK_TOPDIR)/src/share/classes/sun/swing instead?
+$(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java: $(DOCLETSRC_DIR)/sun/swing/BeanInfoUtils.java
+	$(call install-file)
+
+GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/gensrc/GensrcX11Wrappers.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,121 @@
+#
+# 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.  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 responsible for extracting the x11 native struct offsets to
+# the xawt Java library. The tool needs to be run on the os/arch that
+# will host the final jvm, thus the tool cannot be used when cross compiling.
+
+# To enable cross compiling, the two versions of the generated offset file,
+# sizes.32 and sizes.64 are committed into the source code repository.
+# These are the ones used.
+
+# However when not cross compiling, the offset generator tool is built and
+# run, to verify that it still generates the same sizes.32 and sizes.64.
+
+GENSRC_X11WRAPPERS :=
+# Put temporary c-code and executable to calculate offsets here.
+# Also put verification offset file here as well.
+GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
+# Put the generated Java classes used to interface X11 from awt here.
+GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc/sun/awt/X11
+
+# The pre-calculated offset file are stored here:
+GENSRC_SIZER_DIR := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
+
+# Normal case is to generate only according to target bits
+GENSRC_X11_VERSION := $(OPENJDK_TARGET_CPU_BITS)
+ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
+  ifneq ($(OPENJDK_TARGET_OS), linux)
+    # On all 64-bit systems except Linux, generate both 32 and 64 bit versions
+    GENSRC_X11_VERSION := 32 64
+  endif
+else
+  ifeq ($(OPENJDK_TARGET_OS), solaris)
+    # As a special case, solaris 32-bit also generates the 64-bit version
+    GENSRC_X11_VERSION := 32 64
+  endif
+endif
+
+GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes., $(GENSRC_X11_VERSION))
+
+# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
+# file prefix it is given so those not needed need to be hidden.
+$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
+	$(MKDIR) -p $(@D)
+	$(RM) '$@'
+	$(SORT) $< > $@
+
+# Run the tool on the offset files copied from the source repository to generate several Java classes
+# used in awt.
+$(JDK_OUTPUTDIR)/gensrc/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS)
+	$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
+	$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
+	$(TOUCH) $@
+
+GENSRC_X11WRAPPERS += $(JDK_OUTPUTDIR)/gensrc/_the.generated.x11
+
+ifneq ($(COMPILE_TYPE), cross)
+  # This is not a cross compile, regenerate the offset file, so that we
+  # can compare it with the version in the source code repository.
+
+  # Generate the C code for the program that will output the offset file.
+  $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS)
+	$(ECHO) "Generating X11 wrapper ($*-bit version)"
+	$(MKDIR) -p $(@D)
+	$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
+
+  # use -m32/-m64 only if the compiler supports it
+  ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true)
+    MEMORY_MODEL_FLAG = "-m$*"
+  endif
+
+  # Compile the C code into an executable.
+  $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
+	$(MKDIR) -p $(@D)
+	(cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
+	    $(X_CFLAGS) \
+	    $(X_LIBS) \
+	    -I$(JDK_OUTPUTDIR)/include \
+	    -I$(JDK_TOPDIR)/src/share/javavm/export \
+	    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
+	    -I$(JDK_TOPDIR)/src/share/native/common \
+	    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
+	    -I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
+	    -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+	    -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
+
+  .PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
+
+  # Run the executable create the offset file and check that it is identical
+  # to the offset file in the source code repository.
+  $(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
+	$(MKDIR) -p $(@D)
+	$(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
+	$(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
+	$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
+	mv $@.tmp $@
+
+  GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
+endif
--- a/makefiles/jpda/jdwp/jdwp.spec	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/jpda/jdwp/jdwp.spec	Wed Oct 30 18:38:20 2013 +0000
@@ -25,42 +25,42 @@
 
 JDWP "Java(tm) Debug Wire Protocol"
 (CommandSet VirtualMachine=1
-    (Command Version=1 
+    (Command Version=1
         "Returns the JDWP version implemented by the target VM. "
-	"The version string format is implementation dependent. "
-	(Out 
+        "The version string format is implementation dependent. "
+        (Out
         )
-        (Reply 
-	    (string description "Text information on the VM version")
-	    (int    jdwpMajor   "Major JDWP Version number")
-	    (int    jdwpMinor   "Minor JDWP Version number")
-	    (string vmVersion   "Target VM JRE version, as in the java.version property")
-	    (string vmName      "Target VM name, as in the java.vm.name property")
+        (Reply
+            (string description "Text information on the VM version")
+            (int    jdwpMajor   "Major JDWP Version number")
+            (int    jdwpMinor   "Minor JDWP Version number")
+            (string vmVersion   "Target VM JRE version, as in the java.version property")
+            (string vmName      "Target VM name, as in the java.vm.name property")
         )
         (ErrorSet
-            (Error VM_DEAD)   
+            (Error VM_DEAD)
         )
     )
     (Command ClassesBySignature=2
         "Returns reference types for all the classes loaded by the target VM "
-	"which match the given signature. "
-	"Multple reference types will be returned if two or more class "
-	"loaders have loaded a class of the same name. "
-	"The search is confined to loaded classes only; no attempt is made "
-	"to load a class of the given signature. "
-	(Out
-	    (string signature "JNI signature of the class to find "
-	                      "(for example, \"Ljava/lang/String;\"). "
+        "which match the given signature. "
+        "Multple reference types will be returned if two or more class "
+        "loaders have loaded a class of the same name. "
+        "The search is confined to loaded classes only; no attempt is made "
+        "to load a class of the given signature. "
+        (Out
+            (string signature "JNI signature of the class to find "
+                              "(for example, \"Ljava/lang/String;\"). "
             )
         )
-        (Reply 
-            (Repeat classes "Number of reference types that follow." 
+        (Reply
+            (Repeat classes "Number of reference types that follow."
                 (Group ClassInfo
                     (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
-		                      "of following reference type. ")
+                                      "of following reference type. ")
                     (referenceTypeID typeID "Matching loaded reference type")
                     (int status "The current class "
-		                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
+                                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
                 )
             )
         )
@@ -70,19 +70,19 @@
     )
     (Command AllClasses=3
         "Returns reference types for all classes currently loaded by the "
-	"target VM."
-	(Out 
+        "target VM."
+        (Out
         )
-        (Reply 
-            (Repeat classes "Number of reference types that follow." 
+        (Reply
+            (Repeat classes "Number of reference types that follow."
                 (Group ClassInfo
                     (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
-		                      "of following reference type. ")
+                                      "of following reference type. ")
                     (referenceTypeID typeID "Loaded reference type")
-                    (string signature 
+                    (string signature
                                 "The JNI signature of the loaded reference type")
                     (int status "The current class "
-		                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
+                                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
                 )
             )
         )
@@ -92,16 +92,16 @@
     )
     (Command AllThreads=4
         "Returns all threads currently running in the target VM . "
-	"The returned list contains threads created through "
-	"java.lang.Thread, all native threads attached to "
-	"the target VM through JNI, and system threads created "
-	"by the target VM. Threads that have not yet been started "
-	"and threads that have completed their execution are not "
-	"included in the returned list. "
+        "The returned list contains threads created through "
+        "java.lang.Thread, all native threads attached to "
+        "the target VM through JNI, and system threads created "
+        "by the target VM. Threads that have not yet been started "
+        "and threads that have completed their execution are not "
+        "included in the returned list. "
         (Out
         )
         (Reply
-            (Repeat threads "Number of threads that follow." 
+            (Repeat threads "Number of threads that follow."
                 (threadObject thread "A running thread")
             )
         )
@@ -111,12 +111,12 @@
     )
     (Command TopLevelThreadGroups=5
         "Returns all thread groups that do not have a parent. This command "
-	"may be used as the first step in building a tree (or trees) of the "
-	"existing thread groups."
+        "may be used as the first step in building a tree (or trees) of the "
+        "existing thread groups."
         (Out
         )
         (Reply
-            (Repeat groups "Number of thread groups that follow." 
+            (Repeat groups "Number of thread groups that follow."
                 (threadGroupObject group "A top level thread group")
             )
         )
@@ -125,29 +125,29 @@
         )
     )
     (Command Dispose=6
-	"Invalidates this virtual machine mirror. "
-	"The communication channel to the target VM is closed, and "
-	"the target VM prepares to accept another subsequent connection "
-	"from this debugger or another debugger, including the "
-	"following tasks: "
-	"<ul>"
-	"<li>All event requests are cancelled. "
-	"<li>All threads suspended by the thread-level "
-	"<a href=\"#JDWP_ThreadReference_Resume\">resume</a> command "
-	"or the VM-level "
-	"<a href=\"#JDWP_VirtualMachine_Resume\">resume</a> command "
-	"are resumed as many times as necessary for them to run. "
-	"<li>Garbage collection is re-enabled in all cases where it was "
-	"<a href=\"#JDWP_ObjectReference_DisableCollection\">disabled</a> "
-	"</ul>"
-	"Any current method invocations executing in the target VM "
-	"are continued after the disconnection. Upon completion of any such "
-	"method invocation, the invoking thread continues from the "
-	"location where it was originally stopped. "
-	"<p>"
-	"Resources originating in  "
-	"this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) "
-	"will become invalid. "
+        "Invalidates this virtual machine mirror. "
+        "The communication channel to the target VM is closed, and "
+        "the target VM prepares to accept another subsequent connection "
+        "from this debugger or another debugger, including the "
+        "following tasks: "
+        "<ul>"
+        "<li>All event requests are cancelled. "
+        "<li>All threads suspended by the thread-level "
+        "<a href=\"#JDWP_ThreadReference_Resume\">resume</a> command "
+        "or the VM-level "
+        "<a href=\"#JDWP_VirtualMachine_Resume\">resume</a> command "
+        "are resumed as many times as necessary for them to run. "
+        "<li>Garbage collection is re-enabled in all cases where it was "
+        "<a href=\"#JDWP_ObjectReference_DisableCollection\">disabled</a> "
+        "</ul>"
+        "Any current method invocations executing in the target VM "
+        "are continued after the disconnection. Upon completion of any such "
+        "method invocation, the invoking thread continues from the "
+        "location where it was originally stopped. "
+        "<p>"
+        "Resources originating in  "
+        "this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) "
+        "will become invalid. "
         (Out
         )
         (Reply
@@ -157,8 +157,8 @@
     )
     (Command IDSizes=7
         "Returns the sizes of variably-sized data types in the target VM."
-	"The returned values indicate the number of bytes used by the "
-	"identifiers in command and reply packets."
+        "The returned values indicate the number of bytes used by the "
+        "identifiers in command and reply packets."
         (Out
         )
         (Reply
@@ -173,15 +173,15 @@
         )
     )
     (Command Suspend=8
-	"Suspends the execution of the application running in the target "
-	"VM. All Java threads currently running will be suspended. "
-	"<p>"
-	"Unlike java.lang.Thread.suspend, "
-	"suspends of both the virtual machine and individual threads are "
-	"counted. Before a thread will run again, it must be resumed through "
-	"the <a href=\"#JDWP_VirtualMachine_Resume\">VM-level resume</a> command "
-	"or the <a href=\"#JDWP_ThreadReference_Resume\">thread-level resume</a> command "
-	"the same number of times it has been suspended. "
+        "Suspends the execution of the application running in the target "
+        "VM. All Java threads currently running will be suspended. "
+        "<p>"
+        "Unlike java.lang.Thread.suspend, "
+        "suspends of both the virtual machine and individual threads are "
+        "counted. Before a thread will run again, it must be resumed through "
+        "the <a href=\"#JDWP_VirtualMachine_Resume\">VM-level resume</a> command "
+        "or the <a href=\"#JDWP_ThreadReference_Resume\">thread-level resume</a> command "
+        "the same number of times it has been suspended. "
         (Out
         )
         (Reply
@@ -193,9 +193,9 @@
     (Command Resume=9
         "Resumes execution of the application after the suspend "
         "command or an event has stopped it. "
-	"Suspensions of the Virtual Machine and individual threads are "
-	"counted. If a particular thread is suspended n times, it must "
-	"resumed n times before it will continue. "
+        "Suspensions of the Virtual Machine and individual threads are "
+        "counted. If a particular thread is suspended n times, it must "
+        "resumed n times before it will continue. "
         (Out
         )
         (Reply
@@ -207,10 +207,10 @@
         "Terminates the target VM with the given exit code. "
         "On some platforms, the exit code might be truncated, for "
         "example, to the low order 8 bits. "
-	"All ids previously returned from the target VM become invalid. "
-	"Threads running in the VM are abruptly terminated. "
-	"A thread death exception is not thrown and "
-	"finally blocks are not run."
+        "All ids previously returned from the target VM become invalid. "
+        "Threads running in the VM are abruptly terminated. "
+        "A thread death exception is not thrown and "
+        "finally blocks are not run."
         (Out
             (int exitCode "the exit code")
         )
@@ -221,12 +221,12 @@
     )
     (Command CreateString=11
         "Creates a new string object in the target VM and returns "
-	"its id. " 
+        "its id. "
         (Out
-	    (string utf "UTF-8 characters to use in the created string. ")
+            (string utf "UTF-8 characters to use in the created string. ")
         )
         (Reply
-            (stringObject stringObject 
+            (stringObject stringObject
                 "Created string (instance of java.lang.String) ")
         )
         (ErrorSet
@@ -235,32 +235,32 @@
     )
     (Command Capabilities=12
         "Retrieve this VM's capabilities. The capabilities are returned "
-	"as booleans, each indicating the presence or absence of a "
-	"capability. The commands associated with each capability will "
-	"return the NOT_IMPLEMENTED error if the cabability is not "
-	"available."
+        "as booleans, each indicating the presence or absence of a "
+        "capability. The commands associated with each capability will "
+        "return the NOT_IMPLEMENTED error if the cabability is not "
+        "available."
         (Out
         )
         (Reply
-            (boolean canWatchFieldModification 
-	             "Can the VM watch field modification, and therefore "
-		     "can it send the Modification Watchpoint Event?")
-            (boolean canWatchFieldAccess 
-	             "Can the VM watch field access, and therefore "
-		     "can it send the Access Watchpoint Event?")
-            (boolean canGetBytecodes 
-	             "Can the VM get the bytecodes of a given method? ")
-            (boolean canGetSyntheticAttribute 
-	             "Can the VM determine whether a field or method is "
-		     "synthetic? (that is, can the VM determine if the "
-		     "method or the field was invented by the compiler?) ")
-            (boolean canGetOwnedMonitorInfo 
-	             "Can the VM get the owned monitors infornation for "
-		     "a thread?")
-            (boolean canGetCurrentContendedMonitor 
-	             "Can the VM get the current contended monitor of a thread?")
-            (boolean canGetMonitorInfo 
-	             "Can the VM get the monitor information for a given object? ")
+            (boolean canWatchFieldModification
+                     "Can the VM watch field modification, and therefore "
+                     "can it send the Modification Watchpoint Event?")
+            (boolean canWatchFieldAccess
+                     "Can the VM watch field access, and therefore "
+                     "can it send the Access Watchpoint Event?")
+            (boolean canGetBytecodes
+                     "Can the VM get the bytecodes of a given method? ")
+            (boolean canGetSyntheticAttribute
+                     "Can the VM determine whether a field or method is "
+                     "synthetic? (that is, can the VM determine if the "
+                     "method or the field was invented by the compiler?) ")
+            (boolean canGetOwnedMonitorInfo
+                     "Can the VM get the owned monitors infornation for "
+                     "a thread?")
+            (boolean canGetCurrentContendedMonitor
+                     "Can the VM get the current contended monitor of a thread?")
+            (boolean canGetMonitorInfo
+                     "Can the VM get the monitor information for a given object? ")
         )
         (ErrorSet
             (Error VM_DEAD)
@@ -268,13 +268,13 @@
     )
     (Command ClassPaths=13
         "Retrieve the classpath and bootclasspath of the target VM. "
-	"If the classpath is not defined, returns an empty list. If the "
+        "If the classpath is not defined, returns an empty list. If the "
         "bootclasspath is not defined returns an empty list."
         (Out
         )
         (Reply
-	    (string baseDir "Base directory used to resolve relative "
-	                    "paths in either of the following lists.")
+            (string baseDir "Base directory used to resolve relative "
+                            "paths in either of the following lists.")
             (Repeat classpaths "Number of paths in classpath."
                 (string path "One component of classpath") )
             (Repeat bootclasspaths "Number of paths in bootclasspath."
@@ -297,32 +297,32 @@
         "The sender of this command "
         "promises that no further commands will be sent "
         "referencing a freed ID.
-	"<p>"
-	"Use of this command is not required. If it is not sent, "
-	"resources associated with each ID will be freed by the back-end "
-	"at some time after the corresponding object is garbage collected. "
-	"It is most useful to use this command to reduce the load on the "
-	"back-end if a very large number of "
-	"objects has been retrieved from the back-end (a large array, "
-	"for example) but may not be garbage collected any time soon. "
-	"<p>"
+        "<p>"
+        "Use of this command is not required. If it is not sent, "
+        "resources associated with each ID will be freed by the back-end "
+        "at some time after the corresponding object is garbage collected. "
+        "It is most useful to use this command to reduce the load on the "
+        "back-end if a very large number of "
+        "objects has been retrieved from the back-end (a large array, "
+        "for example) but may not be garbage collected any time soon. "
+        "<p>"
         "IDs may be re-used by the back-end after they "
         "have been freed with this command."
         "This description assumes reference counting, "
         "a back-end may use any implementation which operates "
         "equivalently. "
-	(Out
-	    (Repeat requests "Number of object dispose requests that follow"
-		(Group Request
-	 	    (object object "The object ID")
-		    (int refCnt "The number of times this object ID has been "
-				"part of a packet received from the back-end. "
-				"An accurate count prevents the object ID "
-				"from being freed on the back-end if "
-				"it is part of an incoming packet, not yet "
-				"handled by the front-end.")
-		)
-	    )
+        (Out
+            (Repeat requests "Number of object dispose requests that follow"
+                (Group Request
+                    (object object "The object ID")
+                    (int refCnt "The number of times this object ID has been "
+                                "part of a packet received from the back-end. "
+                                "An accurate count prevents the object ID "
+                                "from being freed on the back-end if "
+                                "it is part of an incoming packet, not yet "
+                                "handled by the front-end.")
+                )
+            )
         )
         (Reply
         )
@@ -331,16 +331,16 @@
     )
     (Command HoldEvents=15
         "Tells the target VM to stop sending events. Events are not discarded; "
-	"they are held until a subsequent ReleaseEvents command is sent. "
-	"This command is useful to control the number of events sent "
-	"to the debugger VM in situations where very large numbers of events "
-	"are generated. "
-	"While events are held by the debugger back-end, application "
-	"execution may be frozen by the debugger back-end to prevent "
-	"buffer overflows on the back end. 
-	"Responses to commands are never held and are not affected by this 
-	"command. If events are already being held, this command is "
-	"ignored."
+        "they are held until a subsequent ReleaseEvents command is sent. "
+        "This command is useful to control the number of events sent "
+        "to the debugger VM in situations where very large numbers of events "
+        "are generated. "
+        "While events are held by the debugger back-end, application "
+        "execution may be frozen by the debugger back-end to prevent "
+        "buffer overflows on the back end.
+        "Responses to commands are never held and are not affected by this
+        "command. If events are already being held, this command is "
+        "ignored."
         (Out
         )
         (Reply
@@ -350,9 +350,9 @@
     )
     (Command ReleaseEvents=16
         "Tells the target VM to continue sending events. This command is "
-	"used to restore normal activity after a HoldEvents command. If "
-	"there is no current HoldEvents command in effect, this command is "
-	"ignored."
+        "used to restore normal activity after a HoldEvents command. If "
+        "there is no current HoldEvents command in effect, this command is "
+        "ignored."
         (Out
         )
         (Reply
@@ -362,112 +362,112 @@
     )
     (Command CapabilitiesNew=17
         "Retrieve all of this VM's capabilities. The capabilities are returned "
-	"as booleans, each indicating the presence or absence of a "
-	"capability. The commands associated with each capability will "
-	"return the NOT_IMPLEMENTED error if the cabability is not "
-	"available."
+        "as booleans, each indicating the presence or absence of a "
+        "capability. The commands associated with each capability will "
+        "return the NOT_IMPLEMENTED error if the cabability is not "
+        "available."
         "Since JDWP version 1.4."
         (Out
         )
         (Reply
-            (boolean canWatchFieldModification 
-	             "Can the VM watch field modification, and therefore "
-		     "can it send the Modification Watchpoint Event?")
-            (boolean canWatchFieldAccess 
-	             "Can the VM watch field access, and therefore "
-		     "can it send the Access Watchpoint Event?")
-            (boolean canGetBytecodes 
-	             "Can the VM get the bytecodes of a given method? ")
-            (boolean canGetSyntheticAttribute 
-	             "Can the VM determine whether a field or method is "
-		     "synthetic? (that is, can the VM determine if the "
-		     "method or the field was invented by the compiler?) ")
-            (boolean canGetOwnedMonitorInfo 
-	             "Can the VM get the owned monitors infornation for "
-		     "a thread?")
-            (boolean canGetCurrentContendedMonitor 
-	             "Can the VM get the current contended monitor of a thread?")
-            (boolean canGetMonitorInfo 
-	             "Can the VM get the monitor information for a given object? ")
-            (boolean canRedefineClasses 
-	             "Can the VM redefine classes?")
-            (boolean canAddMethod 
-	             "Can the VM add methods when redefining "
+            (boolean canWatchFieldModification
+                     "Can the VM watch field modification, and therefore "
+                     "can it send the Modification Watchpoint Event?")
+            (boolean canWatchFieldAccess
+                     "Can the VM watch field access, and therefore "
+                     "can it send the Access Watchpoint Event?")
+            (boolean canGetBytecodes
+                     "Can the VM get the bytecodes of a given method? ")
+            (boolean canGetSyntheticAttribute
+                     "Can the VM determine whether a field or method is "
+                     "synthetic? (that is, can the VM determine if the "
+                     "method or the field was invented by the compiler?) ")
+            (boolean canGetOwnedMonitorInfo
+                     "Can the VM get the owned monitors infornation for "
+                     "a thread?")
+            (boolean canGetCurrentContendedMonitor
+                     "Can the VM get the current contended monitor of a thread?")
+            (boolean canGetMonitorInfo
+                     "Can the VM get the monitor information for a given object? ")
+            (boolean canRedefineClasses
+                     "Can the VM redefine classes?")
+            (boolean canAddMethod
+                     "Can the VM add methods when redefining "
                      "classes?")
-            (boolean canUnrestrictedlyRedefineClasses 
-	             "Can the VM redefine classes"
+            (boolean canUnrestrictedlyRedefineClasses
+                     "Can the VM redefine classes"
                      "in arbitrary ways?")
             (boolean canPopFrames
-	             "Can the VM pop stack frames?")
+                     "Can the VM pop stack frames?")
             (boolean canUseInstanceFilters
-	             "Can the VM filter events by specific object?")
+                     "Can the VM filter events by specific object?")
             (boolean canGetSourceDebugExtension
-	             "Can the VM get the source debug extension?")
+                     "Can the VM get the source debug extension?")
             (boolean canRequestVMDeathEvent
-	             "Can the VM request VM death events?")
+                     "Can the VM request VM death events?")
             (boolean canSetDefaultStratum
-	             "Can the VM set a default stratum?")
+                     "Can the VM set a default stratum?")
             (boolean canGetInstanceInfo
-	             "Can the VM return instances, counts of instances of classes "
+                     "Can the VM return instances, counts of instances of classes "
                      "and referring objects?")
             (boolean canRequestMonitorEvents
-	             "Can the VM request monitor events?")
+                     "Can the VM request monitor events?")
             (boolean canGetMonitorFrameInfo
-	             "Can the VM get monitors with frame depth info?")
+                     "Can the VM get monitors with frame depth info?")
             (boolean canUseSourceNameFilters
-	             "Can the VM filter class prepare events by source name?")
+                     "Can the VM filter class prepare events by source name?")
             (boolean canGetConstantPool
-	             "Can the VM return the constant pool information?")
+                     "Can the VM return the constant pool information?")
             (boolean canForceEarlyReturn
-	             "Can the VM force early return from a method?")
+                     "Can the VM force early return from a method?")
             (boolean reserved22
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved23
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved24
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved25
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved26
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved27
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved28
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved29
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved30
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved31
-	             "Reserved for future capability")
+                     "Reserved for future capability")
             (boolean reserved32
-	             "Reserved for future capability")
+                     "Reserved for future capability")
         )
         (ErrorSet
             (Error VM_DEAD)
         )
     )
     (Command RedefineClasses=18
-        "Installs new class definitions. "	
-	"If there are active stack frames in methods of the redefined classes in the "
-	"target VM then those active frames continue to run the bytecodes of the "
-	"original method. These methods are considered obsolete - see "
-	"<a href=\"#JDWP_Method_IsObsolete\">IsObsolete</a>. The methods in the "
-	"redefined classes will be used for new invokes in the target VM. "
-	"The original method ID refers to the redefined method. "
-	"All breakpoints in the redefined classes are cleared."
-	"If resetting of stack frames is desired, the "
-	"<a href=\"#JDWP_StackFrame_PopFrames\">PopFrames</a> command can be used "
-	"to pop frames with obsolete methods."
-	"<p>"
-	"Requires canRedefineClasses capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
-	"In addition to the canRedefineClasses capability, the target VM must "
-	"have the canAddMethod capability to add methods when redefining classes, "
-	"or the canUnrestrictedlyRedefineClasses to redefine classes in arbitrary "
-	"ways."
-	(Out 
-            (Repeat classes "Number of reference types that follow." 
+        "Installs new class definitions. "
+        "If there are active stack frames in methods of the redefined classes in the "
+        "target VM then those active frames continue to run the bytecodes of the "
+        "original method. These methods are considered obsolete - see "
+        "<a href=\"#JDWP_Method_IsObsolete\">IsObsolete</a>. The methods in the "
+        "redefined classes will be used for new invokes in the target VM. "
+        "The original method ID refers to the redefined method. "
+        "All breakpoints in the redefined classes are cleared."
+        "If resetting of stack frames is desired, the "
+        "<a href=\"#JDWP_StackFrame_PopFrames\">PopFrames</a> command can be used "
+        "to pop frames with obsolete methods."
+        "<p>"
+        "Requires canRedefineClasses capability - see "
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
+        "In addition to the canRedefineClasses capability, the target VM must "
+        "have the canAddMethod capability to add methods when redefining classes, "
+        "or the canUnrestrictedlyRedefineClasses to redefine classes in arbitrary "
+        "ways."
+        (Out
+            (Repeat classes "Number of reference types that follow."
                 (Group ClassDef
                     (referenceType refType "The reference type.")
                     (Repeat classfile "Number of bytes defining class (below)"
@@ -477,7 +477,7 @@
                 )
             )
         )
-        (Reply 
+        (Reply
         )
         (ErrorSet
             (Error INVALID_CLASS    "One of the refTypes is not the ID of a reference "
@@ -501,9 +501,9 @@
     )
     (Command SetDefaultStratum=19
         "Set the default stratum. Requires canSetDefaultStratum capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
-	(Out
-	    (string stratumID "default stratum, or empty string to use "
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        (Out
+            (string stratumID "default stratum, or empty string to use "
                               "reference type default.")
         )
         (Reply
@@ -515,28 +515,28 @@
     )
     (Command AllClassesWithGeneric=20
         "Returns reference types for all classes currently loaded by the "
-	"target VM.  "
+        "target VM.  "
         "Both the JNI signature and the generic signature are "
         "returned for each class.  "
-	"Generic signatures are described in the signature attribute "
+        "Generic signatures are described in the signature attribute "
         "section in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
         "Since JDWP version 1.5."
-	(Out 
+        (Out
         )
-        (Reply 
-            (Repeat classes "Number of reference types that follow." 
+        (Reply
+            (Repeat classes "Number of reference types that follow."
                 (Group ClassInfo
                     (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
-		                      "of following reference type. ")
+                                      "of following reference type. ")
                     (referenceTypeID typeID "Loaded reference type")
-                    (string signature 
+                    (string signature
                                 "The JNI signature of the loaded reference type.")
-                    (string genericSignature 
+                    (string genericSignature
                                 "The generic signature of the loaded reference type "
                                 "or an empty string if there is none.")
                     (int status "The current class "
-		                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
+                                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
                 )
             )
         )
@@ -544,7 +544,7 @@
             (Error VM_DEAD)
         )
     )
-    
+
     (Command InstanceCounts=21
         "Returns the number of instances of each reference type in the input list. "
         "Only instances that are reachable for the purposes of "
@@ -574,18 +574,18 @@
 (CommandSet ReferenceType=2
     (Command Signature=1
         "Returns the JNI signature of a reference type. "
-	"JNI signature formats are described in the "
-	"<a href=\"http://java.sun.com/products/jdk/1.2/docs/guide/jni/index.html\">Java Native Inteface Specification</a>"
-	"<p>
-	"For primitive classes "
-	"the returned signature is the signature of the corresponding primitive "
-	"type; for example, \"I\" is returned as the signature of the class "
-	"represented by java.lang.Integer.TYPE."
-	(Out
+        "JNI signature formats are described in the "
+        "<a href=\"http://java.sun.com/products/jdk/1.2/docs/guide/jni/index.html\">Java Native Inteface Specification</a>"
+        "<p>
+        "For primitive classes "
+        "the returned signature is the signature of the corresponding primitive "
+        "type; for example, \"I\" is returned as the signature of the class "
+        "represented by java.lang.Integer.TYPE."
+        (Out
             (referenceType refType "The reference type ID.")
         )
         (Reply
-            (string signature 
+            (string signature
                 "The JNI signature for the reference type.")
         )
         (ErrorSet
@@ -598,7 +598,7 @@
     (Command ClassLoader=2
         "Returns the instance of java.lang.ClassLoader which loaded "
         "a given reference type. If the reference type was loaded by the "
-	"system class loader, the returned object ID is null."
+        "system class loader, the returned object ID is null."
         (Out
             (referenceType refType "The reference type ID.")
         )
@@ -614,16 +614,16 @@
     )
     (Command Modifiers=3
         "Returns the modifiers (also known as access flags) for a reference type. "
-	"The returned bit mask contains information on the declaration "
-	"of the reference type. If the reference type is an array or " 
-	"a primitive class (for example, java.lang.Integer.TYPE), the "
-	"value of the returned bit mask is undefined."
+        "The returned bit mask contains information on the declaration "
+        "of the reference type. If the reference type is an array or "
+        "a primitive class (for example, java.lang.Integer.TYPE), the "
+        "value of the returned bit mask is undefined."
         (Out
             (referenceType refType "The reference type ID.")
         )
         (Reply
             (int modBits "Modifier bits as defined in Chapter 4 of "
-	                 "<cite>The Java&trade; Virtual Machine Specification</cite>")
+                         "<cite>The Java&trade; Virtual Machine Specification</cite>")
         )
         (ErrorSet
             (Error INVALID_CLASS     "refType is not the ID of a reference "
@@ -635,8 +635,8 @@
     (Command Fields=4
         "Returns information for each field in a reference type. "
         "Inherited fields are not included. "
-	"The field list will include any synthetic fields created "
-	"by the compiler. "
+        "The field list will include any synthetic fields created "
+        "by the compiler. "
         "Fields are returned in the order they occur in the class file."
         (Out
             (referenceType refType "The reference type ID.")
@@ -648,13 +648,13 @@
                     (string name "Name of field.")
                     (string signature "JNI Signature of field.")
                     (int modBits "The modifier bit flags (also known as access flags) "
-		                 "which provide additional information on the  "
+                                 "which provide additional information on the  "
                                  "field declaration. Individual flag values are "
-				 "defined in Chapter 4 of "
- 	                         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
-				 "In addition, The <code>0xf0000000</code> bit identifies "
-				 "the field as synthetic, if the synthetic attribute "
-				 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
+                                 "defined in Chapter 4 of "
+                                 "<cite>The Java&trade; Virtual Machine Specification</cite>. "
+                                 "In addition, The <code>0xf0000000</code> bit identifies "
+                                 "the field as synthetic, if the synthetic attribute "
+                                 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
                 )
             )
         )
@@ -669,9 +669,9 @@
     (Command Methods=5
         "Returns information for each method in a reference type. "
         "Inherited methods are not included. The list of methods will "
-	"include constructors (identified with the name \"&lt;init&gt;\"), "
-	"the initialization method (identified with the name \"&lt;clinit&gt;\") "
-	"if present, and any synthetic methods created by the compiler. "
+        "include constructors (identified with the name \"&lt;init&gt;\"), "
+        "the initialization method (identified with the name \"&lt;clinit&gt;\") "
+        "if present, and any synthetic methods created by the compiler. "
         "Methods are returned in the order they occur in the class file."
         (Out
             (referenceType refType "The reference type ID.")
@@ -683,13 +683,13 @@
                     (string name "Name of method.")
                     (string signature "JNI signature of method.")
                     (int modBits "The modifier bit flags (also known as access flags) "
-		                 "which provide additional information on the  "
+                                 "which provide additional information on the  "
                                  "method declaration. Individual flag values are "
-				 "defined in Chapter 4 of "
- 	                         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
-				 "In addition, The <code>0xf0000000</code> bit identifies "
-				 "the method as synthetic, if the synthetic attribute "
-				 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
+                                 "defined in Chapter 4 of "
+                                 "<cite>The Java&trade; Virtual Machine Specification</cite>. "
+                                 "In addition, The <code>0xf0000000</code> bit identifies "
+                                 "the method as synthetic, if the synthetic attribute "
+                                 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
                 )
             )
         )
@@ -703,13 +703,13 @@
     )
     (Command GetValues=6
         "Returns the value of one or more static fields of the "
-	"reference type. Each field must be member of the reference type "
-	"or one of its superclasses, superinterfaces, or implemented interfaces. "
-	"Access control is not enforced; for example, the values of private "
-	"fields can be obtained."
+        "reference type. Each field must be member of the reference type "
+        "or one of its superclasses, superinterfaces, or implemented interfaces. "
+        "Access control is not enforced; for example, the values of private "
+        "fields can be obtained."
         (Out
             (referenceType refType "The reference type ID.")
-            (Repeat fields "The number of values to get"	    	    
+            (Repeat fields "The number of values to get"
                 (Group Field
                     (field fieldID "A field to get")
                 )
@@ -717,7 +717,7 @@
         )
         (Reply
             (Repeat values "The number of values returned, always equal to fields, "
-	    		   "the number of values to get."	    
+                           "the number of values to get."
                 (value value "The field value")
             )
         )
@@ -731,19 +731,19 @@
     )
     (Command SourceFile=7
         "Returns the name of source file in which a reference type was "
-	"declared. "
+        "declared. "
         (Out
             (referenceType refType "The reference type ID.")
         )
         (Reply
             (string sourceFile "The source file name. No path information "
-	                       "for the file is included")
+                               "for the file is included")
         )
-        (ErrorSet	    
+        (ErrorSet
             (Error INVALID_CLASS     "refType is not the ID of a reference "
                                      "type.")
             (Error INVALID_OBJECT    "refType is not a known ID.")
-	    (Error ABSENT_INFORMATION	"The source file attribute is absent.")	    
+            (Error ABSENT_INFORMATION "The source file attribute is absent.")
             (Error VM_DEAD)
         )
     )
@@ -757,7 +757,7 @@
             (Repeat classes "The number of nested classes and interfaces"
                 (Group TypeInfo
                     (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
-		                      "of following reference type. ")
+                                      "of following reference type. ")
                     (referenceTypeID typeID "The nested class or interface ID.")
                 )
             )
@@ -771,15 +771,15 @@
     )
     (Command Status=9
         "Returns the current status of the reference type. The status "
-	"indicates the extent to which the reference type has been "
-	"initialized, as described in section 2.1.6 of "
-	"<cite>The Java&trade; Virtual Machine Specification</cite>. "
-	"If the class is linked the PREPARED and VERIFIED bits in the returned status bits "
-	"will be set. If the class is initialized the INITIALIZED bit in the returned "
-	"status bits will be set. If an error occured during initialization then the "
-	"ERROR bit in the returned status bits will be set. "	
-	"The returned status bits are undefined for array types and for "
-	"primitive classes (such as java.lang.Integer.TYPE). "		
+        "indicates the extent to which the reference type has been "
+        "initialized, as described in section 2.1.6 of "
+        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
+        "If the class is linked the PREPARED and VERIFIED bits in the returned status bits "
+        "will be set. If the class is initialized the INITIALIZED bit in the returned "
+        "status bits will be set. If an error occured during initialization then the "
+        "ERROR bit in the returned status bits will be set. "
+        "The returned status bits are undefined for array types and for "
+        "primitive classes (such as java.lang.Integer.TYPE). "
         (Out
             (referenceType refType "The reference type ID.")
         )
@@ -831,7 +831,7 @@
     (Command SourceDebugExtension=12
         "Returns the value of the SourceDebugExtension attribute. "
         "Since JDWP version 1.4. Requires canGetSourceDebugExtension capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (referenceType refType "The reference type ID.")
         )
@@ -850,18 +850,18 @@
     (Command SignatureWithGeneric=13
         "Returns the JNI signature of a reference type along with the "
         "generic signature if there is one.  "
-	"Generic signatures are described in the signature attribute "
+        "Generic signatures are described in the signature attribute "
         "section in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
         "Since JDWP version 1.5."
-	"<p>
-	(Out
+        "<p>
+        (Out
             (referenceType refType "The reference type ID.")
         )
         (Reply
-            (string signature 
+            (string signature
                 "The JNI signature for the reference type.")
-            (string genericSignature 
+            (string genericSignature
                 "The generic signature for the reference type or an empty "
                 "string if there is none.")
         )
@@ -876,10 +876,10 @@
         "Returns information, including the generic signature if any, "
         "for each field in a reference type. "
         "Inherited fields are not included. "
-	"The field list will include any synthetic fields created "
-	"by the compiler. "
+        "The field list will include any synthetic fields created "
+        "by the compiler. "
         "Fields are returned in the order they occur in the class file.  "
-	"Generic signatures are described in the signature attribute "
+        "Generic signatures are described in the signature attribute "
         "section in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
         "Since JDWP version 1.5."
@@ -895,13 +895,13 @@
                     (string genericSignature "The generic signature of the "
                                              "field, or an empty string if there is none.")
                     (int modBits "The modifier bit flags (also known as access flags) "
-		                 "which provide additional information on the  "
+                                 "which provide additional information on the  "
                                  "field declaration. Individual flag values are "
-				 "defined in Chapter 4 of "
- 	                         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
-				 "In addition, The <code>0xf0000000</code> bit identifies "
-				 "the field as synthetic, if the synthetic attribute "
-				 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
+                                 "defined in Chapter 4 of "
+                                 "<cite>The Java&trade; Virtual Machine Specification</cite>. "
+                                 "In addition, The <code>0xf0000000</code> bit identifies "
+                                 "the field as synthetic, if the synthetic attribute "
+                                 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
                 )
             )
         )
@@ -917,11 +917,11 @@
         "Returns information, including the generic signature if any, "
         "for each method in a reference type. "
         "Inherited methodss are not included. The list of methods will "
-	"include constructors (identified with the name \"&lt;init&gt;\"), "
-	"the initialization method (identified with the name \"&lt;clinit&gt;\") "
-	"if present, and any synthetic methods created by the compiler. "
+        "include constructors (identified with the name \"&lt;init&gt;\"), "
+        "the initialization method (identified with the name \"&lt;clinit&gt;\") "
+        "if present, and any synthetic methods created by the compiler. "
         "Methods are returned in the order they occur in the class file.  "
-	"Generic signatures are described in the signature attribute "
+        "Generic signatures are described in the signature attribute "
         "section in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
         "Since JDWP version 1.5."
@@ -937,13 +937,13 @@
                     (string genericSignature "The generic signature of the method, or "
                                              "an empty string if there is none.")
                     (int modBits "The modifier bit flags (also known as access flags) "
-		                 "which provide additional information on the  "
+                                 "which provide additional information on the  "
                                  "method declaration. Individual flag values are "
-				 "defined in Chapter 4 of "
- 	                         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
-				 "In addition, The <code>0xf0000000</code> bit identifies "
-				 "the method as synthetic, if the synthetic attribute "
-				 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
+                                 "defined in Chapter 4 of "
+                                 "<cite>The Java&trade; Virtual Machine Specification</cite>. "
+                                 "In addition, The <code>0xf0000000</code> bit identifies "
+                                 "the method as synthetic, if the synthetic attribute "
+                                 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
                 )
             )
         )
@@ -956,16 +956,16 @@
         )
     )
     (Command Instances=16
-        "Returns instances of this reference type. " 
+        "Returns instances of this reference type. "
         "Only instances that are reachable for the purposes of "
         "garbage collection are returned. "
         "<p>Since JDWP version 1.6. Requires canGetInstanceInfo capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (referenceType refType "The reference type ID.")
             (int maxInstances "Maximum number of instances to return.  Must be non-negative. "
                               "If zero, all instances are returned.")
-        )       
+        )
         (Reply
             (Repeat instances "The number of instances that follow."
                  (tagged-object instance "An instance of this reference type.")
@@ -981,22 +981,22 @@
         )
     )
     (Command ClassFileVersion=17
-	"Returns the class file major and minor version numbers, as defined in the class "
+        "Returns the class file major and minor version numbers, as defined in the class "
         "file format of the Java Virtual Machine specification. "
          "<p>Since JDWP version 1.6. "
         (Out
             (referenceType refType "The class.")
         )
         (Reply
-	    (int majorVersion "Major version number")
-	    (int minorVersion "Minor version number")		
+            (int majorVersion "Major version number")
+            (int minorVersion "Minor version number")
         )
         (ErrorSet
             (Error INVALID_CLASS     "refType is not the ID of a reference "
                                      "type.")
             (Error INVALID_OBJECT    "refType is not a known ID.")
-	    (Error ABSENT_INFORMATION "The class file version information is "
-				      "absent for primitive and array types.")	    
+            (Error ABSENT_INFORMATION "The class file version information is "
+                                      "absent for primitive and array types.")
             (Error VM_DEAD)
         )
     )
@@ -1005,7 +1005,7 @@
         "constant_pool item of the Class File Format in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
         "<p>Since JDWP version 1.6. Requires canGetConstantPool capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>.""
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>.""
         (Out
             (referenceType refType "The class.")
         )
@@ -1024,8 +1024,8 @@
             (Error INVALID_OBJECT    "refType is not a known ID.")
             (Error NOT_IMPLEMENTED   "If the target virtual machine does not "
                                      "support the retrieval of constant pool information.")
-	    (Error ABSENT_INFORMATION "The Constant Pool information is "
-			              "absent for primitive and array types.")	    
+            (Error ABSENT_INFORMATION "The Constant Pool information is "
+                                      "absent for primitive and array types.")
             (Error VM_DEAD)
         )
     )
@@ -1037,7 +1037,7 @@
             (classType clazz "The class type ID.")
         )
         (Reply
-            (classType superclass 
+            (classType superclass
                 "The superclass (null if the class ID for java.lang.Object is specified).")
         )
         (ErrorSet
@@ -1048,14 +1048,14 @@
     )
     (Command SetValues=2
         "Sets the value of one or more static fields. "
-	"Each field must be member of the class type "
-	"or one of its superclasses, superinterfaces, or implemented interfaces. "
-	"Access control is not enforced; for example, the values of private "
-	"fields can be set. Final fields cannot be set."
-	"For primitive values, the value's type must match the "
-	"field's type exactly. For object values, there must exist a "
-	"widening reference conversion from the value's type to the 
-	"field's type and the field's type must be loaded. "
+        "Each field must be member of the class type "
+        "or one of its superclasses, superinterfaces, or implemented interfaces. "
+        "Access control is not enforced; for example, the values of private "
+        "fields can be set. Final fields cannot be set."
+        "For primitive values, the value's type must match the "
+        "field's type exactly. For object values, there must exist a "
+        "widening reference conversion from the value's type to the
+        "field's type and the field's type must be loaded. "
         (Out
             (classType clazz "The class type ID.")
             (Repeat values "The number of fields to set."
@@ -1074,36 +1074,36 @@
                                      "object field is not a known ID.")
             (Error INVALID_FIELDID)
             (Error VM_DEAD)
-        ) 
+        )
     )
     (Command InvokeMethod=3
         "Invokes a static method. "
-	"The method must be member of the class type "
-	"or one of its superclasses, superinterfaces, or implemented interfaces. "
-	"Access control is not enforced; for example, private "
-	"methods can be invoked."
-	"<p>"
-	"The method invocation will occur in the specified thread. "
-	"Method invocation can occur only if the specified thread "
-	"has been suspended by an event. "
-	"Method invocation is not supported "
-	"when the target VM has been suspended by the front-end. "
-	"<p>"
-	"The specified method is invoked with the arguments in the specified "
-	"argument list. "
-	"The method invocation is synchronous; the reply packet is not "
-	"sent until the invoked method returns in the target VM. "
-	"The return value (possibly the void value) is "
-	"included in the reply packet. "
-	"If the invoked method throws an exception, the "
-	"exception object ID is set in the reply packet; otherwise, the "
-	"exception object ID is null. "
-	"<p>"
-	"For primitive arguments, the argument value's type must match the "
-	"argument's type exactly. For object arguments, there must exist a "
-	"widening reference conversion from the argument value's type to the "
-	"argument's type and the argument's type must be loaded. "
-	"<p>"
+        "The method must be member of the class type "
+        "or one of its superclasses, superinterfaces, or implemented interfaces. "
+        "Access control is not enforced; for example, private "
+        "methods can be invoked."
+        "<p>"
+        "The method invocation will occur in the specified thread. "
+        "Method invocation can occur only if the specified thread "
+        "has been suspended by an event. "
+        "Method invocation is not supported "
+        "when the target VM has been suspended by the front-end. "
+        "<p>"
+        "The specified method is invoked with the arguments in the specified "
+        "argument list. "
+        "The method invocation is synchronous; the reply packet is not "
+        "sent until the invoked method returns in the target VM. "
+        "The return value (possibly the void value) is "
+        "included in the reply packet. "
+        "If the invoked method throws an exception, the "
+        "exception object ID is set in the reply packet; otherwise, the "
+        "exception object ID is null. "
+        "<p>"
+        "For primitive arguments, the argument value's type must match the "
+        "argument's type exactly. For object arguments, there must exist a "
+        "widening reference conversion from the argument value's type to the "
+        "argument's type and the argument's type must be loaded. "
+        "<p>"
         "By default, all threads in the target VM are resumed while "
         "the method is being invoked if they were previously "
         "suspended by an event or by command. "
@@ -1114,28 +1114,28 @@
         "Note, however, that this implicit resume acts exactly like "
         "the ThreadReference resume command, so if the thread's suspend "
         "count is greater than 1, it will remain in a suspended state "
-	"during the invocation. By default, when the invocation completes, "
-	"all threads in the target VM are suspended, regardless their state "
-	"before the invocation. "
+        "during the invocation. By default, when the invocation completes, "
+        "all threads in the target VM are suspended, regardless their state "
+        "before the invocation. "
         "<p>"
         "The resumption of other threads during the invoke can be prevented "
         "by specifying the INVOKE_SINGLE_THREADED "
         "bit flag in the <code>options</code> field; however, "
         "there is no protection against or recovery from the deadlocks "
         "described above, so this option should be used with great caution. "
-	"Only the specified thread will be resumed (as described for all "
-	"threads above). Upon completion of a single threaded invoke, the invoking thread "
-	"will be suspended once again. Note that any threads started during "
-	"the single threaded invocation will not be suspended when the "
-	"invocation completes. "
-	"<p>"
+        "Only the specified thread will be resumed (as described for all "
+        "threads above). Upon completion of a single threaded invoke, the invoking thread "
+        "will be suspended once again. Note that any threads started during "
+        "the single threaded invocation will not be suspended when the "
+        "invocation completes. "
+        "<p>"
         "If the target VM is disconnected during the invoke (for example, through "
         "the VirtualMachine dispose command) the method invocation continues. "
         (Out
             (classType clazz "The class type ID.")
             (threadObject thread "The thread in which to invoke.")
             (method methodID "The method to invoke.")
-            (Repeat arguments 
+            (Repeat arguments
                 (value arg "The argument value.")
             )
             (int options "Invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
@@ -1155,30 +1155,30 @@
     )
     (Command NewInstance=4
         "Creates a new object of this type, invoking the specified "
-	"constructor. The constructor method ID must be a member of "
-	"the class type."
-	"<p>"
-	"Instance creation will occur in the specified thread. "
-	"Instance creation can occur only if the specified thread "
-	"has been suspended by an event. "
-	"Method invocation is not supported "
-	"when the target VM has been suspended by the front-end. "
-	"<p>"
-	"The specified constructor is invoked with the arguments in the specified "
-	"argument list. "
-	"The constructor invocation is synchronous; the reply packet is not "
-	"sent until the invoked method returns in the target VM. "
-	"The return value (possibly the void value) is "
-	"included in the reply packet. "
-	"If the constructor throws an exception, the "
-	"exception object ID is set in the reply packet; otherwise, the "
-	"exception object ID is null. "
-	"<p>"
-	"For primitive arguments, the argument value's type must match the "
-	"argument's type exactly. For object arguments, there must exist a "
-	"widening reference conversion from the argument value's type to the "
-	"argument's type and the argument's type must be loaded. "
-	"<p>"
+        "constructor. The constructor method ID must be a member of "
+        "the class type."
+        "<p>"
+        "Instance creation will occur in the specified thread. "
+        "Instance creation can occur only if the specified thread "
+        "has been suspended by an event. "
+        "Method invocation is not supported "
+        "when the target VM has been suspended by the front-end. "
+        "<p>"
+        "The specified constructor is invoked with the arguments in the specified "
+        "argument list. "
+        "The constructor invocation is synchronous; the reply packet is not "
+        "sent until the invoked method returns in the target VM. "
+        "The return value (possibly the void value) is "
+        "included in the reply packet. "
+        "If the constructor throws an exception, the "
+        "exception object ID is set in the reply packet; otherwise, the "
+        "exception object ID is null. "
+        "<p>"
+        "For primitive arguments, the argument value's type must match the "
+        "argument's type exactly. For object arguments, there must exist a "
+        "widening reference conversion from the argument value's type to the "
+        "argument's type and the argument's type must be loaded. "
+        "<p>"
         "By default, all threads in the target VM are resumed while "
         "the method is being invoked if they were previously "
         "suspended by an event or by command. "
@@ -1189,20 +1189,20 @@
         "Note, however, that this implicit resume acts exactly like "
         "the ThreadReference resume command, so if the thread's suspend "
         "count is greater than 1, it will remain in a suspended state "
-	"during the invocation. By default, when the invocation completes, "
-	"all threads in the target VM are suspended, regardless their state "
-	"before the invocation. "
+        "during the invocation. By default, when the invocation completes, "
+        "all threads in the target VM are suspended, regardless their state "
+        "before the invocation. "
         "<p>"
         "The resumption of other threads during the invoke can be prevented "
         "by specifying the INVOKE_SINGLE_THREADED "
         "bit flag in the <code>options</code> field; however, "
         "there is no protection against or recovery from the deadlocks "
         "described above, so this option should be used with great caution. "
-	"Only the specified thread will be resumed (as described for all "
-	"threads above). Upon completion of a single threaded invoke, the invoking thread "
-	"will be suspended once again. Note that any threads started during "
-	"the single threaded invocation will not be suspended when the "
-	"invocation completes. "
+        "Only the specified thread will be resumed (as described for all "
+        "threads above). Upon completion of a single threaded invoke, the invoking thread "
+        "will be suspended once again. Note that any threads started during "
+        "the single threaded invocation will not be suspended when the "
+        "invocation completes. "
         "<p>"
         "If the target VM is disconnected during the invoke (for example, through "
         "the VirtualMachine dispose command) the method invocation continues. "
@@ -1210,14 +1210,14 @@
             (classType clazz "The class type ID.")
             (threadObject thread "The thread in which to invoke the constructor.")
             (method methodID "The constructor to invoke.")
-            (Repeat arguments 
+            (Repeat arguments
                 (value arg "The argument value.")
             )
             (int options "Constructor invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
         )
         (Reply
             (tagged-object newObject "The newly created object, or null "
-	                             "if the constructor threw an exception.")
+                                     "if the constructor threw an exception.")
             (tagged-object exception "The thrown exception, if any; otherwise, null.")
         )
         (ErrorSet
@@ -1239,8 +1239,8 @@
             (arrayType arrType "The array type of the new instance.")
             (int length "The length of the array.")
         )
-        (Reply  
-	    (tagged-object newArray "The newly created array object. ")
+        (Reply
+            (tagged-object newArray "The newly created array object. ")
         )
         (ErrorSet
             (Error INVALID_ARRAY)
@@ -1254,11 +1254,11 @@
 (CommandSet Method=6
     (Command LineTable=1
         "Returns line number information for the method, if present. "
-	"The line table maps source line numbers to the initial code index "
-	"of the line. The line table "
-	"is ordered by code index (from lowest to highest). The line number " 
-	"information is constant unless a new class definition is installed "
-	"using <a href=\"#JDWP_VirtualMachine_RedefineClasses\">RedefineClasses</a>."	
+        "The line table maps source line numbers to the initial code index "
+        "of the line. The line table "
+        "is ordered by code index (from lowest to highest). The line number "
+        "information is constant unless a new class definition is installed "
+        "using <a href=\"#JDWP_VirtualMachine_RedefineClasses\">RedefineClasses</a>."
         (Out
             (referenceType refType "The class.")
             (method methodID "The method.")
@@ -1269,7 +1269,7 @@
             (Repeat lines "The number of entries in the line table for this method."
                 (Group LineInfo
                     (long lineCodeIndex "Initial code index of the line, "
-		    			"start <= lineCodeIndex < end")
+                                        "start <= lineCodeIndex < end")
                     (int lineNumber "Line number.")
                 )
             )
@@ -1284,9 +1284,9 @@
     )
     (Command VariableTable=2
         "Returns variable information for the method. The variable table "
-	"includes arguments and locals declared within the method. For "
-	"instance methods, the \"this\" reference is included in the "
-	"table. Also, synthetic variables may be present. "
+        "includes arguments and locals declared within the method. For "
+        "instance methods, the \"this\" reference is included in the "
+        "table. Also, synthetic variables may be present. "
         (Out
             (referenceType refType "The class.")
             (method methodID "The method.")
@@ -1297,16 +1297,16 @@
             (Repeat slots "The number of variables."
                 (Group SlotInfo "Information about the variable."
                     (long codeIndex
-		        "First code index at which the variable is visible (unsigned). "
-		        "Used in conjunction with <code>length</code>. "
-		        "The variable can be get or set only when the current "
-			"<code>codeIndex</code> <= current frame code index < <code>codeIndex + length</code> ")
+                        "First code index at which the variable is visible (unsigned). "
+                        "Used in conjunction with <code>length</code>. "
+                        "The variable can be get or set only when the current "
+                        "<code>codeIndex</code> <= current frame code index < <code>codeIndex + length</code> ")
                     (string name "The variable's name.")
                     (string signature "The variable type's JNI signature.")
-                    (int length 
-		        "Unsigned value used in conjunction with <code>codeIndex</code>. "
-		        "The variable can be get or set only when the current "
-			"<code>codeIndex</code> <= current frame code index < <code>code index + length</code> ")
+                    (int length
+                        "Unsigned value used in conjunction with <code>codeIndex</code>. "
+                        "The variable can be get or set only when the current "
+                        "<code>codeIndex</code> <= current frame code index < <code>code index + length</code> ")
                     (int slot "The local variable's index in its frame")
                 )
             )
@@ -1323,8 +1323,8 @@
     (Command Bytecodes=3
         "Retrieve the method's bytecodes as defined in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
-	"Requires canGetBytecodes capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "Requires canGetBytecodes capability - see "
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (referenceType refType "The class.")
             (method methodID "The method.")
@@ -1346,11 +1346,11 @@
     )
     (Command IsObsolete=4
         "Determine if this method is obsolete. A method is obsolete if it has been replaced "
-	"by a non-equivalent method using the "
-	"<a href=\"#JDWP_VirtualMachine_RedefineClasses\">RedefineClasses</a> command. "
-	"The original and redefined methods are considered equivalent if their bytecodes are "
-	"the same except for indices into the constant pool and the referenced constants are "
-	"equal."
+        "by a non-equivalent method using the "
+        "<a href=\"#JDWP_VirtualMachine_RedefineClasses\">RedefineClasses</a> command. "
+        "The original and redefined methods are considered equivalent if their bytecodes are "
+        "the same except for indices into the constant pool and the referenced constants are "
+        "equal."
         (Out
             (referenceType refType "The class.")
             (method methodID "The method.")
@@ -1358,7 +1358,7 @@
         (Reply
             (boolean isObsolete    "true if this method has been replaced"
                                    "by a non-equivalent method using"
-				   "the RedefineClasses command.") 
+                                   "the RedefineClasses command.")
         )
         (ErrorSet
             (Error INVALID_CLASS     "refType is not the ID of a reference "
@@ -1373,10 +1373,10 @@
     (Command VariableTableWithGeneric=5
         "Returns variable information for the method, including "
         "generic signatures for the variables. The variable table "
-	"includes arguments and locals declared within the method. For "
-	"instance methods, the \"this\" reference is included in the "
-	"table. Also, synthetic variables may be present. "
-	"Generic signatures are described in the signature attribute "
+        "includes arguments and locals declared within the method. For "
+        "instance methods, the \"this\" reference is included in the "
+        "table. Also, synthetic variables may be present. "
+        "Generic signatures are described in the signature attribute "
         "section in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>. "
         "Since JDWP version 1.5."
@@ -1390,18 +1390,18 @@
             (Repeat slots "The number of variables."
                 (Group SlotInfo "Information about the variable."
                     (long codeIndex
-		        "First code index at which the variable is visible (unsigned). "
-		        "Used in conjunction with <code>length</code>. "
-		        "The variable can be get or set only when the current "
-			"<code>codeIndex</code> <= current frame code index < <code>codeIndex + length</code> ")
+                        "First code index at which the variable is visible (unsigned). "
+                        "Used in conjunction with <code>length</code>. "
+                        "The variable can be get or set only when the current "
+                        "<code>codeIndex</code> <= current frame code index < <code>codeIndex + length</code> ")
                     (string name "The variable's name.")
                     (string signature "The variable type's JNI signature.")
                     (string genericSignature "The variable type's generic "
                          "signature or an empty string if there is none.")
-                    (int length 
-		        "Unsigned value used in conjunction with <code>codeIndex</code>. "
-		        "The variable can be get or set only when the current "
-			"<code>codeIndex</code> <= current frame code index < <code>code index + length</code> ")
+                    (int length
+                        "Unsigned value used in conjunction with <code>codeIndex</code>. "
+                        "The variable can be get or set only when the current "
+                        "<code>codeIndex</code> <= current frame code index < <code>code index + length</code> ")
                     (int slot "The local variable's index in its frame")
                 )
             )
@@ -1416,7 +1416,7 @@
         )
     )
 
-) 
+)
 (CommandSet Field=8
 )
 (CommandSet ObjectReference=9
@@ -1427,8 +1427,8 @@
             (object object "The object ID")
         )
         (Reply
-	    (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
-			      "of following reference type. ")
+            (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
+                              "of following reference type. ")
             (referenceTypeID typeID "The runtime reference type.")
         )
         (ErrorSet
@@ -1438,10 +1438,10 @@
     )
     (Command GetValues=2
         "Returns the value of one or more instance fields. "
-	"Each field must be member of the object's type "
-	"or one of its superclasses, superinterfaces, or implemented interfaces. "
-	"Access control is not enforced; for example, the values of private "
-	"fields can be obtained."
+        "Each field must be member of the object's type "
+        "or one of its superclasses, superinterfaces, or implemented interfaces. "
+        "Access control is not enforced; for example, the values of private "
+        "fields can be obtained."
         (Out
             (object object "The object ID")
             (Repeat fields "The number of values to get"
@@ -1452,9 +1452,9 @@
         )
         (Reply
             (Repeat values "The number of values returned, always equal to 'fields', "
-	    		   "the number of values to get. Field values are ordered "
-			   "in the reply in the same order as corresponding fieldIDs "
- 			   "in the command."
+                           "the number of values to get. Field values are ordered "
+                           "in the reply in the same order as corresponding fieldIDs "
+                           "in the command."
                 (value value "The field value")
             )
         )
@@ -1466,14 +1466,14 @@
     )
     (Command SetValues=3
         "Sets the value of one or more instance fields. "
-	"Each field must be member of the object's type "
-	"or one of its superclasses, superinterfaces, or implemented interfaces. "
-	"Access control is not enforced; for example, the values of private "
-	"fields can be set. "
-	"For primitive values, the value's type must match the "
-	"field's type exactly. For object values, there must be a "
-	"widening reference conversion from the value's type to the 
-	"field's type and the field's type must be loaded. "
+        "Each field must be member of the object's type "
+        "or one of its superclasses, superinterfaces, or implemented interfaces. "
+        "Access control is not enforced; for example, the values of private "
+        "fields can be set. "
+        "For primitive values, the value's type must match the "
+        "field's type exactly. For object values, there must be a "
+        "widening reference conversion from the value's type to the
+        "field's type and the field's type must be loaded. "
         (Out
             (object object "The object ID")
             (Repeat values "The number of fields to set."
@@ -1489,13 +1489,13 @@
             (Error INVALID_OBJECT)
             (Error INVALID_FIELDID)
             (Error VM_DEAD)
-        ) 
+        )
     )
     (Command MonitorInfo=5
         "Returns monitor information for an object. All threads int the VM must "
-	"be suspended."
-	"Requires canGetMonitorInfo capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "be suspended."
+        "Requires canGetMonitorInfo capability - see "
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (object object "The object ID")
         )
@@ -1503,7 +1503,7 @@
             (threadObject owner "The monitor owner, or null if it is not currently owned.")
             (int entryCount "The number of times the monitor has been entered.")
             (Repeat waiters "The number of threads that are waiting for the monitor "
-	                    "0 if there is no current owner"
+                            "0 if there is no current owner"
                 (threadObject thread "A thread waiting for this monitor.")
             )
         )
@@ -1515,32 +1515,32 @@
     )
     (Command InvokeMethod=6
         "Invokes a instance method. "
-	"The method must be member of the object's type "
-	"or one of its superclasses, superinterfaces, or implemented interfaces. "
-	"Access control is not enforced; for example, private "
-	"methods can be invoked."
-	"<p>"
-	"The method invocation will occur in the specified thread. "
-	"Method invocation can occur only if the specified thread "
-	"has been suspended by an event. "
-	"Method invocation is not supported "
-	"when the target VM has been suspended by the front-end. "
-	"<p>"
-	"The specified method is invoked with the arguments in the specified "
-	"argument list. "
-	"The method invocation is synchronous; the reply packet is not "
-	"sent until the invoked method returns in the target VM. "
-	"The return value (possibly the void value) is "
-	"included in the reply packet. "
-	"If the invoked method throws an exception, the "
-	"exception object ID is set in the reply packet; otherwise, the "
-	"exception object ID is null. "
-	"<p>"
-	"For primitive arguments, the argument value's type must match the "
-	"argument's type exactly. For object arguments, there must be a "
-	"widening reference conversion from the argument value's type to the "
-	"argument's type and the argument's type must be loaded. "
-	"<p>"
+        "The method must be member of the object's type "
+        "or one of its superclasses, superinterfaces, or implemented interfaces. "
+        "Access control is not enforced; for example, private "
+        "methods can be invoked."
+        "<p>"
+        "The method invocation will occur in the specified thread. "
+        "Method invocation can occur only if the specified thread "
+        "has been suspended by an event. "
+        "Method invocation is not supported "
+        "when the target VM has been suspended by the front-end. "
+        "<p>"
+        "The specified method is invoked with the arguments in the specified "
+        "argument list. "
+        "The method invocation is synchronous; the reply packet is not "
+        "sent until the invoked method returns in the target VM. "
+        "The return value (possibly the void value) is "
+        "included in the reply packet. "
+        "If the invoked method throws an exception, the "
+        "exception object ID is set in the reply packet; otherwise, the "
+        "exception object ID is null. "
+        "<p>"
+        "For primitive arguments, the argument value's type must match the "
+        "argument's type exactly. For object arguments, there must be a "
+        "widening reference conversion from the argument value's type to the "
+        "argument's type and the argument's type must be loaded. "
+        "<p>"
         "By default, all threads in the target VM are resumed while "
         "the method is being invoked if they were previously "
         "suspended by an event or by command. "
@@ -1551,20 +1551,20 @@
         "Note, however, that this implicit resume acts exactly like "
         "the ThreadReference resume command, so if the thread's suspend "
         "count is greater than 1, it will remain in a suspended state "
-	"during the invocation. By default, when the invocation completes, "
-	"all threads in the target VM are suspended, regardless their state "
-	"before the invocation. "
+        "during the invocation. By default, when the invocation completes, "
+        "all threads in the target VM are suspended, regardless their state "
+        "before the invocation. "
         "<p>"
         "The resumption of other threads during the invoke can be prevented "
         "by specifying the INVOKE_SINGLE_THREADED "
         "bit flag in the <code>options</code> field; however, "
         "there is no protection against or recovery from the deadlocks "
         "described above, so this option should be used with great caution. "
-	"Only the specified thread will be resumed (as described for all "
-	"threads above). Upon completion of a single threaded invoke, the invoking thread "
-	"will be suspended once again. Note that any threads started during "
-	"the single threaded invocation will not be suspended when the "
-	"invocation completes. "
+        "Only the specified thread will be resumed (as described for all "
+        "threads above). Upon completion of a single threaded invoke, the invoking thread "
+        "will be suspended once again. Note that any threads started during "
+        "the single threaded invocation will not be suspended when the "
+        "invocation completes. "
         "<p>"
         "If the target VM is disconnected during the invoke (for example, through "
         "the VirtualMachine dispose command) the method invocation continues. "
@@ -1593,29 +1593,29 @@
         )
     )
     (Command DisableCollection=7
-	"Prevents garbage collection for the given object. By "
-	"default all objects in back-end replies may be "
-	"collected at any time the target VM is running. A call to "
-	"this command guarantees that the object will not be "
-	"collected. The "
-	"<a href=\"#JDWP_ObjectReference_EnableCollection\">EnableCollection</a> "
-	"command can be used to "
-	"allow collection once again. "
-	"<p>"
-	"Note that while the target VM is suspended, no garbage "
-	"collection will occur because all threads are suspended. "
-	"The typical examination of variables, fields, and arrays "
-	"during the suspension is safe without explicitly disabling "
-	"garbage collection. "
-	"<p>"
-	"This method should be used sparingly, as it alters the "
-	"pattern of garbage collection in the target VM and, "
-	"consequently, may result in application behavior under the "
-	"debugger that differs from its non-debugged behavior. "
-	(Out 
-	    (object object "The object ID")
-	)
-	(Reply "none"
+        "Prevents garbage collection for the given object. By "
+        "default all objects in back-end replies may be "
+        "collected at any time the target VM is running. A call to "
+        "this command guarantees that the object will not be "
+        "collected. The "
+        "<a href=\"#JDWP_ObjectReference_EnableCollection\">EnableCollection</a> "
+        "command can be used to "
+        "allow collection once again. "
+        "<p>"
+        "Note that while the target VM is suspended, no garbage "
+        "collection will occur because all threads are suspended. "
+        "The typical examination of variables, fields, and arrays "
+        "during the suspension is safe without explicitly disabling "
+        "garbage collection. "
+        "<p>"
+        "This method should be used sparingly, as it alters the "
+        "pattern of garbage collection in the target VM and, "
+        "consequently, may result in application behavior under the "
+        "debugger that differs from its non-debugged behavior. "
+        (Out
+            (object object "The object ID")
+        )
+        (Reply "none"
         )
         (ErrorSet
             (Error INVALID_OBJECT)
@@ -1623,13 +1623,13 @@
         )
     )
     (Command EnableCollection=8
-	"Permits garbage collection for this object. By default all "
-	"objects returned by JDWP may become unreachable in the target VM, "
-	"and hence may be garbage collected. A call to this command is "
-	"necessary only if garbage collection was previously disabled with "
-	"the <a href=\"#JDWP_ObjectReference_DisableCollection\">DisableCollection</a> "
-	"command."
-        (Out 
+        "Permits garbage collection for this object. By default all "
+        "objects returned by JDWP may become unreachable in the target VM, "
+        "and hence may be garbage collected. A call to this command is "
+        "necessary only if garbage collection was previously disabled with "
+        "the <a href=\"#JDWP_ObjectReference_DisableCollection\">DisableCollection</a> "
+        "command."
+        (Out
             (object object "The object ID")
         )
         (Reply "none"
@@ -1640,7 +1640,7 @@
     )
     (Command IsCollected=9
         "Determines whether an object has been garbage collected in the "
-	"target VM. "
+        "target VM. "
         (Out
             (object object "The object ID")
         )
@@ -1660,13 +1660,13 @@
         "such as from a local variable in a stack frame, or from a JNI global "
         "reference.  Such non-object referrers are not returned by this command. "
         "<p>Since JDWP version 1.6. Requires canGetInstanceInfo capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (object object "The object ID")
             (int maxReferrers "Maximum number of referring objects to return. "
                               "Must be non-negative. If zero, all referring "
                               "objects are returned.")
-        )       
+        )
         (Reply
             (Repeat referringObjects "The number of objects that follow."
                 (tagged-object instance "An object that references this object.")
@@ -1714,32 +1714,32 @@
     )
     (Command Suspend=2
         "Suspends the thread. "
-	"<p>"
-	"Unlike java.lang.Thread.suspend(), suspends of both "
-	"the virtual machine and individual threads are counted. Before "
-	"a thread will run again, it must be resumed the same number "
-	"of times it has been suspended. "
-	"<p>"
-	"Suspending single threads with command has the same "
-	"dangers java.lang.Thread.suspend(). If the suspended "
-	"thread holds a monitor needed by another running thread, "
-	"deadlock is possible in the target VM (at least until the "
-	"suspended thread is resumed again). "
-	"<p>"
-	"The suspended thread is guaranteed to remain suspended until "
-	"resumed through one of the JDI resume methods mentioned above; "
-	"the application in the target VM cannot resume the suspended thread "
-	"through {@link java.lang.Thread#resume}. "
-	"<p>"
-	"Note that this doesn't change the status of the thread (see the "
-	"<a href=\"#JDWP_ThreadReference_Status\">ThreadStatus</a> command.) "
-	"For example, if it was "
-	"Running, it will still appear running to other threads. "
-	(Out
-	    (threadObject thread "The thread object ID. ")
-	)
-	(Reply "none"
-	)
+        "<p>"
+        "Unlike java.lang.Thread.suspend(), suspends of both "
+        "the virtual machine and individual threads are counted. Before "
+        "a thread will run again, it must be resumed the same number "
+        "of times it has been suspended. "
+        "<p>"
+        "Suspending single threads with command has the same "
+        "dangers java.lang.Thread.suspend(). If the suspended "
+        "thread holds a monitor needed by another running thread, "
+        "deadlock is possible in the target VM (at least until the "
+        "suspended thread is resumed again). "
+        "<p>"
+        "The suspended thread is guaranteed to remain suspended until "
+        "resumed through one of the JDI resume methods mentioned above; "
+        "the application in the target VM cannot resume the suspended thread "
+        "through {@link java.lang.Thread#resume}. "
+        "<p>"
+        "Note that this doesn't change the status of the thread (see the "
+        "<a href=\"#JDWP_ThreadReference_Status\">ThreadStatus</a> command.) "
+        "For example, if it was "
+        "Running, it will still appear running to other threads. "
+        (Out
+            (threadObject thread "The thread object ID. ")
+        )
+        (Reply "none"
+        )
         (ErrorSet
             (Error INVALID_THREAD)
             (Error INVALID_OBJECT    "thread is not a known ID.")
@@ -1747,12 +1747,12 @@
         )
     )
     (Command Resume=3
-	"Resumes the execution of a given thread. If this thread was "
-	"not previously suspended by the front-end, "
-	"calling this command has no effect. "
-	"Otherwise, the count of pending suspends on this thread is "
-	"decremented. If it is decremented to 0, the thread will "
-	"continue to execute. "
+        "Resumes the execution of a given thread. If this thread was "
+        "not previously suspended by the front-end, "
+        "calling this command has no effect. "
+        "Otherwise, the count of pending suspends on this thread is "
+        "decremented. If it is decremented to 0, the thread will "
+        "continue to execute. "
         (Out
             (threadObject thread "The thread object ID. ")
         )
@@ -1766,13 +1766,13 @@
     )
     (Command Status=4
         "Returns the current status of a thread. The thread status "
-	"reply indicates the thread status the last time it was running. "
-	"the suspend status provides information on the thread's "
-	"suspension, if any."
+        "reply indicates the thread status the last time it was running. "
+        "the suspend status provides information on the thread's "
+        "suspension, if any."
         (Out
             (threadObject thread "The thread object ID. ")
         )
-        (Reply 
+        (Reply
             (int threadStatus "One of the thread status codes "
                     "See <a href=\"#JDWP_ThreadStatus\">JDWP.ThreadStatus</a>")
             (int suspendStatus "One of the suspend status codes "
@@ -1803,11 +1803,11 @@
         "The sequence of frames starts with "
         "the currently executing frame, followed by its caller, "
         "and so on. The thread must be suspended, and the returned "
-	"frameID is valid only while the thread is suspended. "
+        "frameID is valid only while the thread is suspended. "
         (Out
             (threadObject thread "The thread object ID. ")
             (int startFrame "The index of the first frame to retrieve.")
-            (int length 
+            (int length
                         "The count of frames to retrieve "
                         "(-1 means all remaining). ")
         )
@@ -1827,8 +1827,8 @@
     )
     (Command FrameCount=7
         "Returns the count of frames on this thread's stack. "
-	"The thread must be suspended, and the returned "	   	
-	"count is valid only while the thread is suspended. "	
+        "The thread must be suspended, and the returned "
+        "count is valid only while the thread is suspended. "
         "Returns JDWP.Error.errorThreadNotSuspended if not suspended. "
         (Out
             (threadObject thread "The thread object ID. ")
@@ -1844,10 +1844,10 @@
     )
     (Command OwnedMonitors=8
         "Returns the objects whose monitors have been entered by this thread. "
-	"The thread must be suspended, and the returned information is "
-	"relevant only while the thread is suspended. "
-	"Requires canGetOwnedMonitorInfo capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "The thread must be suspended, and the returned information is "
+        "relevant only while the thread is suspended. "
+        "Requires canGetOwnedMonitorInfo capability - see "
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (threadObject thread "The thread object ID. ")
         )
@@ -1865,19 +1865,19 @@
     )
     (Command CurrentContendedMonitor=9
         "Returns the object, if any, for which this thread is waiting. The "
-	"thread may be waiting to enter a monitor, or it may be waiting, via "
-	"the java.lang.Object.wait method, for another thread to invoke the "
-	"notify method. "
-	"The thread must be suspended, and the returned information is "
-	"relevant only while the thread is suspended. "
-	"Requires canGetCurrentContendedMonitor capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "thread may be waiting to enter a monitor, or it may be waiting, via "
+        "the java.lang.Object.wait method, for another thread to invoke the "
+        "notify method. "
+        "The thread must be suspended, and the returned information is "
+        "relevant only while the thread is suspended. "
+        "Requires canGetCurrentContendedMonitor capability - see "
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (threadObject thread "The thread object ID. ")
         )
         (Reply
             (tagged-object monitor "The contended monitor, or null if "
-	                           "there is no current contended monitor. ")
+                                   "there is no current contended monitor. ")
         )
         (ErrorSet
             (Error INVALID_THREAD)
@@ -1888,11 +1888,11 @@
     )
     (Command Stop=10
         "Stops the thread with an asynchronous exception, as if done by "
-	"java.lang.Thread.stop "
+        "java.lang.Thread.stop "
         (Out
             (threadObject thread "The thread object ID. ")
             (object throwable "Asynchronous exception. This object must "
-	                      "be an instance of java.lang.Throwable or a subclass")
+                              "be an instance of java.lang.Throwable or a subclass")
         )
         (Reply "none"
         )
@@ -1918,12 +1918,12 @@
     )
     (Command SuspendCount=12
         "Get the suspend count for this thread. The suspend count is the  "
-	"number of times the thread has been suspended through the "
-	"thread-level or VM-level suspend commands without a corresponding resume "
+        "number of times the thread has been suspended through the "
+        "thread-level or VM-level suspend commands without a corresponding resume "
         (Out
             (threadObject thread "The thread object ID. ")
         )
-        (Reply 
+        (Reply
             (int suspendCount "The number of outstanding suspends of this thread. ")
         )
         (ErrorSet
@@ -1937,20 +1937,20 @@
         "the monitor was acquired. Returns stack depth of -1  if "
         "the implementation cannot determine the stack depth "
         "(e.g., for monitors acquired by JNI MonitorEnter)."
-	"The thread must be suspended, and the returned information is "
-	"relevant only while the thread is suspended. "
-	"Requires canGetMonitorFrameInfo capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
-	"<p>Since JDWP version 1.6. "
+        "The thread must be suspended, and the returned information is "
+        "relevant only while the thread is suspended. "
+        "Requires canGetMonitorFrameInfo capability - see "
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
+        "<p>Since JDWP version 1.6. "
 
         (Out
             (threadObject thread "The thread object ID. ")
         )
         (Reply
             (Repeat owned "The number of owned monitors"
-	       (Group monitor
+               (Group monitor
                   (tagged-object monitor "An owned monitor")
-		  (int stack_depth "Stack depth location where monitor was acquired")
+                  (int stack_depth "Stack depth location where monitor was acquired")
                )
             )
         )
@@ -1964,45 +1964,45 @@
     (Command ForceEarlyReturn=14
         "Force a method to return before it reaches a return "
         "statement.  "
-	"<p>"
+        "<p>"
         "The method which will return early is referred to as the "
         "called method. The called method is the current method (as "
         "defined by the Frames section in "
         "<cite>The Java&trade; Virtual Machine Specification</cite>) "
         "for the specified thread at the time this command "
         "is received. "
-	"<p>"
+        "<p>"
         "The specified thread must be suspended. "
         "The return occurs when execution of Java programming "
         "language code is resumed on this thread. Between sending this "
         "command and resumption of thread execution, the "
         "state of the stack is undefined. "
-	"<p>"
+        "<p>"
         "No further instructions are executed in the called "
         "method. Specifically, finally blocks are not executed. Note: "
         "this can cause inconsistent states in the application. "
-	"<p>"
+        "<p>"
         "A lock acquired by calling the called method (if it is a "
         "synchronized method) and locks acquired by entering "
         "synchronized blocks within the called method are "
         "released. Note: this does not apply to JNI locks or "
         "java.util.concurrent.locks locks. "
-	"<p>"
+        "<p>"
         "Events, such as MethodExit, are generated as they would be in "
         "a normal return. "
-	"<p>"
+        "<p>"
         "The called method must be a non-native Java programming "
         "language method. Forcing return on a thread with only one "
         "frame on the stack causes the thread to exit when resumed. "
-	"<p>"
-        "For void methods, the value must be a void value. " 
+        "<p>"
+        "For void methods, the value must be a void value. "
         "For methods that return primitive values, the value's type must "
         "match the return type exactly.  For object values, there must be a "
-	"widening reference conversion from the value's type to the "
-	"return type type and the return type must be loaded. "
+        "widening reference conversion from the value's type to the "
+        "return type type and the return type must be loaded. "
         "<p>"
         "Since JDWP version 1.6. Requires canForceEarlyReturn capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (threadObject thread "The thread object ID. ")
             (value value "The value to return. ")
@@ -2050,8 +2050,8 @@
         )
         (Reply
             (threadGroupObject parentGroup "The parent thread group object, or "
-	                                   "null if the given thread group "
-					   "is a top-level thread group")
+                                           "null if the given thread group "
+                                           "is a top-level thread group")
         )
         (ErrorSet
             (Error INVALID_THREAD_GROUP)
@@ -2062,7 +2062,7 @@
     (Command Children=3
         "Returns the live threads and active thread groups directly contained "
         "in this thread group. Threads and thread groups in child "
-	"thread groups are not included. "
+        "thread groups are not included. "
         "A thread is alive if it has been started and has not yet been stopped. "
         "See <a href=../../../api/java/lang/ThreadGroup.html>java.lang.ThreadGroup </a>
         "for information about active ThreadGroups.
@@ -2101,7 +2101,7 @@
     )
     (Command GetValues=2
         "Returns a range of array components. The specified range must "
-	"be within the bounds of the array. "
+        "be within the bounds of the array. "
         (Out
             (arrayObject arrayObject "The array object ID. ")
             (int firstIndex "The first index to retrieve.")
@@ -2109,8 +2109,8 @@
         )
         (Reply
             (typed-sequence values "The retrieved values. If the values "
-	                           "are objects, they are tagged-values; "
-				   "otherwise, they are untagged-values")
+                                   "are objects, they are tagged-values; "
+                                   "otherwise, they are untagged-values")
         )
         (ErrorSet
             (Error INVALID_LENGTH "If index is beyond the end of this array.")
@@ -2121,11 +2121,11 @@
     )
     (Command SetValues=3
         "Sets a range of array components. The specified range must "
-	"be within the bounds of the array. "
-	"For primitive values, each value's type must match the "
-	"array component type exactly. For object values, there must be a "
-	"widening reference conversion from the value's type to the 
-	"array component type and the array component type must be loaded. "
+        "be within the bounds of the array. "
+        "For primitive values, each value's type must match the "
+        "array component type exactly. For object values, there must be a "
+        "widening reference conversion from the value's type to the
+        "array component type and the array component type must be loaded. "
         (Out
             (arrayObject arrayObject "The array object ID. ")
             (int firstIndex "The first index to set.")
@@ -2145,20 +2145,20 @@
 )
 (CommandSet ClassLoaderReference=14
     (Command VisibleClasses=1
-	"Returns a list of all classes which this class loader has "
-	"been requested to load. This class loader is considered to be "
-	"an <i>initiating</i> class loader for each class in the returned "
-	"list. The list contains each "
-	"reference type defined by this loader and any types for which "
-	"loading was delegated by this class loader to another class loader. "
-	"<p>"
-	"The visible class list has useful properties with respect to "
-	"the type namespace. A particular type name will occur at most "
-	"once in the list. Each field or variable declared with that "
-	"type name in a class defined by "
-	"this class loader must be resolved to that single type. "
-	"<p>"
-	"No ordering of the returned list is guaranteed. "
+        "Returns a list of all classes which this class loader has "
+        "been requested to load. This class loader is considered to be "
+        "an <i>initiating</i> class loader for each class in the returned "
+        "list. The list contains each "
+        "reference type defined by this loader and any types for which "
+        "loading was delegated by this class loader to another class loader. "
+        "<p>"
+        "The visible class list has useful properties with respect to "
+        "the type namespace. A particular type name will occur at most "
+        "once in the list. Each field or variable declared with that "
+        "type name in a class defined by "
+        "this class loader must be resolved to that single type. "
+        "<p>"
+        "No ordering of the returned list is guaranteed. "
         (Out
             (classLoaderObject classLoaderObject "The class loader object ID. ")
         )
@@ -2166,8 +2166,8 @@
             (Repeat classes "The number of visible classes. "
                 (Group ClassInfo
                     (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
-		                      "of following reference type. ")
-                    (referenceTypeID typeID  
+                                      "of following reference type. ")
+                    (referenceTypeID typeID
                         "A class visible to this class loader.")
                 )
             )
@@ -2182,175 +2182,175 @@
 (CommandSet EventRequest=15
     (Command Set=1
         "Set an event request. When the event described by this request "
-	"occurs, an <a href=\"#JDWP_Event\">event</a> is sent from the "
-	"target VM. If an event occurs that has not been requested then it is not sent "
-	"from the target VM. The two exceptions to this are the VM Start Event and "
-	"the VM Death Event which are automatically generated events - see "
-	"<a href=\"#JDWP_Event_Composite\">Composite Command</a> for further details."	
+        "occurs, an <a href=\"#JDWP_Event\">event</a> is sent from the "
+        "target VM. If an event occurs that has not been requested then it is not sent "
+        "from the target VM. The two exceptions to this are the VM Start Event and "
+        "the VM Death Event which are automatically generated events - see "
+        "<a href=\"#JDWP_Event_Composite\">Composite Command</a> for further details."
         (Out
             (byte eventKind "Event kind to request. "
                       "See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> "
-		      "for a complete list of events that can be requested; "
+                      "for a complete list of events that can be requested; "
                       "some events may require a capability in order to be requested. "
-		      )
-            (byte suspendPolicy 
+                      )
+            (byte suspendPolicy
                       "What threads are suspended when this event occurs? "
                       "Note that the order of events and command replies "
-		      "accurately reflects the order in which threads are "
-		      "suspended and resumed. For example, if a "
-		      "<a href=\"#JDWP_VirtualMachine_Resume\">VM-wide resume</a> "
-		      "is processed before an event occurs which suspends the "
-		      "VM, the reply to the resume command will be written to "
-		      "the transport before the suspending event.")
+                      "accurately reflects the order in which threads are "
+                      "suspended and resumed. For example, if a "
+                      "<a href=\"#JDWP_VirtualMachine_Resume\">VM-wide resume</a> "
+                      "is processed before an event occurs which suspends the "
+                      "VM, the reply to the resume command will be written to "
+                      "the transport before the suspending event.")
             (Repeat modifiers "Constraints used to control the number "
-	                      "of generated events."
+                              "of generated events."
                               "Modifiers specify additional tests that "
-			      "an event must satisfy before it is placed "
-			      "in the event queue. Events are filtered by "
+                              "an event must satisfy before it is placed "
+                              "in the event queue. Events are filtered by "
                               "applying each modifier to an event in the "
-			      "order they are specified in this collection "
-			      "Only events that satisfy all modifiers "
-			      "are reported. A value of 0 means there are no "
-			      "modifiers in the request."
-			      "<p>"
+                              "order they are specified in this collection "
+                              "Only events that satisfy all modifiers "
+                              "are reported. A value of 0 means there are no "
+                              "modifiers in the request."
+                              "<p>"
                               "Filtering can improve "
-                              "debugger performance dramatically by 
-			      "reducing the "
+                              "debugger performance dramatically by
+                              "reducing the "
                               "amount of event traffic sent from the "
-			      "target VM to the debugger VM. "
+                              "target VM to the debugger VM. "
                 (Select Modifier
                     (byte modKind "Modifier kind")
-                    (Alt Count=1 
-			"Limit the requested event to be reported at most once after a "
-			"given number of occurrences.  The event is not reported "
-			"the first <code>count - 1</code> times this filter is reached. "
-			"To request a one-off event, call this method with a count of 1. "
-			"<p>"
-			"Once the count reaches 0, any subsequent filters in this request "
-			"are applied. If none of those filters cause the event to be "
-			"suppressed, the event is reported. Otherwise, the event is not "
-			"reported. In either case subsequent events are never reported for "
-			"this request. "
-			"This modifier can be used with any event kind."
-			
-			(int count "Count before event. One for one-off.")
+                    (Alt Count=1
+                        "Limit the requested event to be reported at most once after a "
+                        "given number of occurrences.  The event is not reported "
+                        "the first <code>count - 1</code> times this filter is reached. "
+                        "To request a one-off event, call this method with a count of 1. "
+                        "<p>"
+                        "Once the count reaches 0, any subsequent filters in this request "
+                        "are applied. If none of those filters cause the event to be "
+                        "suppressed, the event is reported. Otherwise, the event is not "
+                        "reported. In either case subsequent events are never reported for "
+                        "this request. "
+                        "This modifier can be used with any event kind."
+
+                        (int count "Count before event. One for one-off.")
                     )
                     (Alt Conditional=2 "Conditional on expression"
                         (int exprID "For the future")
                     )
-                    (Alt ThreadOnly=3 
-		        "Restricts reported events to "
-			"those in the given thread. "
-			"This modifier can be used with any event kind "
-			"except for class unload. "
-			
+                    (Alt ThreadOnly=3
+                        "Restricts reported events to "
+                        "those in the given thread. "
+                        "This modifier can be used with any event kind "
+                        "except for class unload. "
+
                         (threadObject thread "Required thread")
                     )
-                    (Alt ClassOnly=4 
-			"For class prepare events, restricts the events "
-			"generated by this request to be the "
-			"preparation of the given reference type and any subtypes. "
-			"For monitor wait and waited events, restricts the events "
-        		"generated by this request to those whose monitor object "
-        		"is of the given reference type or any of its subtypes. "
-			"For other events, restricts the events generated "
-			"by this request to those "
-			"whose location is in the given reference type or any of its subtypes. "
-			"An event will be generated for any location in a reference type that can "
-			"be safely cast to the given reference type. "
-			"This modifier can be used with any event kind except "
-			"class unload, thread start, and thread end. "
-     
+                    (Alt ClassOnly=4
+                        "For class prepare events, restricts the events "
+                        "generated by this request to be the "
+                        "preparation of the given reference type and any subtypes. "
+                        "For monitor wait and waited events, restricts the events "
+                        "generated by this request to those whose monitor object "
+                        "is of the given reference type or any of its subtypes. "
+                        "For other events, restricts the events generated "
+                        "by this request to those "
+                        "whose location is in the given reference type or any of its subtypes. "
+                        "An event will be generated for any location in a reference type that can "
+                        "be safely cast to the given reference type. "
+                        "This modifier can be used with any event kind except "
+                        "class unload, thread start, and thread end. "
+
                         (referenceType clazz "Required class")
                     )
-                    (Alt ClassMatch=5 
-			"Restricts reported events to those for classes whose name "
-			"matches the given restricted regular expression. "
-			"For class prepare events, the prepared class name "
-			"is matched. For class unload events, the "
-			"unloaded class name is matched. For monitor wait "
-			"and waited events, the name of the class of the "
-			"monitor object is matched. For other events, "
-			"the class name of the event's location is matched. "
-			"This modifier can be used with any event kind except "
-			"thread start and thread end. "
-			
+                    (Alt ClassMatch=5
+                        "Restricts reported events to those for classes whose name "
+                        "matches the given restricted regular expression. "
+                        "For class prepare events, the prepared class name "
+                        "is matched. For class unload events, the "
+                        "unloaded class name is matched. For monitor wait "
+                        "and waited events, the name of the class of the "
+                        "monitor object is matched. For other events, "
+                        "the class name of the event's location is matched. "
+                        "This modifier can be used with any event kind except "
+                        "thread start and thread end. "
+
                         (string classPattern "Required class pattern. "
-				"Matches are limited to exact matches of the "
-				"given class pattern and matches of patterns that "
-				"begin or end with '*'; for example, "
-				"\"*.Foo\" or \"java.*\". "
-			)
-			
+                                "Matches are limited to exact matches of the "
+                                "given class pattern and matches of patterns that "
+                                "begin or end with '*'; for example, "
+                                "\"*.Foo\" or \"java.*\". "
+                        )
+
                     )
-                    (Alt ClassExclude=6 
-			"Restricts reported events to those for classes whose name "
-			"does not match the given restricted regular expression. "
-			"For class prepare events, the prepared class name "
-			"is matched. For class unload events, the "
-			"unloaded class name is matched. For monitor wait and "
-			"waited events, the name of the class of the monitor "
-			"object is matched. For other events, "
-			"the class name of the event's location is matched. "
-			"This modifier can be used with any event kind except "
-			"thread start and thread end. "
-			
+                    (Alt ClassExclude=6
+                        "Restricts reported events to those for classes whose name "
+                        "does not match the given restricted regular expression. "
+                        "For class prepare events, the prepared class name "
+                        "is matched. For class unload events, the "
+                        "unloaded class name is matched. For monitor wait and "
+                        "waited events, the name of the class of the monitor "
+                        "object is matched. For other events, "
+                        "the class name of the event's location is matched. "
+                        "This modifier can be used with any event kind except "
+                        "thread start and thread end. "
+
                         (string classPattern "Disallowed class pattern. "
-				"Matches are limited to exact matches of the "
-				"given class pattern and matches of patterns that "
-				"begin or end with '*'; for example, "
-				"\"*.Foo\" or \"java.*\". "
-			)
+                                "Matches are limited to exact matches of the "
+                                "given class pattern and matches of patterns that "
+                                "begin or end with '*'; for example, "
+                                "\"*.Foo\" or \"java.*\". "
+                        )
                     )
-                    (Alt LocationOnly=7 
-		        "Restricts reported events to those that occur at "
-			"the given location. "
-			"This modifier can be used with "
-			"breakpoint, field access, field modification, "
-			"step, and exception event kinds. "
-			
+                    (Alt LocationOnly=7
+                        "Restricts reported events to those that occur at "
+                        "the given location. "
+                        "This modifier can be used with "
+                        "breakpoint, field access, field modification, "
+                        "step, and exception event kinds. "
+
                         (location loc "Required location")
                     )
-                    (Alt ExceptionOnly=8 
-		        "Restricts reported exceptions by their class and "
-			"whether they are caught or uncaught. "
-			"This modifier can be used with "
-			"exception event kinds only. "
-			
-                        (referenceType exceptionOrNull 
+                    (Alt ExceptionOnly=8
+                        "Restricts reported exceptions by their class and "
+                        "whether they are caught or uncaught. "
+                        "This modifier can be used with "
+                        "exception event kinds only. "
+
+                        (referenceType exceptionOrNull
                                 "Exception to report. Null (0) means report "
-				"exceptions of all types. "
-				"A non-null type restricts the reported exception "
-				"events to exceptions of the given type or "
-				"any of its subtypes. "
-			)
+                                "exceptions of all types. "
+                                "A non-null type restricts the reported exception "
+                                "events to exceptions of the given type or "
+                                "any of its subtypes. "
+                        )
                         (boolean caught "Report caught exceptions")
                         (boolean uncaught "Report uncaught exceptions. "
-				"Note that it "
-				"is not always possible to determine whether an "
-				"exception is caught or uncaught at the time it is "
-				"thrown. See the exception event catch location under "
-				"<a href=\"#JDWP_Event_Composite\">composite events</a> "
-				"for more information. "
-			)
-			
+                                "Note that it "
+                                "is not always possible to determine whether an "
+                                "exception is caught or uncaught at the time it is "
+                                "thrown. See the exception event catch location under "
+                                "<a href=\"#JDWP_Event_Composite\">composite events</a> "
+                                "for more information. "
+                        )
+
                     )
-                    (Alt FieldOnly=9 
-			"Restricts reported events to those that occur for "
-			"a given field. "
-			"This modifier can be used with "
-			"field access and field modification event kinds only. "
-			
+                    (Alt FieldOnly=9
+                        "Restricts reported events to those that occur for "
+                        "a given field. "
+                        "This modifier can be used with "
+                        "field access and field modification event kinds only. "
+
                         (referenceType declaring "Type in which field is declared.")
                         (field fieldID "Required field")
                     )
-                    (Alt Step=10 
-		        "Restricts reported step events "
-			"to those which satisfy "
-			"depth and size constraints. "
-			"This modifier can be used with "
-			"step event kinds only. "
-			
+                    (Alt Step=10
+                        "Restricts reported step events "
+                        "to those which satisfy "
+                        "depth and size constraints. "
+                        "This modifier can be used with "
+                        "step event kinds only. "
+
                         (threadObject thread "Thread in which to step")
                         (int size "size of each step. "
                            "See <a href=\"#JDWP_StepSize\">JDWP.StepSize</a>")
@@ -2358,38 +2358,38 @@
                            "See <a href=\"#JDWP_StepDepth\">JDWP.StepDepth</a>")
                     )
                     (Alt InstanceOnly=11
-			"Restricts reported events to those whose "
-			"active 'this' object is the given object. "
-			"Match value is the null object for static methods. "
-			"This modifier can be used with any event kind "
-			"except class prepare, class unload, thread start, "
-			"and thread end. Introduced in JDWP version 1.4."
-     
+                        "Restricts reported events to those whose "
+                        "active 'this' object is the given object. "
+                        "Match value is the null object for static methods. "
+                        "This modifier can be used with any event kind "
+                        "except class prepare, class unload, thread start, "
+                        "and thread end. Introduced in JDWP version 1.4."
+
                         (object instance "Required 'this' object")
                     )
                     (Alt SourceNameMatch=12
-			"Restricts reported class prepare events to those "
-			"for reference types which have a source name "
+                        "Restricts reported class prepare events to those "
+                        "for reference types which have a source name "
                         "which matches the given restricted regular expression. "
                         "The source names are determined by the reference type's "
                         "<a href=\"#JDWP_ReferenceType_SourceDebugExtension\"> "
                         "SourceDebugExtension</a>. "
-			"This modifier can only be used with class prepare "
+                        "This modifier can only be used with class prepare "
                         "events. "
                         "Since JDWP version 1.6. Requires the canUseSourceNameFilters "
                         "capability - see "
                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
 
                         (string sourceNamePattern "Required source name pattern. "
-				"Matches are limited to exact matches of the "
-				"given pattern and matches of patterns that "
-				"begin or end with '*'; for example, "
-				"\"*.Foo\" or \"java.*\". "
+                                "Matches are limited to exact matches of the "
+                                "given pattern and matches of patterns that "
+                                "begin or end with '*'; for example, "
+                                "\"*.Foo\" or \"java.*\". "
                         )
                     )
 
                 )
-            ) 
+            )
         )
         (Reply
             (int requestID "ID of created request")
@@ -2410,11 +2410,11 @@
     )
     (Command Clear=2
         "Clear an event request. See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> "
-        "for a complete list of events that can be cleared. Only the event request matching " 
-	"the specified event kind and requestID is cleared. If there isn't a matching event "
-	"request the command is a no-op and does not result in an error. Automatically "
-	"generated events do not have a corresponding event request and may not be cleared "
-	"using this command."
+        "for a complete list of events that can be cleared. Only the event request matching "
+        "the specified event kind and requestID is cleared. If there isn't a matching event "
+        "request the command is a no-op and does not result in an error. Automatically "
+        "generated events do not have a corresponding event request and may not be cleared "
+        "using this command."
         (Out
             (byte eventKind "Event kind to clear")
             (int requestID "ID of request to clear")
@@ -2423,7 +2423,7 @@
         )
         (ErrorSet
             (Error VM_DEAD)
-	    (Error INVALID_EVENT_TYPE)
+            (Error INVALID_EVENT_TYPE)
         )
     )
     (Command ClearAllBreakpoints=3
@@ -2440,26 +2440,26 @@
 (CommandSet StackFrame=16
     (Command GetValues=1
         "Returns the value of one or more local variables in a "
-	"given frame. Each variable must be visible at the frame's code index. "
-	"Even if local variable information is not available, values can "
-	"be retrieved if the front-end is able to "
-	"determine the correct local variable index. (Typically, this "
-	"index can be determined for method arguments from the method "
-	"signature without access to the local variable table information.) "
+        "given frame. Each variable must be visible at the frame's code index. "
+        "Even if local variable information is not available, values can "
+        "be retrieved if the front-end is able to "
+        "determine the correct local variable index. (Typically, this "
+        "index can be determined for method arguments from the method "
+        "signature without access to the local variable table information.) "
         (Out
             (threadObject thread "The frame's thread. ")
             (frame frame "The frame ID. ")
             (Repeat slots "The number of values to get. "
-                (Group SlotInfo 
+                (Group SlotInfo
                     (int slot "The local variable's index in the frame. ")
                     (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
-		                  "identifying the type of the variable ")
+                                  "identifying the type of the variable ")
                 )
-            )   
+            )
         )
         (Reply
             (Repeat values "The number of values retrieved, always equal to slots, "
-	    		   "the number of values to get."	    
+                           "the number of values to get."
                 (value slotValue "The value of the local variable. ")
             )
         )
@@ -2467,32 +2467,32 @@
             (Error INVALID_THREAD)
             (Error INVALID_OBJECT)
             (Error INVALID_FRAMEID)
-	    (Error INVALID_SLOT)
+            (Error INVALID_SLOT)
             (Error VM_DEAD)
         )
     )
     (Command SetValues=2
         "Sets the value of one or more local variables. "
-	"Each variable must be visible at the current frame code index. "
-	"For primitive values, the value's type must match the "
-	"variable's type exactly. For object values, there must be a "
-	"widening reference conversion from the value's type to the 
-	"variable's type and the variable's type must be loaded. "
-	"<p>"
-	"Even if local variable information is not available, values can "
-	"be set, if the front-end is able to "
-	"determine the correct local variable index. (Typically, this 
-	"index can be determined for method arguments from the method "
-	"signature without access to the local variable table information.) "
+        "Each variable must be visible at the current frame code index. "
+        "For primitive values, the value's type must match the "
+        "variable's type exactly. For object values, there must be a "
+        "widening reference conversion from the value's type to the
+        "variable's type and the variable's type must be loaded. "
+        "<p>"
+        "Even if local variable information is not available, values can "
+        "be set, if the front-end is able to "
+        "determine the correct local variable index. (Typically, this
+        "index can be determined for method arguments from the method "
+        "signature without access to the local variable table information.) "
         (Out
             (threadObject thread "The frame's thread. ")
             (frame frame "The frame ID. ")
             (Repeat slotValues "The number of values to set. "
-                (Group SlotInfo 
+                (Group SlotInfo
                     (int slot "The slot ID. ")
                     (value slotValue "The value to set. ")
                 )
-            )   
+            )
         )
         (Reply "none"
         )
@@ -2521,17 +2521,17 @@
             (Error VM_DEAD)
         )
     )
-    (Command PopFrames=4	
-	"Pop the top-most stack frames of the thread stack, up to, and including 'frame'. "
-	"The thread must be suspended to perform this command. "
-	"The top-most stack frames are discarded and the stack frame previous to 'frame' "
-	"becomes the current frame. The operand stack is restored -- the argument values "
-	"are added back and if the invoke was not <code>invokestatic</code>, "
-	"<code>objectref</code> is added back as well. The Java virtual machine "
-	"program counter is restored to the opcode of the invoke instruction."	
-	"<p>"
+    (Command PopFrames=4
+        "Pop the top-most stack frames of the thread stack, up to, and including 'frame'. "
+        "The thread must be suspended to perform this command. "
+        "The top-most stack frames are discarded and the stack frame previous to 'frame' "
+        "becomes the current frame. The operand stack is restored -- the argument values "
+        "are added back and if the invoke was not <code>invokestatic</code>, "
+        "<code>objectref</code> is added back as well. The Java virtual machine "
+        "program counter is restored to the opcode of the invoke instruction."
+        "<p>"
         "Since JDWP version 1.4. Requires canPopFrames capability - see "
-	"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
         (Out
             (threadObject thread "The thread object ID. ")
             (frame frame "The frame ID. ")
@@ -2557,9 +2557,9 @@
             (classObject classObject "The class object. ")
         )
         (Reply
-	    (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
-			      "of following reference type. ")
-	    (referenceTypeID typeID "reflected reference type")
+            (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
+                              "of following reference type. ")
+            (referenceTypeID typeID "reflected reference type")
         )
         (ErrorSet
             (Error INVALID_OBJECT)
@@ -2569,349 +2569,349 @@
 )
 (CommandSet Event=64
     (Command Composite=100
-	"Several events may occur at a given time in the target VM. "
-	"For example, there may be more than one breakpoint request "
-	"for a given location "
-	"or you might single step to the same location as a "
-	"breakpoint request.  These events are delivered "
-	"together as a composite event.  For uniformity, a " 
-	"composite event is always used "
-	"to deliver events, even if there is only one event to report. "
-	"<P>"
-	"The events that are grouped in a composite event are restricted in the "
-	"following ways: "
-	"<P>"
-	"<UL>"
-	"<LI>Only with other thread start events for the same thread:"
-	"    <UL>"
-	"    <LI>Thread Start Event"
-	"    </UL>"
-	"<LI>Only with other thread death events for the same thread:"
-	"    <UL>"
-	"    <LI>Thread Death Event"
-	"    </UL>"
-	"<LI>Only with other class prepare events for the same class:"
-	"    <UL>"
-	"    <LI>Class Prepare Event"
-	"    </UL>"
-	"<LI>Only with other class unload events for the same class:"
-	"    <UL>"
-	"    <LI>Class Unload Event"
-	"    </UL>"
-	"<LI>Only with other access watchpoint events for the same field access:"
-	"    <UL>"
-	"    <LI>Access Watchpoint Event"
-	"    </UL>"
-	"<LI>Only with other modification watchpoint events for the same field "
-	"modification:"
-	"    <UL>"
-	"    <LI>Modification Watchpoint Event"
-	"    </UL>"
-	"<LI>Only with other Monitor contended enter events for the same monitor object: "
-	"    <UL>"
-	"    <LI>Monitor Contended Enter Event"
-	"    </UL>"
-	"<LI>Only with other Monitor contended entered events for the same monitor object: "
-	"    <UL>"
-	"    <LI>Monitor Contended Entered Event"
-	"    </UL>"
-	"<LI>Only with other Monitor wait events for the same monitor object: "
-	"    <UL>"
-	"    <LI>Monitor Wait Event"
-	"    </UL>"
-	"<LI>Only with other Monitor waited events for the same monitor object: "
-	"    <UL>"
-	"    <LI>Monitor Waited Event"
-	"    </UL>"
-	"<LI>Only with other ExceptionEvents for the same exception occurrance:"
-	"    <UL>"
-	"    <LI>ExceptionEvent"
-	"    </UL>"
-	"<LI>Only with other members of this group, at the same location "
-	"and in the same thread: "
-	"    <UL>"
-	"    <LI>Breakpoint Event"
-	"    <LI>Step Event"
-	"    <LI>Method Entry Event"
-	"    <LI>Method Exit Event"
-	"    </UL>"
-	"</UL>"
-	"<P>"
-	"The VM Start Event and VM Death Event are automatically generated events. "
-	"This means they do not need to be requested using the "
-	"<a href=\"#JDWP_EventRequest_Set\">EventRequest.Set</a> command. "
-	"The VM Start event signals the completion of VM initialization. The VM Death "
-	"event signals the termination of the VM." 	
-	"If there is a debugger connected at the time when an automatically generated "
-	"event occurs it is sent from the target VM. Automatically generated events may "
-	"also be requested using the EventRequest.Set command and thus multiple events "
-	"of the same event kind will be sent from the target VM when an event occurs."
-	"Automatically generated events are sent with the requestID field "
-	"in the Event Data set to 0. The value of the suspendPolicy field in the "
-	"Event Data depends on the event. For the automatically generated VM Start "
-	"Event the value of suspendPolicy is not defined and is therefore implementation "
-	"or configuration specific. In the Sun implementation, for example, the "
-	"suspendPolicy is specified as an option to the JDWP agent at launch-time."
-	"The automatically generated VM Death Event will have the suspendPolicy set to "
-	"NONE."			
-	
+        "Several events may occur at a given time in the target VM. "
+        "For example, there may be more than one breakpoint request "
+        "for a given location "
+        "or you might single step to the same location as a "
+        "breakpoint request.  These events are delivered "
+        "together as a composite event.  For uniformity, a "
+        "composite event is always used "
+        "to deliver events, even if there is only one event to report. "
+        "<P>"
+        "The events that are grouped in a composite event are restricted in the "
+        "following ways: "
+        "<P>"
+        "<UL>"
+        "<LI>Only with other thread start events for the same thread:"
+        "    <UL>"
+        "    <LI>Thread Start Event"
+        "    </UL>"
+        "<LI>Only with other thread death events for the same thread:"
+        "    <UL>"
+        "    <LI>Thread Death Event"
+        "    </UL>"
+        "<LI>Only with other class prepare events for the same class:"
+        "    <UL>"
+        "    <LI>Class Prepare Event"
+        "    </UL>"
+        "<LI>Only with other class unload events for the same class:"
+        "    <UL>"
+        "    <LI>Class Unload Event"
+        "    </UL>"
+        "<LI>Only with other access watchpoint events for the same field access:"
+        "    <UL>"
+        "    <LI>Access Watchpoint Event"
+        "    </UL>"
+        "<LI>Only with other modification watchpoint events for the same field "
+        "modification:"
+        "    <UL>"
+        "    <LI>Modification Watchpoint Event"
+        "    </UL>"
+        "<LI>Only with other Monitor contended enter events for the same monitor object: "
+        "    <UL>"
+        "    <LI>Monitor Contended Enter Event"
+        "    </UL>"
+        "<LI>Only with other Monitor contended entered events for the same monitor object: "
+        "    <UL>"
+        "    <LI>Monitor Contended Entered Event"
+        "    </UL>"
+        "<LI>Only with other Monitor wait events for the same monitor object: "
+        "    <UL>"
+        "    <LI>Monitor Wait Event"
+        "    </UL>"
+        "<LI>Only with other Monitor waited events for the same monitor object: "
+        "    <UL>"
+        "    <LI>Monitor Waited Event"
+        "    </UL>"
+        "<LI>Only with other ExceptionEvents for the same exception occurrance:"
+        "    <UL>"
+        "    <LI>ExceptionEvent"
+        "    </UL>"
+        "<LI>Only with other members of this group, at the same location "
+        "and in the same thread: "
+        "    <UL>"
+        "    <LI>Breakpoint Event"
+        "    <LI>Step Event"
+        "    <LI>Method Entry Event"
+        "    <LI>Method Exit Event"
+        "    </UL>"
+        "</UL>"
+        "<P>"
+        "The VM Start Event and VM Death Event are automatically generated events. "
+        "This means they do not need to be requested using the "
+        "<a href=\"#JDWP_EventRequest_Set\">EventRequest.Set</a> command. "
+        "The VM Start event signals the completion of VM initialization. The VM Death "
+        "event signals the termination of the VM."
+        "If there is a debugger connected at the time when an automatically generated "
+        "event occurs it is sent from the target VM. Automatically generated events may "
+        "also be requested using the EventRequest.Set command and thus multiple events "
+        "of the same event kind will be sent from the target VM when an event occurs."
+        "Automatically generated events are sent with the requestID field "
+        "in the Event Data set to 0. The value of the suspendPolicy field in the "
+        "Event Data depends on the event. For the automatically generated VM Start "
+        "Event the value of suspendPolicy is not defined and is therefore implementation "
+        "or configuration specific. In the Sun implementation, for example, the "
+        "suspendPolicy is specified as an option to the JDWP agent at launch-time."
+        "The automatically generated VM Death Event will have the suspendPolicy set to "
+        "NONE."
+
        (Event "Generated event"
-            (byte suspendPolicy 
+            (byte suspendPolicy
                 "Which threads where suspended by this composite event?")
             (Repeat events "Events in set."
                 (Select Events
                     (byte eventKind "Event kind selector")
-                    (Alt VMStart=JDWP.EventKind.VM_START 
-			"Notification of initialization of a target VM.  This event is "
-			"received before the main thread is started and before any "
-			"application code has been executed. Before this event occurs "
-			"a significant amount of system code has executed and a number "
-			"of system classes have been loaded. "
-			"This event is always generated by the target VM, even "
-			"if not explicitly requested."
-			
-                     (int requestID 
-			     "Request that generated event (or 0 if this "
-			     "event is automatically generated.")
+                    (Alt VMStart=JDWP.EventKind.VM_START
+                        "Notification of initialization of a target VM.  This event is "
+                        "received before the main thread is started and before any "
+                        "application code has been executed. Before this event occurs "
+                        "a significant amount of system code has executed and a number "
+                        "of system classes have been loaded. "
+                        "This event is always generated by the target VM, even "
+                        "if not explicitly requested."
+
+                     (int requestID
+                             "Request that generated event (or 0 if this "
+                             "event is automatically generated.")
                         (threadObject thread "Initial thread")
-                    ) 
-                    (Alt SingleStep=JDWP.EventKind.SINGLE_STEP 
-			"Notification of step completion in the target VM. The step event "
-			"is generated before the code at its location is executed. "
-			
+                    )
+                    (Alt SingleStep=JDWP.EventKind.SINGLE_STEP
+                        "Notification of step completion in the target VM. The step event "
+                        "is generated before the code at its location is executed. "
+
                         (int requestID "Request that generated event")
                         (threadObject thread "Stepped thread")
                         (location location "Location stepped to")
-                    ) 
+                    )
                     (Alt Breakpoint=JDWP.EventKind.BREAKPOINT
-			"Notification of a breakpoint in the target VM. The breakpoint event "
-			"is generated before the code at its location is executed. "
-			
+                        "Notification of a breakpoint in the target VM. The breakpoint event "
+                        "is generated before the code at its location is executed. "
+
                         (int requestID "Request that generated event")
                         (threadObject thread "Thread which hit breakpoint")
                         (location location "Location hit")
-                    ) 
+                    )
                     (Alt MethodEntry=JDWP.EventKind.METHOD_ENTRY
-			 "Notification of a method invocation in the target VM. This event "
-			 "is generated before any code in the invoked method has executed. "
-			 "Method entry events are generated for both native and non-native "
-			 "methods. "
-			 "<P>"
-			 "In some VMs method entry events can occur for a particular thread "
-			 "before its thread start event occurs if methods are called "
-			 "as part of the thread's initialization. "
+                         "Notification of a method invocation in the target VM. This event "
+                         "is generated before any code in the invoked method has executed. "
+                         "Method entry events are generated for both native and non-native "
+                         "methods. "
+                         "<P>"
+                         "In some VMs method entry events can occur for a particular thread "
+                         "before its thread start event occurs if methods are called "
+                         "as part of the thread's initialization. "
 
                         (int requestID "Request that generated event")
                         (threadObject thread "Thread which entered method")
                         (location location "The initial executable location in the method.")
-                    ) 
+                    )
                     (Alt MethodExit=JDWP.EventKind.METHOD_EXIT
-			 "Notification of a method return in the target VM. This event "
-			 "is generated after all code in the method has executed, but the "
-			 "location of this event is the last executed location in the method. "
-			 "Method exit events are generated for both native and non-native "
-			 "methods. Method exit events are not generated if the method terminates "
-			 "with a thrown exception. "
-			 
+                         "Notification of a method return in the target VM. This event "
+                         "is generated after all code in the method has executed, but the "
+                         "location of this event is the last executed location in the method. "
+                         "Method exit events are generated for both native and non-native "
+                         "methods. Method exit events are not generated if the method terminates "
+                         "with a thrown exception. "
+
                         (int requestID "Request that generated event")
                         (threadObject thread "Thread which exited method")
                         (location location "Location of exit")
-                    ) 
+                    )
                     (Alt MethodExitWithReturnValue=JDWP.EventKind.METHOD_EXIT_WITH_RETURN_VALUE
-			 "Notification of a method return in the target VM. This event "
-			 "is generated after all code in the method has executed, but the "
-			 "location of this event is the last executed location in the method. "
-			 "Method exit events are generated for both native and non-native "
-			 "methods. Method exit events are not generated if the method terminates "
-			 "with a thrown exception. <p>Since JDWP version 1.6. "
-			 
+                         "Notification of a method return in the target VM. This event "
+                         "is generated after all code in the method has executed, but the "
+                         "location of this event is the last executed location in the method. "
+                         "Method exit events are generated for both native and non-native "
+                         "methods. Method exit events are not generated if the method terminates "
+                         "with a thrown exception. <p>Since JDWP version 1.6. "
+
                         (int requestID "Request that generated event")
                         (threadObject thread "Thread which exited method")
                         (location location "Location of exit")
                         (value value "Value that will be returned by the method")
                     )
-                    (Alt MonitorContendedEnter=JDWP.EventKind.MONITOR_CONTENDED_ENTER		    
-			 "Notification that a thread in the target VM is attempting "
-			 "to enter a monitor that is already acquired by another thread. "
-			 "Requires canRequestMonitorEvents capability - see "
-			 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
-			 "<p>Since JDWP version 1.6. "
+                    (Alt MonitorContendedEnter=JDWP.EventKind.MONITOR_CONTENDED_ENTER
+                         "Notification that a thread in the target VM is attempting "
+                         "to enter a monitor that is already acquired by another thread. "
+                         "Requires canRequestMonitorEvents capability - see "
+                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
+                         "<p>Since JDWP version 1.6. "
 
-                        (int requestID 
+                        (int requestID
                                 "Request that generated event")
-		        (threadObject thread "Thread which is trying to enter the monitor")
-			(tagged-object object "Monitor object reference")
-		        (location location "Location of contended monitor enter")
+                        (threadObject thread "Thread which is trying to enter the monitor")
+                        (tagged-object object "Monitor object reference")
+                        (location location "Location of contended monitor enter")
                     )
-                    (Alt MonitorContendedEntered=JDWP.EventKind.MONITOR_CONTENDED_ENTERED		    
- 			 "Notification of a thread in the target VM is entering a monitor "
-		         "after waiting for it to be released by another thread. "
-			 "Requires canRequestMonitorEvents capability - see "
-			 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
-			 "<p>Since JDWP version 1.6. "
+                    (Alt MonitorContendedEntered=JDWP.EventKind.MONITOR_CONTENDED_ENTERED
+                         "Notification of a thread in the target VM is entering a monitor "
+                         "after waiting for it to be released by another thread. "
+                         "Requires canRequestMonitorEvents capability - see "
+                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
+                         "<p>Since JDWP version 1.6. "
 
-                        (int requestID 
+                        (int requestID
                                 "Request that generated event")
-		        (threadObject thread "Thread which entered monitor")
-			(tagged-object object "Monitor object reference")
-		        (location location "Location of contended monitor enter")
+                        (threadObject thread "Thread which entered monitor")
+                        (tagged-object object "Monitor object reference")
+                        (location location "Location of contended monitor enter")
                     )
-                    (Alt MonitorWait=JDWP.EventKind.MONITOR_WAIT		    
+                    (Alt MonitorWait=JDWP.EventKind.MONITOR_WAIT
                          "Notification of a thread about to wait on a monitor object. "
-			 "Requires canRequestMonitorEvents capability - see "
-			 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
-			 "<p>Since JDWP version 1.6. "
- 
-                        (int requestID 
+                         "Requires canRequestMonitorEvents capability - see "
+                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
+                         "<p>Since JDWP version 1.6. "
+
+                        (int requestID
                                 "Request that generated event")
-		        (threadObject thread "Thread which is about to wait")
-			(tagged-object object "Monitor object reference")
-		        (location location "Location at which the wait will occur")
-			(long     timeout  "Thread wait time in milliseconds")
+                        (threadObject thread "Thread which is about to wait")
+                        (tagged-object object "Monitor object reference")
+                        (location location "Location at which the wait will occur")
+                        (long     timeout  "Thread wait time in milliseconds")
                     )
-                    (Alt MonitorWaited=JDWP.EventKind.MONITOR_WAITED		
-			 "Notification that a thread in the target VM has finished waiting on "
-			 "Requires canRequestMonitorEvents capability - see "
-			 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
-		         "a monitor object. "
-			 "<p>Since JDWP version 1.6. "
+                    (Alt MonitorWaited=JDWP.EventKind.MONITOR_WAITED
+                         "Notification that a thread in the target VM has finished waiting on "
+                         "Requires canRequestMonitorEvents capability - see "
+                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
+                         "a monitor object. "
+                         "<p>Since JDWP version 1.6. "
 
-                        (int requestID 
+                        (int requestID
                                 "Request that generated event")
-		        (threadObject thread "Thread which waited")
-			(tagged-object object "Monitor object reference")
-		        (location location "Location at which the wait occured")
-			(boolean  timed_out "True if timed out")
+                        (threadObject thread "Thread which waited")
+                        (tagged-object object "Monitor object reference")
+                        (location location "Location at which the wait occured")
+                        (boolean  timed_out "True if timed out")
                     )
                     (Alt Exception=JDWP.EventKind.EXCEPTION
-			 "Notification of an exception in the target VM. "
-			 "If the exception is thrown from a non-native method, "
-			 "the exception event is generated at the location where the "
-			 "exception is thrown. "
-			 "If the exception is thrown from a native method, the exception event "
-			 "is generated at the first non-native location reached after the exception "
-			 "is thrown. "
+                         "Notification of an exception in the target VM. "
+                         "If the exception is thrown from a non-native method, "
+                         "the exception event is generated at the location where the "
+                         "exception is thrown. "
+                         "If the exception is thrown from a native method, the exception event "
+                         "is generated at the first non-native location reached after the exception "
+                         "is thrown. "
 
                         (int requestID "Request that generated event")
                         (threadObject thread "Thread with exception")
                         (location location "Location of exception throw "
-			"(or first non-native location after throw if thrown from a native method)")
+                        "(or first non-native location after throw if thrown from a native method)")
                         (tagged-object exception "Thrown exception")
-                        (location catchLocation 
-			    "Location of catch, or 0 if not caught. An exception "
-			    "is considered to be caught if, at the point of the throw, the "
-			    "current location is dynamically enclosed in a try statement that "
-			    "handles the exception. (See the JVM specification for details). "
-			    "If there is such a try statement, the catch location is the "
-			    "first location in the appropriate catch clause. "
-			    "<p>"
-			    "If there are native methods in the call stack at the time of the "
-			    "exception, there are important restrictions to note about the "
-			    "returned catch location. In such cases, "
-			    "it is not possible to predict whether an exception will be handled "
-			    "by some native method on the call stack. "
-			    "Thus, it is possible that exceptions considered uncaught "
-			    "here will, in fact, be handled by a native method and not cause "
-			    "termination of the target VM. Furthermore, it cannot be assumed that the "
-			    "catch location returned here will ever be reached by the throwing "
-			    "thread. If there is "
-			    "a native frame between the current location and the catch location, "
-			    "the exception might be handled and cleared in that native method "
-			    "instead. "
-			    "<p>"
-			    "Note that compilers can generate try-catch blocks in some cases "
-			    "where they are not explicit in the source code; for example, "
-			    "the code generated for <code>synchronized</code> and "
-			    "<code>finally</code> blocks can contain implicit try-catch blocks. "
-			    "If such an implicitly generated try-catch is "
-			    "present on the call stack at the time of the throw, the exception "
-			    "will be considered caught even though it appears to be uncaught from "
-			    "examination of the source code. "
-			)
-                    ) 
+                        (location catchLocation
+                            "Location of catch, or 0 if not caught. An exception "
+                            "is considered to be caught if, at the point of the throw, the "
+                            "current location is dynamically enclosed in a try statement that "
+                            "handles the exception. (See the JVM specification for details). "
+                            "If there is such a try statement, the catch location is the "
+                            "first location in the appropriate catch clause. "
+                            "<p>"
+                            "If there are native methods in the call stack at the time of the "
+                            "exception, there are important restrictions to note about the "
+                            "returned catch location. In such cases, "
+                            "it is not possible to predict whether an exception will be handled "
+                            "by some native method on the call stack. "
+                            "Thus, it is possible that exceptions considered uncaught "
+                            "here will, in fact, be handled by a native method and not cause "
+                            "termination of the target VM. Furthermore, it cannot be assumed that the "
+                            "catch location returned here will ever be reached by the throwing "
+                            "thread. If there is "
+                            "a native frame between the current location and the catch location, "
+                            "the exception might be handled and cleared in that native method "
+                            "instead. "
+                            "<p>"
+                            "Note that compilers can generate try-catch blocks in some cases "
+                            "where they are not explicit in the source code; for example, "
+                            "the code generated for <code>synchronized</code> and "
+                            "<code>finally</code> blocks can contain implicit try-catch blocks. "
+                            "If such an implicitly generated try-catch is "
+                            "present on the call stack at the time of the throw, the exception "
+                            "will be considered caught even though it appears to be uncaught from "
+                            "examination of the source code. "
+                        )
+                    )
                     (Alt ThreadStart=JDWP.EventKind.THREAD_START
-			"Notification of a new running thread in the target VM. "
-			"The new thread can be the result of a call to "
-			"<code>java.lang.Thread.start</code> or the result of "
-			"attaching a new thread to the VM though JNI. The "
-			"notification is generated by the new thread some time before "
-			"its execution starts. "
-			"Because of this timing, it is possible to receive other events "
-			"for the thread before this event is received. (Notably, "
-			"Method Entry Events and Method Exit Events might occur "
-			"during thread initialization. "
-			"It is also possible for the "
-   		        "<a href=\"#JDWP_VirtualMachine_AllThreads\">VirtualMachine AllThreads</a> "
-			"command to return "
-			"a thread before its thread start event is received. "
-			"<p>"
-			"Note that this event gives no information "
-			"about the creation of the thread object which may have happened "
-			"much earlier, depending on the VM being debugged. "
-      	    
+                        "Notification of a new running thread in the target VM. "
+                        "The new thread can be the result of a call to "
+                        "<code>java.lang.Thread.start</code> or the result of "
+                        "attaching a new thread to the VM though JNI. The "
+                        "notification is generated by the new thread some time before "
+                        "its execution starts. "
+                        "Because of this timing, it is possible to receive other events "
+                        "for the thread before this event is received. (Notably, "
+                        "Method Entry Events and Method Exit Events might occur "
+                        "during thread initialization. "
+                        "It is also possible for the "
+                        "<a href=\"#JDWP_VirtualMachine_AllThreads\">VirtualMachine AllThreads</a> "
+                        "command to return "
+                        "a thread before its thread start event is received. "
+                        "<p>"
+                        "Note that this event gives no information "
+                        "about the creation of the thread object which may have happened "
+                        "much earlier, depending on the VM being debugged. "
+
                         (int requestID "Request that generated event")
                         (threadObject thread "Started thread")
-                    ) 
+                    )
                     (Alt ThreadDeath=JDWP.EventKind.THREAD_DEATH
-			"Notification of a completed thread in the target VM. The "
-			"notification is generated by the dying thread before it terminates. "
-			"Because of this timing, it is possible "
-			"for {@link VirtualMachine#allThreads} to return this thread "
-			"after this event is received. "
-			"<p>"
-			"Note that this event gives no information "
-			"about the lifetime of the thread object. It may or may not be collected "
-			"soon depending on what references exist in the target VM. "
-		    
+                        "Notification of a completed thread in the target VM. The "
+                        "notification is generated by the dying thread before it terminates. "
+                        "Because of this timing, it is possible "
+                        "for {@link VirtualMachine#allThreads} to return this thread "
+                        "after this event is received. "
+                        "<p>"
+                        "Note that this event gives no information "
+                        "about the lifetime of the thread object. It may or may not be collected "
+                        "soon depending on what references exist in the target VM. "
+
                         (int requestID "Request that generated event")
                         (threadObject thread "Ending thread")
-                    ) 
+                    )
                     (Alt ClassPrepare=JDWP.EventKind.CLASS_PREPARE
-			"Notification of a class prepare in the target VM. See the JVM "
-			"specification for a definition of class preparation. Class prepare "
-			"events are not generated for primtiive classes (for example, "
-			"java.lang.Integer.TYPE). "
-			
+                        "Notification of a class prepare in the target VM. See the JVM "
+                        "specification for a definition of class preparation. Class prepare "
+                        "events are not generated for primtiive classes (for example, "
+                        "java.lang.Integer.TYPE). "
+
                         (int requestID "Request that generated event")
                         (threadObject thread "Preparing thread. "
-			     "In rare cases, this event may occur in a debugger system "
-			     "thread within the target VM. Debugger threads take precautions "
-			     "to prevent these events, but they cannot be avoided under some "
-			     "conditions, especially for some subclasses of "
-			     "java.lang.Error. "
-			     "If the event was generated by a debugger system thread, the "
-			     "value returned by this method is null, and if the requested  "
-			     "<a href=\"#JDWP_SuspendPolicy\">suspend policy</a> "
-			     "for the event was EVENT_THREAD "
-			     "all threads will be suspended instead, and the "
-			     "composite event's suspend policy will reflect this change. "
-			     "<p>"
-			     "Note that the discussion above does not apply to system threads "
-			     "created by the target VM during its normal (non-debug) operation. "
-			)
+                             "In rare cases, this event may occur in a debugger system "
+                             "thread within the target VM. Debugger threads take precautions "
+                             "to prevent these events, but they cannot be avoided under some "
+                             "conditions, especially for some subclasses of "
+                             "java.lang.Error. "
+                             "If the event was generated by a debugger system thread, the "
+                             "value returned by this method is null, and if the requested  "
+                             "<a href=\"#JDWP_SuspendPolicy\">suspend policy</a> "
+                             "for the event was EVENT_THREAD "
+                             "all threads will be suspended instead, and the "
+                             "composite event's suspend policy will reflect this change. "
+                             "<p>"
+                             "Note that the discussion above does not apply to system threads "
+                             "created by the target VM during its normal (non-debug) operation. "
+                        )
                         (byte refTypeTag  "Kind of reference type. "
                            "See <a href=\"#JDWP_TypeTag\">JDWP.TypeTag</a>")
                         (referenceTypeID typeID "Type being prepared")
                         (string signature "Type signature")
                         (int status "Status of type. "
                          "See <a href=\"#JDWP_ClassStatus\">JDWP.ClassStatus</a>")
-                    ) 
+                    )
                     (Alt ClassUnload=JDWP.EventKind.CLASS_UNLOAD
-			 "Notification of a class unload in the target VM. "
-			 "<p>"
-			 "There are severe constraints on the debugger back-end during "
-			 "garbage collection, so unload information is greatly limited.	"
-			 
+                         "Notification of a class unload in the target VM. "
+                         "<p>"
+                         "There are severe constraints on the debugger back-end during "
+                         "garbage collection, so unload information is greatly limited. "
+
                         (int requestID "Request that generated event")
                         (string signature "Type signature")
                     )
                     (Alt FieldAccess=JDWP.EventKind.FIELD_ACCESS
-			"Notification of a field access in the target VM. "
-			"Field modifications "
-			"are not considered field accesses. "
-			"Requires canWatchFieldAccess capability - see "
-			"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
-			
+                        "Notification of a field access in the target VM. "
+                        "Field modifications "
+                        "are not considered field accesses. "
+                        "Requires canWatchFieldAccess capability - see "
+                        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+
                       (int requestID "Request that generated event")
                         (threadObject thread "Accessing thread")
                         (location location "Location of access")
@@ -2923,10 +2923,10 @@
                                 "Object being accessed (null=0 for statics")
                     )
                     (Alt FieldModification=JDWP.EventKind.FIELD_MODIFICATION
-			"Notification of a field modification in the target VM. "
-			"Requires canWatchFieldModification capability - see "
-			"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
-			
+                        "Notification of a field modification in the target VM. "
+                        "Requires canWatchFieldModification capability - see "
+                        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
+
                         (int requestID "Request that generated event")
                         (threadObject thread "Modifying thread")
                         (location location "Location of modify")
@@ -2938,10 +2938,10 @@
                                 "Object being modified (null=0 for statics")
                         (value valueToBe "Value to be assigned")
                     )
-		    (Alt VMDeath=JDWP.EventKind.VM_DEATH		    
-                        (int requestID 
+                    (Alt VMDeath=JDWP.EventKind.VM_DEATH
+                        (int requestID
                                 "Request that generated event")
-                    ) 
+                    )
                 )
             )
         )
@@ -2950,33 +2950,33 @@
 (ConstantSet Error
     (Constant NONE                   =0   "No error has occurred.")
     (Constant INVALID_THREAD         =10  "Passed thread is null, is not a valid thread or has exited.")
-    (Constant INVALID_THREAD_GROUP   =11  "Thread group invalid.")   
-    (Constant INVALID_PRIORITY       =12  "Invalid priority.")   
+    (Constant INVALID_THREAD_GROUP   =11  "Thread group invalid.")
+    (Constant INVALID_PRIORITY       =12  "Invalid priority.")
     (Constant THREAD_NOT_SUSPENDED   =13  "If the specified thread has not been "
-                                          "suspended by an event.")   
-    (Constant THREAD_SUSPENDED       =14  "Thread already suspended.")   
-    (Constant THREAD_NOT_ALIVE       =15  "Thread has not been started or is now dead.")   
+                                          "suspended by an event.")
+    (Constant THREAD_SUSPENDED       =14  "Thread already suspended.")
+    (Constant THREAD_NOT_ALIVE       =15  "Thread has not been started or is now dead.")
 
     (Constant INVALID_OBJECT         =20  "If this reference type has been unloaded "
-                                          "and garbage collected.")   
-    (Constant INVALID_CLASS          =21  "Invalid class.")  
-    (Constant CLASS_NOT_PREPARED     =22  "Class has been loaded but not yet prepared.")   
-    (Constant INVALID_METHODID       =23  "Invalid method.")   
-    (Constant INVALID_LOCATION       =24  "Invalid location.")   
-    (Constant INVALID_FIELDID        =25  "Invalid field.") 
-    (Constant INVALID_FRAMEID        =30  "Invalid jframeID.")   
+                                          "and garbage collected.")
+    (Constant INVALID_CLASS          =21  "Invalid class.")
+    (Constant CLASS_NOT_PREPARED     =22  "Class has been loaded but not yet prepared.")
+    (Constant INVALID_METHODID       =23  "Invalid method.")
+    (Constant INVALID_LOCATION       =24  "Invalid location.")
+    (Constant INVALID_FIELDID        =25  "Invalid field.")
+    (Constant INVALID_FRAMEID        =30  "Invalid jframeID.")
     (Constant NO_MORE_FRAMES         =31  "There are no more Java or JNI frames on the "
-                                          "call stack.")   
-    (Constant OPAQUE_FRAME           =32  "Information about the frame is not available.")  
+                                          "call stack.")
+    (Constant OPAQUE_FRAME           =32  "Information about the frame is not available.")
     (Constant NOT_CURRENT_FRAME      =33  "Operation can only be performed on current frame.")
     (Constant TYPE_MISMATCH          =34  "The variable is not an appropriate type for "
-                                          "the function used.")   
-    (Constant INVALID_SLOT           =35  "Invalid slot.")  
-    (Constant DUPLICATE              =40  "Item already set.")   
-    (Constant NOT_FOUND              =41  "Desired element not found.")   
-    (Constant INVALID_MONITOR        =50  "Invalid monitor.")   
-    (Constant NOT_MONITOR_OWNER      =51  "This thread doesn't own the monitor.")   
-    (Constant INTERRUPT              =52  "The call has been interrupted before completion.")   
+                                          "the function used.")
+    (Constant INVALID_SLOT           =35  "Invalid slot.")
+    (Constant DUPLICATE              =40  "Item already set.")
+    (Constant NOT_FOUND              =41  "Desired element not found.")
+    (Constant INVALID_MONITOR        =50  "Invalid monitor.")
+    (Constant NOT_MONITOR_OWNER      =51  "This thread doesn't own the monitor.")
+    (Constant INTERRUPT              =52  "The call has been interrupted before completion.")
     (Constant INVALID_CLASS_FORMAT   =60  "The virtual machine attempted to read a class "
                                           "file and determined that the file is malformed "
                                           "or otherwise cannot be interpreted as a class file.")
@@ -2985,60 +2985,60 @@
                                           "initializing a class.")
     (Constant FAILS_VERIFICATION     =62  "The verifier detected that a class file, "
                                           "though well formed, contained some sort of "
-                                          "internal inconsistency or security problem.")   
+                                          "internal inconsistency or security problem.")
     (Constant ADD_METHOD_NOT_IMPLEMENTED
-                                     =63  "Adding methods has not been implemented.")   
+                                     =63  "Adding methods has not been implemented.")
     (Constant SCHEMA_CHANGE_NOT_IMPLEMENTED
-                                     =64  "Schema change has not been implemented.")   
+                                     =64  "Schema change has not been implemented.")
     (Constant INVALID_TYPESTATE      =65  "The state of the thread has been modified, "
-                                          "and is now inconsistent.")   
+                                          "and is now inconsistent.")
     (Constant HIERARCHY_CHANGE_NOT_IMPLEMENTED
                                      =66  "A direct superclass is different for the new class "
                                           "version, or the set of directly implemented "
                                           "interfaces is different "
-                                          "and canUnrestrictedlyRedefineClasses is false.")   
+                                          "and canUnrestrictedlyRedefineClasses is false.")
     (Constant DELETE_METHOD_NOT_IMPLEMENTED
                                      =67  "The new class version does not declare a method "
                                           "declared in the old class version "
-                                          "and canUnrestrictedlyRedefineClasses is false.")   
+                                          "and canUnrestrictedlyRedefineClasses is false.")
     (Constant UNSUPPORTED_VERSION    =68  "A class file has a version number not supported "
-                                          "by this VM.")   
+                                          "by this VM.")
     (Constant NAMES_DONT_MATCH       =69  "The class name defined in the new class file is "
-                                          "different from the name in the old class object.")   
-    (Constant CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED 
+                                          "different from the name in the old class object.")
+    (Constant CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED
                                      =70  "The new class version has different modifiers and "
-                                          "and canUnrestrictedlyRedefineClasses is false.")   
+                                          "and canUnrestrictedlyRedefineClasses is false.")
     (Constant METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED
                                      =71  "A method in the new class version has "
                                           "different modifiers "
                                           "than its counterpart in the old class version and "
-                                          "and canUnrestrictedlyRedefineClasses is false.")   
+                                          "and canUnrestrictedlyRedefineClasses is false.")
     (Constant NOT_IMPLEMENTED        =99  "The functionality is not implemented in "
                                           "this virtual machine.")
-    (Constant NULL_POINTER           =100 "Invalid pointer.")   
-    (Constant ABSENT_INFORMATION     =101 "Desired information is not available.")   
-    (Constant INVALID_EVENT_TYPE     =102 "The specified event type id is not recognized.")   
-    (Constant ILLEGAL_ARGUMENT       =103 "Illegal argument.")   
+    (Constant NULL_POINTER           =100 "Invalid pointer.")
+    (Constant ABSENT_INFORMATION     =101 "Desired information is not available.")
+    (Constant INVALID_EVENT_TYPE     =102 "The specified event type id is not recognized.")
+    (Constant ILLEGAL_ARGUMENT       =103 "Illegal argument.")
     (Constant OUT_OF_MEMORY          =110 "The function needed to allocate memory and "
-                                          "no more memory was available for allocation.")   
+                                          "no more memory was available for allocation.")
     (Constant ACCESS_DENIED          =111 "Debugging has not been enabled in this "
-                                          "virtual machine. JVMTI cannot be used.")   
-    (Constant VM_DEAD                =112 "The virtual machine is not running.")   
-    (Constant INTERNAL               =113 "An unexpected internal error has occurred.")   
+                                          "virtual machine. JVMTI cannot be used.")
+    (Constant VM_DEAD                =112 "The virtual machine is not running.")
+    (Constant INTERNAL               =113 "An unexpected internal error has occurred.")
     (Constant UNATTACHED_THREAD      =115 "The thread being used to call this function "
                                           "is not attached to the virtual machine. "
-                                          "Calls must be made from attached threads.")   
-    (Constant INVALID_TAG            =500 "object type id or class tag.")  
-    (Constant ALREADY_INVOKING       =502 "Previous invoke not complete.")   
-    (Constant INVALID_INDEX          =503 "Index is invalid.")   
-    (Constant INVALID_LENGTH         =504 "The length is invalid.")   
-    (Constant INVALID_STRING         =506 "The string is invalid.")   
-    (Constant INVALID_CLASS_LOADER   =507 "The class loader is invalid.")   
-    (Constant INVALID_ARRAY          =508 "The array is invalid.")   
-    (Constant TRANSPORT_LOAD         =509 "Unable to load the transport.")   
+                                          "Calls must be made from attached threads.")
+    (Constant INVALID_TAG            =500 "object type id or class tag.")
+    (Constant ALREADY_INVOKING       =502 "Previous invoke not complete.")
+    (Constant INVALID_INDEX          =503 "Index is invalid.")
+    (Constant INVALID_LENGTH         =504 "The length is invalid.")
+    (Constant INVALID_STRING         =506 "The string is invalid.")
+    (Constant INVALID_CLASS_LOADER   =507 "The class loader is invalid.")
+    (Constant INVALID_ARRAY          =508 "The array is invalid.")
+    (Constant TRANSPORT_LOAD         =509 "Unable to load the transport.")
     (Constant TRANSPORT_INIT         =510 "Unable to initialize the transport.")
     (Constant NATIVE_METHOD          =511  )
-    (Constant INVALID_COUNT          =512 "The count is invalid.")   
+    (Constant INVALID_COUNT          =512 "The count is invalid.")
 )
 (ConstantSet EventKind
     (Constant SINGLE_STEP            =1   )
@@ -3077,7 +3077,7 @@
 )
 
 (ConstantSet SuspendStatus
-    (Constant SUSPEND_STATUS_SUSPENDED = 0x1 )             
+    (Constant SUSPEND_STATUS_SUSPENDED = 0x1 )
 )
 (ConstantSet ClassStatus
     (Constant VERIFIED               =1  )
@@ -3086,9 +3086,9 @@
     (Constant ERROR                  =8  )
 )
 (ConstantSet TypeTag
-    (Constant CLASS=1 "ReferenceType is a class. ")             
-    (Constant INTERFACE=2 "ReferenceType is an interface. ")             
-    (Constant ARRAY=3 "ReferenceType is an array. ")             
+    (Constant CLASS=1 "ReferenceType is a class. ")
+    (Constant INTERFACE=2 "ReferenceType is an interface. ")
+    (Constant ARRAY=3 "ReferenceType is an array. ")
 )
 (ConstantSet Tag
     (Constant ARRAY = '[' "'[' - an array object (objectID size). ")
@@ -3104,39 +3104,39 @@
     (Constant BOOLEAN = 'Z' "'Z' - a boolean value (1 byte).")
     (Constant STRING = 's' "'s' - a String object (objectID size). ")
     (Constant THREAD = 't' "'t' - a Thread object (objectID size). ")
-    (Constant THREAD_GROUP = 'g' 
+    (Constant THREAD_GROUP = 'g'
         "'g' - a ThreadGroup object (objectID size). ")
-    (Constant CLASS_LOADER = 'l' 
+    (Constant CLASS_LOADER = 'l'
         "'l' - a ClassLoader object (objectID size). ")
-    (Constant CLASS_OBJECT = 'c' 
+    (Constant CLASS_OBJECT = 'c'
         "'c' - a class object object (objectID size). ")
 )
 
 (ConstantSet StepDepth
-    (Constant INTO = 0 
+    (Constant INTO = 0
         "Step into any method calls that occur before the end of the step. ")
-    (Constant OVER = 1 
+    (Constant OVER = 1
         "Step over any method calls that occur before the end of the step. ")
-    (Constant OUT = 2 
+    (Constant OUT = 2
         "Step out of the current method. ")
 )
 
 (ConstantSet StepSize
-    (Constant MIN = 0 
+    (Constant MIN = 0
         "Step by the minimum possible amount (often a bytecode instruction). ")
-    (Constant LINE = 1 
+    (Constant LINE = 1
         "Step to the next source line unless there is no line number information in which case a MIN step is done instead.")
 )
 
 (ConstantSet SuspendPolicy
-    (Constant NONE = 0 
+    (Constant NONE = 0
         "Suspend no threads when this event is encountered. ")
-    (Constant EVENT_THREAD = 1 
+    (Constant EVENT_THREAD = 1
         "Suspend the event thread when this event is encountered. ")
-    (Constant ALL = 2 
+    (Constant ALL = 2
         "Suspend all threads when this event is encountered. ")
 )
-	
+
 (ConstantSet InvokeOptions
     "The invoke options are a combination of zero or more of the following bit flags:"
     (Constant INVOKE_SINGLE_THREADED = 0x01
@@ -3144,5 +3144,3 @@
     (Constant INVOKE_NONVIRTUAL = 0x02
         "otherwise, normal virtual invoke (instance methods only)")
 )
-
-
--- a/makefiles/jprt.gmk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/jprt.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -25,22 +25,21 @@
 
 # JPRT rule to build this workspace
 
-JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
+JPRT_ARCHIVE_BUNDLE = $(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
 
-jprt_build_product:  all images
+jprt_build_product: all images
 	( $(CD) $(OUTPUTDIR)/j2sdk-image && \
-	  $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
+	$(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 jprt_build_fastdebug: fastdebug images
 	( $(CD) $(OUTPUTDIR)/j2sdk-image && \
-	  $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
+	$(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
 
-jprt_build_debug: debug images 
+jprt_build_debug: debug images
 	( $(CD) $(OUTPUTDIR)/j2sdk-image && \
-	  $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
+	$(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 #
 # Phonies to avoid accidents.
 #
 .PHONY: jprt_build_product jprt_build_fastdebug jprt_build_debug
-
--- a/makefiles/jprt.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/jprt.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -32,278 +32,223 @@
 jprt.build.flavors=product,fastdebug
 
 # Standard list of jprt build targets for this source tree
-jprt.build.targets= 						\
-    solaris_sparc_5.10-{product|fastdebug}, 			\
-    solaris_sparcv9_5.10-{product|fastdebug}, 			\
-    solaris_i586_5.10-{product|fastdebug}, 			\
-    solaris_x64_5.10-{product|fastdebug}, 			\
-    linux_i586_2.6-{product|fastdebug}, 			\
-    linux_x64_2.6-{product|fastdebug}, 				\
-    windows_i586_6.1-{product|fastdebug}, 			\
+jprt.build.targets= \
+    solaris_sparcv9_5.10-{product|fastdebug}, \
+    solaris_x64_5.10-{product|fastdebug}, \
+    linux_i586_2.6-{product|fastdebug}, \
+    linux_x64_2.6-{product|fastdebug}, \
+    windows_i586_6.1-{product|fastdebug}, \
     windows_x64_6.1-{product|fastdebug}
 
 # User can select the test set with jprt submit "-testset name" option
 jprt.my.test.set=${jprt.test.set}
 
 # Standard vm test target
-jprt.vm.default.test.targets=					\
-    solaris_sparc_5.10-product-c1-jvm98, 			\
-    solaris_sparcv9_5.10-product-c2-jvm98, 			\
-    solaris_i586_5.10-product-c1-jvm98, 			\
-    solaris_x64_5.10-product-c2-jvm98, 				\
-    linux_i586_2.6-product-{c1|c2}-jvm98, 			\
-    linux_x64_2.6-product-c2-jvm98, 				\
-    windows_i586_6.1-product-c1-jvm98, 				\
+jprt.vm.default.test.targets= \
+    solaris_sparcv9_5.10-product-c2-jvm98, \
+    solaris_x64_5.10-product-c2-jvm98, \
+    linux_i586_2.6-product-{c1|c2}-jvm98, \
+    linux_x64_2.6-product-c2-jvm98, \
+    windows_i586_6.1-product-c1-jvm98, \
     windows_x64_6.1-product-c2-jvm98
 
 # Select vm testlist to use (allow for testset to be empty too)
 jprt.vm.all.test.targets=${jprt.vm.default.test.targets}
-jprt.vm..test.targets=${jprt.vm.default.test.targets} 
-jprt.test.targets=${jprt.vm.${jprt.my.test.set}.test.targets} 
+jprt.vm..test.targets=${jprt.vm.default.test.targets}
+jprt.test.targets=${jprt.vm.${jprt.my.test.set}.test.targets}
 
 # Default jdk test targets in test/Makefile (no fastdebug & limited c2)
-jprt.make.rule.default.test.targets=				\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_beans1, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_beans1, 		\
-    solaris_i586_5.10-product-c1-jdk_beans1, 			\
-    solaris_x64_5.10-product-c2-jdk_beans1, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_beans1, 			\
-    linux_x64_2.6-product-c2-jdk_beans1, 			\
-    windows_i586_6.1-product-c1-jdk_beans1, 			\
-    windows_x64_6.1-product-c2-jdk_beans1, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_io, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_io, 			\
-    solaris_i586_5.10-product-c1-jdk_io, 			\
-    solaris_x64_5.10-product-c2-jdk_io, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_io, 			\
-    linux_x64_2.6-product-c2-jdk_io, 				\
-    windows_i586_6.1-product-c1-jdk_io, 			\
-    windows_x64_6.1-product-c2-jdk_io, 				\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_lang, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_lang, 			\
-    solaris_i586_5.10-product-c1-jdk_lang, 			\
-    solaris_x64_5.10-product-c2-jdk_lang, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_lang, 			\
-    linux_x64_2.6-product-c2-jdk_lang, 				\
-    windows_i586_6.1-product-c1-jdk_lang, 			\
-    windows_x64_6.1-product-c2-jdk_lang, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_math, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_math, 			\
-    solaris_i586_5.10-product-c1-jdk_math, 			\
-    solaris_x64_5.10-product-c2-jdk_math, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_math, 			\
-    linux_x64_2.6-product-c2-jdk_math, 				\
-    windows_i586_6.1-product-c1-jdk_math, 			\
-    windows_x64_6.1-product-c2-jdk_math, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_misc, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_misc, 			\
-    solaris_i586_5.10-product-c1-jdk_misc, 			\
-    solaris_x64_5.10-product-c2-jdk_misc, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_misc, 			\
-    linux_x64_2.6-product-c2-jdk_misc, 				\
-    windows_i586_6.1-product-c1-jdk_misc, 			\
-    windows_x64_6.1-product-c2-jdk_misc, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_net, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_net, 			\
-    solaris_i586_5.10-product-c1-jdk_net, 			\
-    solaris_x64_5.10-product-c2-jdk_net, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_net, 			\
-    linux_x64_2.6-product-c2-jdk_net, 				\
-    windows_i586_6.1-product-c1-jdk_net, 			\
-    windows_x64_6.1-product-c2-jdk_net, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_nio1, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_nio1, 			\
-    solaris_i586_5.10-product-c1-jdk_nio1, 			\
-    solaris_x64_5.10-product-c2-jdk_nio1, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_nio1, 			\
-    linux_x64_2.6-product-c2-jdk_nio1, 				\
-    windows_i586_6.1-product-c1-jdk_nio1, 			\
-    windows_x64_6.1-product-c2-jdk_nio1, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_nio2, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_nio2, 			\
-    solaris_i586_5.10-product-c1-jdk_nio2, 			\
-    solaris_x64_5.10-product-c2-jdk_nio2, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_nio2, 			\
-    linux_x64_2.6-product-c2-jdk_nio2, 				\
-    windows_i586_6.1-product-c1-jdk_nio2, 			\
-    windows_x64_6.1-product-c2-jdk_nio2, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_nio3, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_nio3, 			\
-    solaris_i586_5.10-product-c1-jdk_nio3, 			\
-    solaris_x64_5.10-product-c2-jdk_nio3, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_nio3, 			\
-    linux_x64_2.6-product-c2-jdk_nio3, 				\
-    windows_i586_6.1-product-c1-jdk_nio3, 			\
-    windows_x64_6.1-product-c2-jdk_nio3, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_security1, 		\
-    solaris_sparcv9_5.10-product-c2-jdk_security1, 		\
-    solaris_i586_5.10-product-c1-jdk_security1, 		\
-    solaris_x64_5.10-product-c2-jdk_security1, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_security1, 		\
-    linux_x64_2.6-product-c2-jdk_security1, 			\
-    windows_i586_6.1-product-c1-jdk_security1, 			\
-    windows_x64_6.1-product-c2-jdk_security1, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_text, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_text, 			\
-    solaris_i586_5.10-product-c1-jdk_text, 			\
-    solaris_x64_5.10-product-c2-jdk_text, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_text, 			\
-    linux_x64_2.6-product-c2-jdk_text, 				\
-    windows_i586_6.1-product-c1-jdk_text, 			\
-    windows_x64_6.1-product-c2-jdk_text, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_tools1, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_tools1, 		\
-    solaris_i586_5.10-product-c1-jdk_tools1, 			\
-    solaris_x64_5.10-product-c2-jdk_tools1, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_tools1, 			\
-    linux_x64_2.6-product-c2-jdk_tools1, 			\
-    windows_i586_6.1-product-c1-jdk_tools1, 			\
-    windows_x64_6.1-product-c2-jdk_tools1, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_util, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_util, 			\
-    solaris_i586_5.10-product-c1-jdk_util, 			\
-    solaris_x64_5.10-product-c2-jdk_util, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_util, 			\
-    linux_x64_2.6-product-c2-jdk_util, 				\
-    windows_i586_6.1-product-c1-jdk_util, 			\
+jprt.make.rule.default.test.targets= \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_beans1, \
+    solaris_x64_5.10-product-c2-jdk_beans1, \
+    linux_i586_2.6-product-{c1|c2}-jdk_beans1, \
+    linux_x64_2.6-product-c2-jdk_beans1, \
+    windows_i586_6.1-product-c1-jdk_beans1, \
+    windows_x64_6.1-product-c2-jdk_beans1, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_io, \
+    solaris_x64_5.10-product-c2-jdk_io, \
+    linux_i586_2.6-product-{c1|c2}-jdk_io, \
+    linux_x64_2.6-product-c2-jdk_io, \
+    windows_i586_6.1-product-c1-jdk_io, \
+    windows_x64_6.1-product-c2-jdk_io, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_lang, \
+    solaris_x64_5.10-product-c2-jdk_lang, \
+    linux_i586_2.6-product-{c1|c2}-jdk_lang, \
+    linux_x64_2.6-product-c2-jdk_lang, \
+    windows_i586_6.1-product-c1-jdk_lang, \
+    windows_x64_6.1-product-c2-jdk_lang, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_math, \
+    solaris_x64_5.10-product-c2-jdk_math, \
+    linux_i586_2.6-product-{c1|c2}-jdk_math, \
+    linux_x64_2.6-product-c2-jdk_math, \
+    windows_i586_6.1-product-c1-jdk_math, \
+    windows_x64_6.1-product-c2-jdk_math, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_misc, \
+    solaris_x64_5.10-product-c2-jdk_misc, \
+    linux_i586_2.6-product-{c1|c2}-jdk_misc, \
+    linux_x64_2.6-product-c2-jdk_misc, \
+    windows_i586_6.1-product-c1-jdk_misc, \
+    windows_x64_6.1-product-c2-jdk_misc, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_net, \
+    solaris_x64_5.10-product-c2-jdk_net, \
+    linux_i586_2.6-product-{c1|c2}-jdk_net, \
+    linux_x64_2.6-product-c2-jdk_net, \
+    windows_i586_6.1-product-c1-jdk_net, \
+    windows_x64_6.1-product-c2-jdk_net, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_nio1, \
+    solaris_x64_5.10-product-c2-jdk_nio1, \
+    linux_i586_2.6-product-{c1|c2}-jdk_nio1, \
+    linux_x64_2.6-product-c2-jdk_nio1, \
+    windows_i586_6.1-product-c1-jdk_nio1, \
+    windows_x64_6.1-product-c2-jdk_nio1, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_nio2, \
+    solaris_x64_5.10-product-c2-jdk_nio2, \
+    linux_i586_2.6-product-{c1|c2}-jdk_nio2, \
+    linux_x64_2.6-product-c2-jdk_nio2, \
+    windows_i586_6.1-product-c1-jdk_nio2, \
+    windows_x64_6.1-product-c2-jdk_nio2, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_nio3, \
+    solaris_x64_5.10-product-c2-jdk_nio3, \
+    linux_i586_2.6-product-{c1|c2}-jdk_nio3, \
+    linux_x64_2.6-product-c2-jdk_nio3, \
+    windows_i586_6.1-product-c1-jdk_nio3, \
+    windows_x64_6.1-product-c2-jdk_nio3, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_security1, \
+    solaris_x64_5.10-product-c2-jdk_security1, \
+    linux_i586_2.6-product-{c1|c2}-jdk_security1, \
+    linux_x64_2.6-product-c2-jdk_security1, \
+    windows_i586_6.1-product-c1-jdk_security1, \
+    windows_x64_6.1-product-c2-jdk_security1, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_text, \
+    solaris_x64_5.10-product-c2-jdk_text, \
+    linux_i586_2.6-product-{c1|c2}-jdk_text, \
+    linux_x64_2.6-product-c2-jdk_text, \
+    windows_i586_6.1-product-c1-jdk_text, \
+    windows_x64_6.1-product-c2-jdk_text, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_tools1, \
+    solaris_x64_5.10-product-c2-jdk_tools1, \
+    linux_i586_2.6-product-{c1|c2}-jdk_tools1, \
+    linux_x64_2.6-product-c2-jdk_tools1, \
+    windows_i586_6.1-product-c1-jdk_tools1, \
+    windows_x64_6.1-product-c2-jdk_tools1, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_util, \
+    solaris_x64_5.10-product-c2-jdk_util, \
+    linux_i586_2.6-product-{c1|c2}-jdk_util, \
+    linux_x64_2.6-product-c2-jdk_util, \
+    windows_i586_6.1-product-c1-jdk_util, \
     windows_x64_6.1-product-c2-jdk_util
 
 # All jdk test targets in test/Makefile (still no fastdebug & limited c2)
-jprt.make.rule.all.test.targets=    				\
-    								\
-   ${jprt.make.rule.default.test.targets}, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_awt, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_awt, 			\
-    solaris_i586_5.10-product-c1-jdk_awt, 			\
-    solaris_x64_5.10-product-c2-jdk_awt, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_awt, 			\
-    linux_x64_2.6-product-c2-jdk_awt, 				\
-    windows_i586_6.1-product-c1-jdk_awt, 			\
-    windows_x64_6.1-product-c2-jdk_awt, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_beans2, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_beans2, 		\
-    solaris_i586_5.10-product-c1-jdk_beans2, 			\
-    solaris_x64_5.10-product-c2-jdk_beans2, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_beans2, 			\
-    linux_x64_2.6-product-c2-jdk_beans2, 			\
-    windows_i586_6.1-product-c1-jdk_beans2, 			\
-    windows_x64_6.1-product-c2-jdk_beans2, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_beans3, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_beans3, 		\
-    solaris_i586_5.10-product-c1-jdk_beans3, 			\
-    solaris_x64_5.10-product-c2-jdk_beans3, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_beans3, 			\
-    linux_x64_2.6-product-c2-jdk_beans3, 			\
-    windows_i586_6.1-product-c1-jdk_beans3, 			\
-    windows_x64_6.1-product-c2-jdk_beans3, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_management1, 		\
-    solaris_sparcv9_5.10-product-c2-jdk_management1, 		\
-    solaris_i586_5.10-product-c1-jdk_management1, 		\
-    solaris_x64_5.10-product-c2-jdk_management1, 		\
-    linux_i586_2.6-product-{c1|c2}-jdk_management1, 		\
-    linux_x64_2.6-product-c2-jdk_management1, 			\
-    windows_i586_6.1-product-c1-jdk_management1, 		\
-    windows_x64_6.1-product-c2-jdk_management1, 		\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_management2, 		\
-    solaris_sparcv9_5.10-product-c2-jdk_management2, 		\
-    solaris_i586_5.10-product-c1-jdk_management2, 		\
-    solaris_x64_5.10-product-c2-jdk_management2, 		\
-    linux_i586_2.6-product-{c1|c2}-jdk_management2, 		\
-    linux_x64_2.6-product-c2-jdk_management2, 			\
-    windows_i586_6.1-product-c1-jdk_management2, 		\
-    windows_x64_6.1-product-c2-jdk_management2, 		\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_rmi, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_rmi, 			\
-    solaris_i586_5.10-product-c1-jdk_rmi, 			\
-    solaris_x64_5.10-product-c2-jdk_rmi, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_rmi, 			\
-    linux_x64_2.6-product-c2-jdk_rmi, 				\
-    windows_i586_6.1-product-c1-jdk_rmi, 			\
-    windows_x64_6.1-product-c2-jdk_rmi, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_security2, 		\
-    solaris_sparcv9_5.10-product-c2-jdk_security2, 		\
-    solaris_i586_5.10-product-c1-jdk_security2, 		\
-    solaris_x64_5.10-product-c2-jdk_security2, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_security2, 		\
-    linux_x64_2.6-product-c2-jdk_security2, 			\
-    windows_i586_6.1-product-c1-jdk_security2, 			\
-    windows_x64_6.1-product-c2-jdk_security2, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_security3, 		\
-    solaris_sparcv9_5.10-product-c2-jdk_security3, 		\
-    solaris_i586_5.10-product-c1-jdk_security3, 		\
-    solaris_x64_5.10-product-c2-jdk_security3, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_security3, 		\
-    linux_x64_2.6-product-c2-jdk_security3, 			\
-    windows_i586_6.1-product-c1-jdk_security3, 			\
-    windows_x64_6.1-product-c2-jdk_security3, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_sound, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_sound, 			\
-    solaris_i586_5.10-product-c1-jdk_sound, 			\
-    solaris_x64_5.10-product-c2-jdk_sound, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_sound, 			\
-    linux_x64_2.6-product-c2-jdk_sound, 			\
-    windows_i586_6.1-product-c1-jdk_sound, 			\
-    windows_x64_6.1-product-c2-jdk_sound, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_swing, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_swing, 			\
-    solaris_i586_5.10-product-c1-jdk_swing, 			\
-    solaris_x64_5.10-product-c2-jdk_swing, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_swing, 			\
-    linux_x64_2.6-product-c2-jdk_swing, 			\
-    windows_i586_6.1-product-c1-jdk_swing, 			\
-    windows_x64_6.1-product-c2-jdk_swing, 			\
-    								\
-    solaris_sparc_5.10-product-c1-jdk_tools2, 			\
-    solaris_sparcv9_5.10-product-c2-jdk_tools2, 		\
-    solaris_i586_5.10-product-c1-jdk_tools2, 			\
-    solaris_x64_5.10-product-c2-jdk_tools2, 			\
-    linux_i586_2.6-product-{c1|c2}-jdk_tools2, 			\
-    linux_x64_2.6-product-c2-jdk_tools2, 			\
-    windows_i586_6.1-product-c1-jdk_tools2, 			\
+jprt.make.rule.all.test.targets= \
+    \
+   ${jprt.make.rule.default.test.targets}, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_awt, \
+    solaris_x64_5.10-product-c2-jdk_awt, \
+    linux_i586_2.6-product-{c1|c2}-jdk_awt, \
+    linux_x64_2.6-product-c2-jdk_awt, \
+    windows_i586_6.1-product-c1-jdk_awt, \
+    windows_x64_6.1-product-c2-jdk_awt, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_beans2, \
+    solaris_x64_5.10-product-c2-jdk_beans2, \
+    linux_i586_2.6-product-{c1|c2}-jdk_beans2, \
+    linux_x64_2.6-product-c2-jdk_beans2, \
+    windows_i586_6.1-product-c1-jdk_beans2, \
+    windows_x64_6.1-product-c2-jdk_beans2, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_beans3, \
+    solaris_x64_5.10-product-c2-jdk_beans3, \
+    linux_i586_2.6-product-{c1|c2}-jdk_beans3, \
+    linux_x64_2.6-product-c2-jdk_beans3, \
+    windows_i586_6.1-product-c1-jdk_beans3, \
+    windows_x64_6.1-product-c2-jdk_beans3, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_management1, \
+    solaris_x64_5.10-product-c2-jdk_management1, \
+    linux_i586_2.6-product-{c1|c2}-jdk_management1, \
+    linux_x64_2.6-product-c2-jdk_management1, \
+    windows_i586_6.1-product-c1-jdk_management1, \
+    windows_x64_6.1-product-c2-jdk_management1, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_management2, \
+    solaris_x64_5.10-product-c2-jdk_management2, \
+    linux_i586_2.6-product-{c1|c2}-jdk_management2, \
+    linux_x64_2.6-product-c2-jdk_management2, \
+    windows_i586_6.1-product-c1-jdk_management2, \
+    windows_x64_6.1-product-c2-jdk_management2, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_rmi, \
+    solaris_x64_5.10-product-c2-jdk_rmi, \
+    linux_i586_2.6-product-{c1|c2}-jdk_rmi, \
+    linux_x64_2.6-product-c2-jdk_rmi, \
+    windows_i586_6.1-product-c1-jdk_rmi, \
+    windows_x64_6.1-product-c2-jdk_rmi, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_security2, \
+    solaris_x64_5.10-product-c2-jdk_security2, \
+    linux_i586_2.6-product-{c1|c2}-jdk_security2, \
+    linux_x64_2.6-product-c2-jdk_security2, \
+    windows_i586_6.1-product-c1-jdk_security2, \
+    windows_x64_6.1-product-c2-jdk_security2, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_security3, \
+    solaris_x64_5.10-product-c2-jdk_security3, \
+    linux_i586_2.6-product-{c1|c2}-jdk_security3, \
+    linux_x64_2.6-product-c2-jdk_security3, \
+    windows_i586_6.1-product-c1-jdk_security3, \
+    windows_x64_6.1-product-c2-jdk_security3, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_sound, \
+    solaris_x64_5.10-product-c2-jdk_sound, \
+    linux_i586_2.6-product-{c1|c2}-jdk_sound, \
+    linux_x64_2.6-product-c2-jdk_sound, \
+    windows_i586_6.1-product-c1-jdk_sound, \
+    windows_x64_6.1-product-c2-jdk_sound, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_swing, \
+    solaris_x64_5.10-product-c2-jdk_swing, \
+    linux_i586_2.6-product-{c1|c2}-jdk_swing, \
+    linux_x64_2.6-product-c2-jdk_swing, \
+    windows_i586_6.1-product-c1-jdk_swing, \
+    windows_x64_6.1-product-c2-jdk_swing, \
+    \
+    solaris_sparcv9_5.10-product-c2-jdk_tools2, \
+    solaris_x64_5.10-product-c2-jdk_tools2, \
+    linux_i586_2.6-product-{c1|c2}-jdk_tools2, \
+    linux_x64_2.6-product-c2-jdk_tools2, \
+    windows_i586_6.1-product-c1-jdk_tools2, \
     windows_x64_6.1-product-c2-jdk_tools2
 
 # JCK test targets in test/Makefile (no fastdebug & limited c2, windows broken)
-jprt.my.jck.test.target.set=					\
-    solaris_sparc_5.10-product-c1-JCK7TESTRULE, 		\
-    solaris_sparcv9_5.10-product-c2-JCK7TESTRULE, 		\
-    solaris_i586_5.10-product-c1-JCK7TESTRULE, 			\
-    solaris_x64_5.10-product-c2-JCK7TESTRULE, 			\
-    linux_i586_2.6-product-c1-JCK7TESTRULE, 			\
+jprt.my.jck.test.target.set= \
+    solaris_sparcv9_5.10-product-c2-JCK7TESTRULE, \
+    solaris_x64_5.10-product-c2-JCK7TESTRULE, \
+    linux_i586_2.6-product-c1-JCK7TESTRULE, \
     linux_x64_2.6-product-c2-JCK7TESTRULE
 
 # JCK testset targets (e.g. jprt submit -testset jck ... )
-jprt.make.rule.jck.test.targets=				\
-    ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7devtools},   \
-    ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7runtime},    \
+jprt.make.rule.jck.test.targets= \
+    ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7devtools}, \
+    ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7runtime}, \
     ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7compiler}
 
 # Select list to use (allow for testset to be empty too)
-jprt.make.rule..test.targets=${jprt.make.rule.default.test.targets} 
-jprt.make.rule.test.targets=${jprt.make.rule.${jprt.my.test.set}.test.targets} 
+jprt.make.rule..test.targets=${jprt.make.rule.default.test.targets}
+jprt.make.rule.test.targets=${jprt.make.rule.${jprt.my.test.set}.test.targets}
 
 # Directories to be excluded from the source bundles
 jprt.bundle.exclude.src.dirs=build dist webrev
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/lib/Awt2dLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,1527 @@
+#
+# 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
+# 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.
+#
+
+# Openwin is defined on Solaris.
+OPENWIN_LIB := $(OPENWIN_HOME)/lib
+
+WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
+
+##########################################################################################
+
+BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib
+BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
+    -I$(BUILD_LIBMLIB_SRC) \
+    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/medialib
+
+BUILD_LIBMLIB_LDLIBS :=
+BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmlib_image/mapfile-vers
+
+BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
+
+ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
+  BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
+endif
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
+    LIBRARY := mlib_image, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(BUILD_LIBMLIB_SRC), \
+    EXCLUDE_FILES := awt_ImagingLib.c mlib_c_ImageBlendTable.c, \
+    LANG := C, \
+    OPTIMIZATION := HIGHEST, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        $(BUILD_LIBMLIB_CFLAGS), \
+    MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX := $(BUILD_LIBMLIB_LDLIBS) \
+        $(LDFLAGS_JDKLIB_SUFFIX), \
+    LDFLAGS_SUFFIX_solaris := -lc, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=mlib_image.dll" \
+        -D "JDK_INTERNAL_NAME=mlib_image" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBMLIB_IMAGE): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
+
+  BUILD_LIBMLIB_IMAGE_V_FILES := \
+      mlib_v_ImageLookUp.c \
+      mlib_ImageCreate.c \
+      mlib_ImageAffine.c \
+      mlib_ImageConvMxN.c \
+      mlib_ImageConvKernelConvert.c \
+      mlib_sys.c \
+      mlib_ImageLookUp_64.c \
+      mlib_ImageLookUp_Bit.c \
+      mlib_ImageColorTrue2Index.c \
+      mlib_c_ImageThresh1_U8.c \
+      mlib_v_ImageLookUpS16S16Func.c \
+      mlib_v_ImageLookUpS16S32Func.c \
+      mlib_v_ImageLookUpS16U16Func.c \
+      mlib_v_ImageLookUpS16U8Func.c \
+      mlib_v_ImageLookUpS32S16Func.c \
+      mlib_v_ImageLookUpS32S32Func.c \
+      mlib_v_ImageLookUpS32U16Func.c \
+      mlib_v_ImageLookUpS32U8Func.c \
+      mlib_v_ImageLookUpSIS16S16Func.c \
+      mlib_v_ImageLookUpSIS16S32Func.c \
+      mlib_v_ImageLookUpSIS16U16Func.c \
+      mlib_v_ImageLookUpSIS16U8Func.c \
+      mlib_v_ImageLookUpSIS32S16Func.c \
+      mlib_v_ImageLookUpSIS32S32Func.c \
+      mlib_v_ImageLookUpSIS32U16Func.c \
+      mlib_v_ImageLookUpSIS32U8Func.c \
+      mlib_v_ImageLookUpSIU16S16Func.c \
+      mlib_v_ImageLookUpSIU16S32Func.c \
+      mlib_v_ImageLookUpSIU16U16Func.c \
+      mlib_v_ImageLookUpSIU16U8Func.c \
+      mlib_v_ImageLookUpSIU8S16Func.c \
+      mlib_v_ImageLookUpSIU8S32Func.c \
+      mlib_v_ImageLookUpSIU8U16Func.c \
+      mlib_v_ImageLookUpSIU8U8Func.c \
+      mlib_v_ImageLookUpU16S16Func.c \
+      mlib_v_ImageLookUpU16S32Func.c \
+      mlib_v_ImageLookUpU16U16Func.c \
+      mlib_v_ImageLookUpU16U8Func.c \
+      mlib_v_ImageLookUpU8S16Func.c \
+      mlib_v_ImageLookUpU8S32Func.c \
+      mlib_v_ImageLookUpU8U16Func.c \
+      mlib_v_ImageLookUpU8U8Func.c \
+      mlib_v_ImageAffineIndex_BC.c \
+      mlib_v_ImageAffine_BC.c \
+      mlib_v_ImageAffine_BC_S16.c \
+      mlib_v_ImageAffine_BC_U16.c \
+      mlib_v_ImageAffine_BL.c \
+      mlib_v_ImageAffine_BL_S16.c \
+      mlib_v_ImageAffine_BL_U16.c \
+      mlib_v_ImageAffine_NN.c \
+      mlib_v_ImageFilters.c \
+      mlib_ImageAffineEdge.c \
+      mlib_ImageAffine_BC_D64.c \
+      mlib_ImageAffine_BC_F32.c \
+      mlib_ImageAffine_BC_S32.c \
+      mlib_ImageAffine_BL_D64.c \
+      mlib_ImageAffine_BL_F32.c \
+      mlib_ImageAffine_BL_S32.c \
+      mlib_ImageAffine_NN.c \
+      mlib_ImageAffine_NN_Bit.c \
+      mlib_ImageFilters.c \
+      mlib_ImageScanPoly.c \
+      mlib_ImageConv_8nw.c \
+      mlib_ImageConv_8ext.c \
+      mlib_ImageConv_16nw.c \
+      mlib_ImageConv_16ext.c \
+      mlib_ImageConv_u16nw.c \
+      mlib_ImageConv_u16ext.c \
+      mlib_ImageConv_32nw.c \
+      mlib_ImageConv_F32nw.c \
+      mlib_ImageConvMxN_Fp.c \
+      mlib_ImageConvMxN_ext.c \
+      mlib_ImageConv_D64nw.c \
+      mlib_ImageClipping.c \
+      mlib_ImageConvCopyEdge_Bit.c \
+      mlib_ImageConvClearEdge_Bit.c \
+      mlib_ImageConv2x2_f.c \
+      mlib_ImageConvClearEdge_Fp.c \
+      mlib_v_ImageConvMxN_8.c \
+      mlib_v_ImageConvClearEdge.c \
+      mlib_v_ImageConvCopyEdge.c \
+      mlib_v_ImageConvMxN_8ext.c \
+      mlib_v_ImageConvVersion.c \
+      mlib_v_ImageConv_8nw.c \
+      mlib_ImageConvCopyEdge_Fp.c \
+      mlib_v_ImageChannelInsert_1.c \
+      mlib_v_ImageChannelExtract_43.c \
+      mlib_v_ImageChannelExtract_1.c \
+      mlib_ImageCopy_Bit.c \
+      mlib_v_ImageCopy_f.c \
+      mlib_ImageUtils.c \
+      mlib_ImageDivTables.c
+
+  BUILD_LIBMLIB_V_CFLAGS := $(filter-out -DMLIB_NO_LIBSUNMATH, $(BUILD_LIBMLIB_CFLAGS))
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V, \
+      LIBRARY := mlib_image_v, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
+          $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib, \
+      LANG := C, \
+      INCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_FILES), \
+      OPTIMIZATION := HIGHEST, \
+      CFLAGS := -xarch=sparcvis \
+          $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il \
+          $(BUILD_LIBMLIB_V_CFLAGS) \
+          $(CFLAGS_JDKLIB), \
+      MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX_solaris := -lc, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image_v, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
+
+  BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
+
+endif
+
+##########################################################################################
+
+LIBAWT_DIRS := \
+    $(JDK_TOPDIR)/src/share/native/sun/awt \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/image \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/utility \
+    $(JDK_TOPDIR)/src/share/native/sun/java2d \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
+    $(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+    $(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/image \
+    $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
+    $(JDK_TOPDIR)/src/share/native/sun/font
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBAWT_DIRS += \
+      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
+      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
+      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/d3d
+else
+  LIBAWT_DIRS += \
+      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11
+endif
+
+LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
+    $(X_CFLAGS) \
+    $(foreach dir, $(LIBAWT_DIRS), -I$(dir))
+
+LIBAWT_FILES := \
+    gifdecoder.c \
+    imageInitIDs.c \
+    img_globals.c \
+    SurfaceData.c \
+    Region.c \
+    BufImgSurfaceData.c \
+    Disposer.c \
+    Trace.c \
+    GraphicsPrimitiveMgr.c \
+    Blit.c \
+    BlitBg.c \
+    ScaledBlit.c \
+    FillRect.c \
+    FillSpans.c \
+    FillParallelogram.c \
+    DrawParallelogram.c \
+    DrawLine.c \
+    DrawRect.c \
+    DrawPolygons.c \
+    DrawPath.c \
+    FillPath.c \
+    ProcessPath.c \
+    MaskBlit.c \
+    MaskFill.c \
+    TransformHelper.c \
+    AlphaMath.c \
+    AlphaMacros.c \
+    AnyByte.c \
+    ByteBinary1Bit.c \
+    ByteBinary2Bit.c \
+    ByteBinary4Bit.c \
+    ByteIndexed.c \
+    ByteGray.c \
+    Index8Gray.c \
+    Index12Gray.c \
+    AnyShort.c \
+    Ushort555Rgb.c \
+    Ushort565Rgb.c \
+    Ushort4444Argb.c \
+    Ushort555Rgbx.c \
+    UshortGray.c \
+    UshortIndexed.c \
+    Any3Byte.c \
+    ThreeByteBgr.c \
+    AnyInt.c \
+    IntArgb.c \
+    IntArgbPre.c \
+    IntArgbBm.c \
+    IntRgb.c \
+    IntBgr.c \
+    IntRgbx.c \
+    Any4Byte.c \
+    FourByteAbgr.c \
+    FourByteAbgrPre.c \
+    BufferedMaskBlit.c \
+    BufferedRenderPipe.c \
+    ShapeSpanIterator.c \
+    SpanClipRenderer.c \
+    awt_ImageRep.c \
+    awt_ImagingLib.c \
+    awt_Mlib.c \
+    awt_parseImage.c \
+    DataBufferNative.c \
+    dither.c \
+    debug_assert.c \
+    debug_mem.c \
+    debug_trace.c \
+    debug_util.c
+
+ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris linux))
+  LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
+  LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
+endif
+
+ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
+  LIBAWT_CFLAGS += -DMLIB_ADD_SUFF
+  LIBAWT_CFLAGS += -xarch=sparcvis
+  LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il
+  LIBAWT_CFLAGS += \
+      -I$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
+      -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/medialib \
+      -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
+
+  LIBAWT_DIRS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
+      $(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
+
+  LIBAWT_FILES += \
+      vis_FuncArray.c \
+      java2d_Mlib.c \
+      mlib_ImageCreate.c \
+      mlib_ImageZoom_NN.c \
+      mlib_ImageCopy_Bit.c \
+      mlib_sys.c \
+      mlib_v_ImageClear.c \
+      mlib_v_ImageClear_f.c \
+      mlib_v_ImageConstXor.c \
+      mlib_v_ImageCopy.c \
+      mlib_v_ImageCopy_f.c \
+      mlib_v_ImageXor.c \
+      mlib_v_ImageZoom_NN_f.c \
+      vis_Interp.c \
+      vis_AlphaMacros.c \
+      vis_AlphaMaskBlit.c \
+      vis_AlphaMaskFill.c \
+      vis_ByteGray.c \
+      vis_ByteGray_FromRgb.c \
+      vis_ByteGray_Mask.c \
+      vis_ByteIndexed.c \
+      vis_DrawLine.c \
+      vis_FourByteAbgr.c \
+      vis_IntArgb.c \
+      vis_IntArgbPre.c \
+      vis_IntArgbPre_Mask.c \
+      vis_IntBgr.c \
+      vis_IntRgb.c \
+      vis_IntRgbx.c \
+      vis_SrcMaskFill.c \
+      vis_SrcOverMaskBlit.c \
+      vis_SrcOverMaskFill.c \
+      vis_FourByteAbgrPre.c \
+      vis_GlyphList.c \
+      vis_GlyphListXor.c \
+      vis_IntArgbBm.c \
+      vis_ThreeByteBgr.c \
+      vis_UshortGray.c \
+      vis_UshortGray_FromRgb.c \
+      vis_XorBlit.c \
+      mlib_v_ImageCopy_blk.s
+
+  ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
+    LIBAWT_ASFLAGS = -P -xarch=v9a
+  else
+    LIBAWT_ASFLAGS = -P -xarch=v8plusa
+  endif
+else
+  LIBAWT_FILES += MapAccelFunc.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+  LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
+endif
+
+LIBAWT_LANG := C
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBAWT_FILES += AccelGlyphCache.c \
+      ShaderList.c \
+      CmdIDList.cpp \
+      Hashtable.cpp \
+      GDIHashtable.cpp \
+      Devices.cpp \
+      ObjectList.cpp \
+      GDIBlitLoops.cpp \
+      GDIRenderer.cpp \
+      GDIWindowSurfaceData.cpp \
+      WindowsFlags.cpp \
+      WPrinterJob.cpp \
+      awt_%.cpp \
+      D3DBlitLoops.cpp \
+      D3DBufImgOps.cpp \
+      D3DContext.cpp \
+      D3DGlyphCache.cpp \
+      D3DGraphicsDevice.cpp \
+      D3DMaskBlit.cpp \
+      D3DMaskCache.cpp \
+      D3DMaskFill.cpp \
+      D3DPipelineManager.cpp \
+      D3DPaints.cpp \
+      D3DRenderer.cpp \
+      D3DRenderQueue.cpp \
+      D3DResourceManager.cpp \
+      D3DSurfaceData.cpp \
+      D3DTextRenderer.cpp \
+      D3DVertexCacher.cpp \
+      ShellFolder2.cpp \
+      ThemeReader.cpp \
+      ComCtl32Util.cpp \
+      DllUtil.cpp \
+      initIDs.cpp \
+      MouseInfo.cpp \
+      rect.c \
+      OGLBlitLoops.c \
+      OGLBufImgOps.c \
+      OGLContext.c \
+      OGLFuncs.c \
+      OGLMaskBlit.c \
+      OGLMaskFill.c \
+      OGLPaints.c \
+      OGLRenderQueue.c \
+      OGLRenderer.c \
+      OGLSurfaceData.c \
+      OGLTextRenderer.c \
+      OGLVertexCache.c \
+      WGLGraphicsConfig.c \
+      WGLSurfaceData.c
+
+  LIBAWT_LANG := C++
+  LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
+  ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
+    LIBAWT_CFLAGS += -DMLIB_OS64BIT
+  endif
+
+  ifdef OPENJDK
+    LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/windows/resource/icons"
+  else
+    LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
+  endif
+  LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/native/sun/windows/awt.rc
+endif
+
+ifeq ($(MILESTONE), internal)
+  LIBAWT_CFLAGS += -DINTERNAL_BUILD
+endif
+
+LIBAWT_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
+ifeq ($(OPENJDK_TARGET_OS), linux)
+  LIBAWT_MAPFILE :=
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
+    LIBRARY := awt, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(LIBAWT_DIRS), \
+    INCLUDE_FILES := $(LIBAWT_FILES), \
+    LANG := $(LIBAWT_LANG), \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
+    ASFLAGS := $(LIBAWT_ASFLAGS), \
+    MAPFILE := $(LIBAWT_MAPFILE), \
+    LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_solaris := -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
+    LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
+    LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
+    LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
+        -framework Cocoa \
+        -framework OpenGL \
+        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+        -framework JavaNativeFoundation \
+        -framework JavaRuntimeSupport \
+        -framework ApplicationServices \
+        -framework AudioToolbox \
+        -ljava, \
+    LDFLAGS_SUFFIX_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
+        imm32.lib ole32.lib uuid.lib shell32.lib \
+        comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
+        delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
+        -DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
+        -DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
+        -DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
+        -DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \
+        -DELAYLOAD:comctl32.dll -DELAYLOAD:shlwapi.dll, \
+    VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
+    RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
+        -D "JDK_FNAME=awt.dll" \
+        -D "JDK_INTERNAL_NAME=awt" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBAWT): $(BUILD_LIBJAVA)
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  $(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
+endif
+
+BUILD_LIBRARIES += $(BUILD_LIBAWT)
+
+##########################################################################################
+
+# TODO!!
+# Even though this variable as a general name, it is
+# only used on macos, in fontpath.c, as prefix for where to find fonts.
+#
+# It's used for libawt_headless _and_ libawt_xawt
+#
+X11_PATH := /usr/X11R6
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  ifndef BUILD_HEADLESS_ONLY
+
+    LIBAWT_XAWT_DIRS := \
+        $(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+        $(JDK_TOPDIR)/src/share/native/sun/awt/utility \
+        $(JDK_TOPDIR)/src/share/native/sun/font \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
+        $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11 \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/xawt \
+
+    LIBAWT_XAWT_CFLAGS := -DXAWT -DXAWT_HACK \
+        -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
+        $(CUPS_CFLAGS) \
+        $(foreach dir, $(LIBAWT_XAWT_DIRS), -I$(dir)) \
+        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
+        -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+        -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
+        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga
+
+    ifeq ($(OPENJDK_TARGET_OS), solaris)
+      LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
+    endif
+
+    ifeq ($(OPENJDK_TARGET_OS), linux)
+      ifndef OPENJDK
+        include $(JDK_TOPDIR)/make/closed/xawt.gmk
+      endif
+
+      ifeq ($(DISABLE_XRENDER), true)
+        LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
+      endif
+    endif
+
+    ifeq ($(MILESTONE), internal)
+      LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
+    endif
+
+    LIBAWT_XAWT_FILES := \
+        XlibWrapper.c \
+        XWindow.c \
+        XToolkit.c \
+        X11Color.c \
+        X11SurfaceData.c \
+        awt_GraphicsEnv.c \
+        awt_InputMethod.c \
+        robot_common.c \
+        awt_Robot.c \
+        list.c \
+        multiVis.c \
+        initIDs.c \
+        awt_util.c \
+        awt_Desktop.c \
+        awt_UNIXToolkit.c \
+        X11FontScaler_md.c \
+        X11TextRenderer_md.c \
+        fontpath.c \
+        awt_Insets.c \
+        awt_Event.c \
+        X11Renderer.c \
+        X11PMBlitLoops.c \
+        OGLBlitLoops.c \
+        OGLBufImgOps.c \
+        OGLContext.c \
+        OGLFuncs.c \
+        OGLMaskBlit.c \
+        OGLMaskFill.c \
+        OGLPaints.c \
+        OGLRenderQueue.c \
+        OGLRenderer.c \
+        OGLSurfaceData.c \
+        OGLTextRenderer.c \
+        OGLVertexCache.c \
+        GLXGraphicsConfig.c \
+        GLXSurfaceData.c \
+        AccelGlyphCache.c \
+        awt_Font.c \
+        multi_font.c \
+        awt_AWTEvent.c \
+        awt_DrawingSurface.c \
+        jawt.c \
+        CUPSfuncs.c \
+        debug_assert.c \
+        debug_mem.c \
+        debug_trace.c \
+        debug_util.c \
+        awt_Plugin.c \
+        gnome_interface.c \
+        gtk2_interface.c \
+        swing_GTKEngine.c \
+        swing_GTKStyle.c \
+        rect.c \
+        sun_awt_X11_GtkFileDialogPeer.c \
+        XRSurfaceData.c \
+        XRBackendNative.c
+
+    LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
+
+    ifeq ($(OPENJDK_TARGET_OS), linux)
+      # To match old build, add this to LDFLAGS instead of suffix.
+      LIBAWT_XAWT_LDFLAGS += -lpthread
+    endif
+
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+      LIBAWT_XAWT_LDFLAGS_SUFFIX += -lpthread
+    endif
+
+    # On macosx, the shared library origin is set twice for this lib.
+    $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
+        LIBRARY := awt_xawt, \
+        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+        SRC := $(LIBAWT_XAWT_DIRS), \
+        INCLUDE_FILES := $(LIBAWT_XAWT_FILES), \
+        LANG := C, \
+        OPTIMIZATION := LOW, \
+        CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
+            $(X_CFLAGS), \
+        MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_xawt/mapfile-vers, \
+        LDFLAGS := $(LDFLAGS_JDKLIB) \
+            $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS), \
+        LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN) \
+            $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+        LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
+            -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
+            -R$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
+            -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
+            -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
+            $(call SET_SHARED_LIBRARY_ORIGIN) \
+            $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+        LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN) \
+            $(call SET_SHARED_LIBRARY_ORIGIN). \
+            $(call SET_SHARED_LIBRARY_ORIGIN) \
+            $(call SET_SHARED_LIBRARY_ORIGIN)., \
+        LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
+        VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+        RC_FLAGS := $(RC_FLAGS) \
+            -D "JDK_FNAME=xawt.dll" \
+            -D "JDK_INTERNAL_NAME=xawt" \
+            -D "JDK_FTYPE=0x2L", \
+        OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \
+        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+    $(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
+
+    $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
+
+    BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
+
+  endif
+endif
+
+##########################################################################################
+
+# TODO: Update awt lib path when awt is converted
+$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
+    LIBRARY := lcms, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
+    LANG := C, \
+    OPTIMIZATION := HIGHEST, \
+    CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
+        $(SHARED_LIBRARY_FLAGS) \
+        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug, \
+    CFLAGS_solaris := -xc99=no_lib, \
+    CFLAGS_windows := -DCMS_IS_WINDOWS_, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/liblcms/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
+    LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
+    LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
+    LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
+    LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=lcms.dll" \
+        -D "JDK_INTERNAL_NAME=lcms" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+BUILD_LIBRARIES += $(BUILD_LIBLCMS)
+
+$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
+
+##########################################################################################
+
+ifdef OPENJDK
+  BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers
+else
+  BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers-closed
+  BUILD_LIBJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
+  BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
+endif
+
+BUILD_LIBJPEG_REORDER :=
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+    BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
+  endif
+endif
+
+# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
+# or 'vfork'": this warning indicates that some variable is placed to
+# a register by optimized compiler and it's value might be lost on longjmp().
+# Recommended way to avoid such warning is to declare the variable as
+# volatile to prevent the optimization. However, this approach does not
+# work because we have to declare all variables as volatile in result.
+#ifndef CROSS_COMPILE_ARCH
+#  CC_43_OR_NEWER := \
+#      $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
+#          \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
+#  ifeq ($(CC_43_OR_NEWER), 1)
+#    BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
+#  endif
+#endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG, \
+    LIBRARY := jpeg, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(BUILD_LIBJPEG_CLOSED_SRC) \
+        $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
+    LANG := C, \
+    OPTIMIZATION := HIGHEST, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        $(BUILD_LIBJPEG_CLOSED_INCLUDES) \
+        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
+    MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
+    LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=jpeg.dll" \
+        -D "JDK_INTERNAL_NAME=jpeg" \
+        -D "JDK_FTYPE=0x2L", \
+    REORDER := $(BUILD_LIBJPEG_REORDER), \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjpeg, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBJPEG): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJPEG)
+
+##########################################################################################
+
+ifndef OPENJDK
+  FONT_HEADERS := -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k
+  BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
+  LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
+else
+  FONT_HEADERS := $(FREETYPE_CFLAGS)
+  BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
+  BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE_LIBS)
+endif
+
+LIBFONTMANAGER_OPTIMIZATION := HIGH
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
+      X11TextRenderer.c
+  LIBFONTMANAGER_OPTIMIZATION := HIGHEST
+else
+  LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
+      lcdglyph.c
+endif
+
+BUILD_LIBFONTMANAGER_CFLAGS_COMMON := \
+    $(X_CFLAGS) \
+    -DLE_STANDALONE -DHEADLESS \
+    $(FONT_HEADERS) \
+    -I$(JDK_TOPDIR)/src/share/native/sun/font \
+    -I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
+    -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
+    -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+    -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+    -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
+    -I$(JDK_TOPDIR)/src/share/native/sun/java2d
+
+# Turn off aliasing with GCC for ExtensionSubtables.cpp
+ifeq ($(OPENJDK_TARGET_OS), linux)
+  BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
+    LIBRARY := fontmanager, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/native/sun/font \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font, \
+    EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
+        AccelGlyphCache.c, \
+    LANG := C++, \
+    CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
+    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
+    OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
+    CFLAGS_windows = -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
+        -DCC_NOEX, \
+    MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
+    LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
+    LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
+    LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
+    LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
+        -ljava -ljvm, \
+    LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
+        $(WIN_AWT_LIB), \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=fontmanager.dll" \
+        -D "JDK_INTERNAL_NAME=fontmanager" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfontmanager, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
+
+ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris macosx))
+  $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_XAWT)
+endif
+
+BUILD_LIBRARIES += $(BUILD_LIBFONTMANAGER)
+
+##########################################################################################
+
+ifndef OPENJDK
+
+  #ifeq ($(OPENJDK_TARGET_OS), linux)
+  #  ifeq ("$(CC_VER_MAJOR)", "3")
+  #    OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
+  #  endif
+  #endif
+  #
+  # The resulting size of the t2k lib file is (at least on linux) dependant on the order of
+  # the input .o files. Because of this the new build will differ in size to the old build.
+  BUILD_LIBT2K_CFLAGS_COMMON := -I$(JDK_TOPDIR)/src/share/native/sun/font \
+      -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
+      -I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
+      -I$(JDK_TOPDIR)/src/share/share/native/sun/font \
+      -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
+      -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+      -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+      -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
+      -I$(JDK_TOPDIR)/src/share/native/sun/java2d
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBT2K, \
+      LIBRARY := t2k, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/font \
+          $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
+          $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints, \
+      EXCLUDE_FILES := orion.c, \
+      LANG := C++, \
+      OPTIMIZATION := HIGH, \
+      CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON), \
+      CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON), \
+      CFLAGS_windows = -DCC_NOEX, \
+      CXXFLAGS_windows = -DCC_NOEX, \
+      MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libt2k/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_windows := user32.lib $(JDK_OUTPUTDIR)/objs/libfontmanager/fontmanager.lib, \
+      LDFLAGS_SUFFIX_posix := $(LIBM) $(LIBCXX) -lfontmanager -ljava -ljvm -lc, \
+      LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=t2k.dll" \
+          -D "JDK_INTERNAL_NAME=t2k" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libt2k, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  # t2k is linked against fontmanager
+  $(BUILD_LIBT2K): $(BUILD_LIBFONTMANAGER)
+
+  BUILD_LIBRARIES += $(BUILD_LIBT2K)
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  ifeq ($(OPENJDK_TARGET_CPU), x86)
+    KERNEL32_LIB := kernel32.lib
+  endif
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
+      LIBRARY := jawt, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows, \
+      INCLUDE_FILES := jawt.cpp, \
+      LANG := C++, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CXXFLAGS_JDKLIB) \
+          -EHsc -DUNICODE -D_UNICODE \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
+          -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+          -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+          -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \
+          advapi32.lib $(WIN_AWT_LIB), \
+      LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=jawt.dll" \
+          -D "JDK_INTERNAL_NAME=jawt" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(BUILD_LIBJAWT): $(BUILD_LIBAWT)
+
+  $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
+	$(ECHO) Copying $(@F)
+	$(CP) $(JDK_OUTPUTDIR)/objs/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
+
+  BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
+
+else # OPENJDK_TARGET_OS not windows
+
+  JAWT_LIBS :=
+  ifneq ($(OPENJDK_TARGET_OS), solaris)
+    JAWT_LIBS += -lawt
+  endif
+
+  ifndef BUILD_HEADLESS_ONLY
+    JAWT_LIBS += -lawt_xawt
+  else
+    JAWT_LIBS += -lawt_headless
+    HEADLESS_CFLAG += -DHEADLESS
+  endif
+
+  JAWT_FILES := jawt.c
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    JAWT_FILES := jawt.m
+    JAWT_LIBS := -lawt_lwawt
+  endif
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
+      LIBRARY := jawt, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
+          $(JDK_TOPDIR)/src/macosx/native/sun/awt, \
+      INCLUDE_FILES := $(JAWT_FILES), \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB), \
+      CFLAGS_linux := $(HEADLESS_CFLAG), \
+      CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt, \
+      MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjawt/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
+      LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
+      LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
+      LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
+          -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  ifndef BUILD_HEADLESS_ONLY
+    $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
+  else
+    $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
+  endif
+
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
+  endif
+
+endif # OPENJDK_TARGET_OS
+
+BUILD_LIBRARIES += $(BUILD_LIBJAWT)
+
+##########################################################################################
+
+ifndef OPENJDK
+
+  BUILD_LIBKCMS_EXCLUDE_FILES :=
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    BUILD_LIBKCMS_EXCLUDE_FILES += ukcpmgr.c unixmem.c
+  else
+    BUILD_LIBKCMS_EXCLUDE_FILES += cmmdll.c registry.c spxffile.c sysinfo.c winmem.c wkcpmgr.c
+  endif
+
+  BUILD_LIBKCMS_FLAGS := $(CFLAGS_JDKLIB)
+
+  ifeq ($(OPENJDK_TARGET_OS), solaris)
+    # This particular library uses a feature called PIC_CODE_SMALL (on solaris)
+    # implement it like this...since it's only used here
+    BUILD_LIBKCMS_FLAGS := $(patsubst -KPIC, -Kpic, $(BUILD_LIBKCMS_FLAGS))
+  else ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
+    BUILD_LIBKCMS_FLAGS := $(patsubst -fPIC, -fpic, $(BUILD_LIBKCMS_FLAGS))
+  endif
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBKCMS, \
+      LIBRARY := kcms, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms, \
+      LANG := C, \
+      EXCLUDE_FILES := $(BUILD_LIBKCMS_EXCLUDE_FILES), \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(BUILD_LIBKCMS_FLAGS) \
+          -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST, \
+      CFLAGS_linux := -Wno-missing-field-initializers, \
+      MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libkcms/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX_linux := -lc -lpthread, \
+      LDFLAGS_SUFFIX_solaris := -lc, \
+      LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
+      LDFLAGS_SUFFIX_posix := -lm -ljava -ljvm, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=kcms.dll" \
+          -D "JDK_INTERNAL_NAME=kcms" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkcms, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(BUILD_LIBKCMS): $(BUILD_LIBJAVA)
+
+  BUILD_LIBRARIES += $(BUILD_LIBKCMS)
+
+endif
+
+##########################################################################################
+
+ifndef OPENJDK
+  ifeq ($(OPENJDK_TARGET_OS), solaris)
+    ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+
+      ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
+
+        SUNWJDGA_MAPFILE :=
+        ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+          SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdga/mapfile-vers
+        endif
+
+        $(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
+            LIBRARY := sunwjdga, \
+            OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+            SRC := $(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
+            LANG := C, \
+            OPTIMIZATION := LOW, \
+            CFLAGS := $(CFLAGS_JDKLIB) \
+                -I$(JDK_TOPDIR)/src/share/javavm/export \
+                -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
+                -I$(OPENWIN_HOME)/include, \
+            MAPFILE := $(SUNWJDGA_MAPFILE), \
+            LDFLAGS := $(LDFLAGS_JDKLIB) \
+                $(call SET_SHARED_LIBRARY_ORIGIN), \
+            LDFLAGS_SUFFIX := -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -ldga -lX11 $(LIBDL) -lc, \
+            OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunwjdga, \
+            DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+        BUILD_LIBRARIES += $(BUILD_LIBSUNWJDGA)
+
+      endif
+    endif
+  endif
+endif
+
+##########################################################################################
+
+ifeq ($(BUILD_HEADLESS), true)
+  ifneq ($(OPENJDK_TARGET_OS), windows)
+
+    LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/share/native/sun/font \
+        $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
+        $(JDK_TOPDIR)/src/solaris/native/sun/font \
+        $(JDK_TOPDIR)/src/solaris/native/sun/awt \
+        $(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
+        $(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
+
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+      LIBAWT_HEADLESS_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/font
+    endif
+
+    LIBAWT_HEADLESS_CFLAGS := -DHEADLESS=true \
+        -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
+        $(CUPS_CFLAGS) \
+        $(X_CFLAGS) \
+        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
+        -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+        -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
+        -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga \
+        $(foreach dir, $(LIBAWT_HEADLESS_DIRS), -I$(dir))
+
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+      LIBAWT_HEADLESS_CFLAGS += \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
+    endif
+
+    LIBAWT_HEADLESS_FILES := \
+        awt_Font.c \
+        HeadlessToolkit.c \
+        fontpath.c \
+        VDrawingArea.c \
+        X11Color.c \
+        X11Renderer.c \
+        X11PMBlitLoops.c \
+        X11SurfaceData.c \
+        X11FontScaler_md.c \
+        X11TextRenderer_md.c \
+        OGLBlitLoops.c \
+        OGLBufImgOps.c \
+        OGLContext.c \
+        OGLFuncs.c \
+        OGLMaskBlit.c \
+        OGLMaskFill.c \
+        OGLPaints.c \
+        OGLRenderQueue.c \
+        OGLRenderer.c \
+        OGLSurfaceData.c \
+        OGLTextRenderer.c \
+        OGLVertexCache.c \
+        GLXGraphicsConfig.c \
+        GLXSurfaceData.c \
+        AccelGlyphCache.c \
+        CUPSfuncs.c
+
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+      LIBAWT_HEADLESS_FILES += \
+          AWTFont.m \
+          AWTStrike.m \
+          CCharToGlyphMapper.m \
+          CGGlyphImages.m \
+          CGGlyphOutlines.m \
+          CoreTextSupport.m
+    endif
+
+    LIBAWT_HEADLESS_REORDER :=
+    ifeq ($(OPENJDK_TARGET_OS), solaris)
+      ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+        LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
+      endif
+    endif
+
+    $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
+        LIBRARY := awt_headless, \
+        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+        SRC := $(LIBAWT_HEADLESS_DIRS), \
+        INCLUDE_FILES := $(LIBAWT_HEADLESS_FILES), \
+        LANG := C, \
+        OPTIMIZATION := LOW, \
+        CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_HEADLESS_CFLAGS), \
+        MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/mapfile-vers, \
+        LDFLAGS := $(LDFLAGS_JDKLIB) \
+            $(call SET_SHARED_LIBRARY_ORIGIN), \
+        LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+        LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
+            -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
+            -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
+        LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
+        REORDER := $(LIBAWT_HEADLESS_REORDER), \
+        LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
+        LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
+        LDFLAGS_SUFFIX_macosx := -ljvm $(LIBCXX) -lawt $(LIBDL) -ljava \
+            -framework Accelerate \
+            -framework ApplicationServices \
+            -framework Cocoa \
+            -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+            -framework JavaNativeFoundation \
+            -framework JavaRuntimeSupport, \
+        OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
+        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+    $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
+
+    BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
+
+  endif
+endif
+
+##########################################################################################
+
+ifndef BUILD_HEADLESS_ONLY
+  LIBSPLASHSCREEN_DIRS := \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
+    $(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
+
+  ifeq ($(USE_EXTERNAL_LIBGIF), true)
+    GIFLIB_LDFLAGS := -lgif
+  else
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
+    GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
+  endif
+
+  ifneq ($(OPENJDK_TARGET_OS), macosx)
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
+  else
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
+  endif
+
+  LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
+      $(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
+
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
+        $(LIBSPLASHSCREEN_CFLAGS) \
+        -F/System/Library/Frameworks/JavaVM.framework/Frameworks
+    LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
+    LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
+
+    LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
+    LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
+    LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
+    LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
+    LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
+    LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
+    LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
+
+  else ifeq ($(OPENJDK_TARGET_OS), windows)
+    LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
+  else ifeq ($(OPENJDK_TARGET_OS), solaris)
+    LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+  else
+    LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
+  endif
+
+  LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
+
+  ifneq ($(USE_EXTERNAL_LIBZ), true)
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+    LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
+  endif
+
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
+        -framework ApplicationServices \
+        -framework Foundation \
+        -framework Cocoa \
+        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+        -framework JavaNativeFoundation
+  else ifeq ($(OPENJDK_TARGET_OS), windows)
+    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
+  else ifeq ($(OPENJDK_TARGET_OS), solaris)
+    # Solaris still uses OPENWIN_LIB ..
+    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
+  else	# .. all other Unixes can use X_LIBS
+    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
+  endif
+
+  $(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN, \
+      LIBRARY := splashscreen, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(LIBSPLASHSCREEN_DIRS), \
+      EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \
+      MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS), \
+      LDFLAGS_SUFFIX_solaris := -lc, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=splashscreen.dll" \
+          -D "JDK_INTERNAL_NAME=splashscreen" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsplashscreen, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(LIBSPLASHSCREEN)
+
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    $(LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
+  endif
+
+endif
+
+##########################################################################################
+
+ifndef OPENJDK
+
+  LIBDCPR_SRC_DIRS := \
+      $(JDK_TOPDIR)/src/closed/share/native/sun/dc/doe \
+      $(JDK_TOPDIR)/src/closed/share/native/sun/dc/path \
+      $(JDK_TOPDIR)/src/closed/share/native/sun/dc/pr \
+      $(JDK_TOPDIR)/src/closed/share/native/sun/dc/util
+
+  LIBDCPR_CFLAGS := $(foreach dir, $(LIBDCPR_SRC_DIRS), -I$(dir)) \
+      -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBDCPR, \
+      LIBRARY := dcpr, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(LIBDCPR_SRC_DIRS), \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          $(LIBDCPR_CFLAGS), \
+      MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdcpr/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := $(LIBM) $(LDFLAGS_JDKLIB_SUFFIX), \
+      LDFLAGS_SUFFIX_posix := -lm, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=dcpr.dll" \
+          -D "JDK_INTERNAL_NAME=dcpr" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdcpr, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(BUILD_LIBDCPR): $(BUILD_LIBJAVA)
+
+  BUILD_LIBRARIES += $(BUILD_LIBDCPR)
+
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+  LIBAWT_LWAWT_FILES := \
+      awt.m \
+      ApplicationDelegate.m \
+      CFRetainedResource.m \
+      CGLGraphicsConfig.m \
+      CGLSurfaceData.m \
+      CGLLayer.m \
+      CGraphicsConfig.m \
+      CGraphicsDevice.m \
+      CGraphicsEnv.m \
+      CCharToGlyphMapper.m \
+      CSystemColors.m \
+      AWTFont.m \
+      CGGlyphOutlines.m \
+      CGGlyphImages.m \
+      CoreTextSupport.m \
+      AWTStrike.m \
+      InitIDs.m \
+      AWTEvent.m \
+      AWTView.m \
+      AWTWindow.m \
+      AWTSurfaceLayers.m \
+      CCursorManager.m \
+      CClipboard.m \
+      CDataTransferer.m \
+      CDragSource.m \
+      CDragSourceContextPeer.m \
+      CDropTarget.m \
+      CDropTargetContextPeer.m \
+      CInputMethod.m \
+      CDesktopPeer.m \
+      OSVersion.m \
+      DnDUtilities.m \
+      CFileDialog.m \
+      CImage.m \
+      CMenu.m \
+      CMenuBar.m \
+      CMenuComponent.m \
+      CMenuItem.m \
+      CPopupMenu.m \
+      CRobot.m \
+      CTrayIcon.m \
+      CWrapper.m \
+      JavaAccessibilityAction.m \
+      JavaAccessibilityUtilities.m \
+      JavaComponentAccessibility.m \
+      JavaTextAccessibility.m \
+      LWCToolkit.m \
+      GeomUtilities.m \
+      CPrinterJob.m \
+      PrintModel.m \
+      PrinterSurfaceData.m \
+      PrinterView.m \
+      QuartzSurfaceData.m \
+      QuartzRenderer.m \
+      CTextPipe.m \
+      ImageSurfaceData.m \
+      awt_DrawingSurface.m \
+      \
+      OGLBlitLoops.c \
+      OGLBufImgOps.c \
+      OGLContext.c \
+      OGLFuncs.c \
+      OGLMaskBlit.c \
+      OGLMaskFill.c \
+      OGLPaints.c \
+      OGLRenderQueue.c \
+      OGLRenderer.c \
+      OGLSurfaceData.c \
+      OGLTextRenderer.c \
+      OGLVertexCache.c \
+      AccelGlyphCache.c \
+      CUPSfuncs.c
+
+
+  LIBAWT_LWAWT_DIRS := \
+      $(JDK_TOPDIR)/src/macosx/native/sun/awt \
+      $(JDK_TOPDIR)/src/macosx/native/sun/font \
+      $(JDK_TOPDIR)/src/macosx/native/sun/java2d/opengl \
+      $(JDK_TOPDIR)/src/solaris/native/sun/awt \
+      $(JDK_TOPDIR)/src/share/native/sun/font \
+      $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
+      LIBRARY := awt_lwawt, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(LIBAWT_LWAWT_DIRS), \
+      LANG := C, \
+      INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          $(X_CFLAGS) \
+          $(X_LIBS) \
+          $(foreach dir, $(LIBAWT_LWAWT_DIRS), -I$(dir)) \
+          -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
+          -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+          -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d \
+          -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
+          -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+          -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+          -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+          -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
+          -framework Accelerate \
+          -framework ApplicationServices \
+          -framework AudioToolbox \
+          -framework Carbon \
+          -framework Cocoa \
+          -framework Security \
+          -framework ExceptionHandling \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          -framework JavaRuntimeSupport \
+          -framework OpenGL \
+          -framework QuartzCore -ljava, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_lwawt, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
+
+  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
+
+  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
+
+  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP)
+
+  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBJAVA)
+
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \
+      LIBRARY := osxui, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/com/apple/laf, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          -I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \
+          -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
+          -I$(JDK_TOPDIR)/src/macosx/native/sun/awt \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN) \
+          -Xlinker -rpath -Xlinker @loader_path, \
+      LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \
+          -framework Cocoa \
+          -framework Carbon \
+          -framework ApplicationServices \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          -framework JavaRuntimeSupport \
+          -ljava -ljvm, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxui, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBOSXUI)
+
+  $(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
+
+  $(BUILD_LIBOSXUI): $(BUILD_LIBOSXAPP)
+
+  $(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
+
+  #$(BUILD_LIBOSXUI): $(BUILD_LIBJAVA)
+
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/lib/CoreLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,510 @@
+#
+# 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
+# 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.
+#
+
+WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/libverify/verify.lib
+
+##########################################################################################
+
+BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
+
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+  BUILD_LIBFDLIBM_OPTIMIZATION := NONE
+endif
+
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
+      STATIC_LIBRARY := fdlibm, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
+      SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
+      LANG := C, \
+      OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
+      CFLAGS_windows_debug := -DLOGGING, \
+      ARFLAGS := $(ARFLAGS), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+else
+
+  # On macosx the old build does partial (incremental) linking of fdlibm instead of
+  # a plain static library.
+  $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
+      LIBRARY := fdlibm, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
+      SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
+      LANG := C, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
+      LDFLAGS := -nostdlib -r -arch x86_64, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
+  $(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
+	$(call install-file)
+
+endif
+
+BUILD_LIBRARIES += $(BUILD_LIBFDLIBM)
+
+##########################################################################################
+
+BUILD_LIBVERIFY_SRC := check_code.c check_format.c
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+    BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU)
+  endif
+endif
+
+LIBVERIFY_OPTIMIZATION := HIGH
+ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
+  ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+    LIBVERIFY_OPTIMIZATION := LOW
+  endif
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
+    LIBRARY := verify, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/native/common, \
+    INCLUDE_FILES := $(BUILD_LIBVERIFY_SRC), \
+    LANG := C, \
+    OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
+    CFLAGS := $(CFLAGS_JDKLIB), \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_posix := -ljvm -lc, \
+    LDFLAGS_SUFFIX_windows := jvm.lib, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=verify.dll" \
+        -D "JDK_INTERNAL_NAME=verify" \
+        -D "JDK_FTYPE=0x2L", \
+    REORDER := $(BUILD_LIBVERIFY_REORDER), \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libverify, \
+    DEBUG_SYMBOLS := true))
+
+BUILD_LIBRARIES += $(BUILD_LIBVERIFY)
+
+##########################################################################################
+
+LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/lang \
+    $(JDK_TOPDIR)/src/share/native/java/lang \
+    $(JDK_TOPDIR)/src/share/native/java/lang/ref \
+    $(JDK_TOPDIR)/src/share/native/java/lang/reflect \
+    $(JDK_TOPDIR)/src/share/native/java/io \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
+    $(JDK_TOPDIR)/src/share/native/java/nio \
+    $(JDK_TOPDIR)/src/share/native/java/security \
+    $(JDK_TOPDIR)/src/share/native/common \
+    $(JDK_TOPDIR)/src/share/native/sun/misc \
+    $(JDK_TOPDIR)/src/share/native/sun/reflect \
+    $(JDK_TOPDIR)/src/share/native/java/util \
+    $(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
+
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
+else
+  LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/provider \
+      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/io
+endif
+
+LIBJAVA_CFLAGS := $(foreach dir, $(LIBJAVA_SRC_DIRS), -I$(dir)) \
+    -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
+    -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
+
+LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
+    -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
+    -DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
+     -DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"'
+
+ifneq (, $(JDK_UPDATE_VERSION))
+  LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
+endif
+
+LIBJAVA_EXCLUDE_FILES := check_code.c check_format.c jspawnhelper.c
+
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
+else
+  BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
+  BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBJAVA_EXCLUDE_FILES += \
+      UNIXProcess_md.c \
+      UnixFileSystem_md.c \
+      FileSystemPreferences.c
+else
+  LIBJAVA_EXCLUDE_FILES += \
+      ProcessImpl_md.c \
+      WinNTFileSystem_md.c \
+      dirent_md.c \
+      WindowsPreferences.c \
+      sun/security/provider/WinCAPISeedGenerator.c \
+      sun/io/Win32ErrorMode.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+    LIBJAVA_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
+  endif
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
+    LIBRARY := java, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(LIBJAVA_SRC_DIRS), \
+    EXCLUDES := fdlibm/src zip, \
+    EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
+    LANG := C, \
+    OPTIMIZATION := HIGH, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        $(LIBJAVA_CFLAGS), \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_posix := -ljvm -lverify, \
+    LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
+    LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
+    LDFLAGS_SUFFIX_macosx := -L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
+        -framework CoreFoundation \
+        -framework Foundation \
+        -framework Security -framework SystemConfiguration, \
+    LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
+        jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
+        shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
+        advapi32.lib, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=java.dll" \
+        -D "JDK_INTERNAL_NAME=java" \
+        -D "JDK_FTYPE=0x2L", \
+    REORDER := $(LIBJAVA_REORDER), \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+BUILD_LIBRARIES += $(BUILD_LIBJAVA)
+
+$(BUILD_LIBJAVA): $(LIBJLI_BINARY)
+
+$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
+
+$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
+
+##########################################################################################
+
+BUILD_LIBZIP_EXCLUDES :=
+ifeq ($(USE_EXTERNAL_LIBZ), true)
+  LIBZ := -lz
+  LIBZIP_EXCLUDES += zlib-1.2.5
+else
+  ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+endif
+
+BUILD_LIBZIP_REORDER :=
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+    BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
+  endif
+endif
+
+ifeq ($(LIBZIP_CAN_USE_MMAP), true)
+  BUILD_LIBZIP_MMAP := -DUSE_MMAP
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
+    LIBRARY := zip, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip, \
+    EXCLUDES := $(LIBZIP_EXCLUDES), \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        $(ZLIB_CPPFLAGS) \
+        -I$(JDK_TOPDIR)/src/share/native/java/io \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io, \
+    CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/mapfile-vers, \
+    REORDER := $(BUILD_LIBZIP_REORDER), \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN) \
+        $(EXPORT_ZIP_FUNCS), \
+    LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
+        -export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
+        $(WIN_JAVA_LIB), \
+    LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
+    LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
+    LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=zip.dll" \
+        -D "JDK_INTERNAL_NAME=zip" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libzip, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+
+$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBZIP)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
+    LIBRARY := unpack, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
+    EXCLUDE_FILES := main.cpp, \
+    LANG := C++, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CXXFLAGS_JDKLIB) \
+        -DNO_ZLIB -DUNPACK_JNI -DFULL, \
+    CFLAGS_release := -DPRODUCT, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
+        jvm.lib $(WIN_JAVA_LIB), \
+    LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=unpack.dll" \
+        -D "JDK_INTERNAL_NAME=unpack" \
+        -D "JDK_FTYPE=0x2L", \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBUNPACK)
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(BUILD_LIBUNPACK)
+	$(ECHO) Copying $(@F)
+	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.map, $<) $@
+
+  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(BUILD_LIBUNPACK)
+	$(ECHO) Copying $(@F)
+	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.pdb, $<) $@
+endif
+
+##########################################################################################
+
+BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin
+LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) $(foreach dir, $(BUILD_LIBJLI_SRC_DIRS), -I$(dir))
+
+BUILD_LIBJLI_FILES := \
+    java.c \
+    splashscreen_stubs.c \
+    parse_manifest.c \
+    version_comp.c \
+    wildcard.c \
+    jli_util.c
+
+ifeq ($(JVM_VARIANT_ZERO), true)
+  ERGO_FAMILY := zero
+else
+  ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
+    ERGO_FAMILY := i586
+  else
+    ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH)
+  endif
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
+  BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
+  BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
+
+  BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
+  BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  BUILD_LIBJLI_FILES += java_md.c \
+      cmdtoargs.c
+  # Staticically link with c runtime on windows.
+  LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS))
+else ifneq ($(OPENJDK_TARGET_OS), macosx)
+
+  BUILD_LIBJLI_FILES += java_md_common.c
+  BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c
+
+  ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
+
+  # if the architecture specific ergo file exists then
+  # use it, else use the generic definitions from ergo.c
+  ifneq ($(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(ERGO_ARCH_FILE)), )
+    BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
+  else # !ERGO_ARCH_FILE
+    LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
+  endif # ERGO_ARCH_FILE
+endif #WINDOWS
+
+# Append defines depending on target platform
+LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
+
+ifneq ($(USE_EXTERNAL_LIBZ), true)
+  BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+  LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
+  BUILD_LIBJLI_FILES += \
+      inflate.c \
+      inftrees.c \
+      inffast.c \
+      zadler32.c \
+      zcrc32.c \
+      zutil.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)
+else
+  LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
+    LIBRARY := jli, \
+    OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
+    SRC := $(BUILD_LIBJLI_SRC_DIRS), \
+    INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
+    LANG := C, \
+    OPTIMIZATION := HIGH, \
+    CFLAGS := $(LIBJLI_CFLAGS), \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjli/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+    LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+    LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
+    LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \
+    LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \
+    LDFLAGS_SUFFIX_macosx := $(LIBZ), \
+    LDFLAGS_SUFFIX_windows := \
+        -export:JLI_Launch \
+        -export:JLI_ManifestIterate \
+        -export:JLI_SetTraceLauncher \
+        -export:JLI_ReportErrorMessage \
+        -export:JLI_ReportErrorMessageSys \
+        -export:JLI_ReportMessage \
+        -export:JLI_ReportExceptionDescription \
+        -export:JLI_MemAlloc \
+        -export:JLI_CmdToArgs \
+        -export:JLI_GetStdArgc \
+        -export:JLI_GetStdArgs \
+        advapi32.lib \
+        comctl32.lib \
+        user32.lib, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=jli.dll" \
+        -D "JDK_INTERNAL_NAME=jli" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+BUILD_LIBRARIES += $(BUILD_LIBJLI)
+
+# On windows, the static library has the same suffix as the import library created by
+# with the shared library, so the static library is given a different name. No harm
+# in doing it for all platform to reduce complexity.
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
+      STATIC_LIBRARY := jli_static, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
+      SRC := $(BUILD_LIBJLI_SRC_DIRS), \
+      INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
+      LANG := C, \
+      OPTIMIZATION := HIGH, \
+      CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
+      ARFLAGS := $(ARFLAGS), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
+
+else ifeq ($(OPENJDK_TARGET_OS), macosx)
+  #
+  # On macosx they do partial (incremental) linking of libjli_static.a
+  # code it here...rather than add support to NativeCompilation
+  # as this is first time I see it
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
+      LIBRARY := jli_static, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
+      SRC := $(BUILD_LIBJLI_SRC_DIRS), \
+      INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
+      LANG := C, \
+      OPTIMIZATION := HIGH, \
+      CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
+      LDFLAGS := -nostdlib -r, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(JDK_OUTPUTDIR)/objs/libjli_static.a: $(BUILD_LIBJLI_STATIC)
+	$(call install-file)
+
+  BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
+endif
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBNPT, \
+    LIBRARY := npt, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        -I$(JDK_TOPDIR)/src/share/npt \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnpt/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_macosx := -liconv, \
+    LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate, \
+    LDFLAGS_SUFFIX_solaris := -lc, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=npt.dll" \
+        -D "JDK_INTERNAL_NAME=npt" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnpt, \
+    DEBUG_SYMBOLS := true))
+
+BUILD_LIBRARIES += $(BUILD_LIBNPT)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/lib/NetworkingLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,98 @@
+#
+# 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
+# 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.
+#
+
+LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/www/protocol/http/ntlm
+else
+  LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/sdp
+endif
+
+LIBNET_CFLAGS := $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
+
+LIBNET_EXCLUDE_FILES :=
+ifneq ($(OPENJDK_TARGET_OS), linux)
+  LIBNET_EXCLUDE_FILES += linux_close.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  LIBNET_EXCLUDE_FILES += bsd_close.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
+else
+  LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
+      TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
+      NTLMAuthSequence.c NetworkInterface_winXP.c
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
+    LIBRARY := net, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(LIBNET_SRC_DIRS), \
+    EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        $(LIBNET_CFLAGS), \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnet/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \
+    LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \
+    LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \
+    LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
+        delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
+        -DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=net.dll" \
+        -D "JDK_INTERNAL_NAME=net" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnet, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBNET): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBNET)
+
+$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
+	$(ECHO) $(LOG_INFO) Copying $(@F)
+	$(call install-file)
+
+COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/${OPENJDK_TARGET_OS_API_DIR}/lib/sdp/sdp.conf.template
+	$(ECHO) $(LOG_INFO) Copying $(@F)
+	$(call install-file)
+
+  COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/lib/NioLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,186 @@
+#
+# 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
+# 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.
+#
+
+BUILD_LIBNIO_SRC := \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/nio \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
+
+BUILD_LIBNIO_CFLAGS := \
+    -I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
+    -I$(JDK_TOPDIR)/src/share/native/java/io \
+    -I$(JDK_TOPDIR)/src/share/native/java/net \
+    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net
+
+BUILD_LIBNIO_FILES := \
+    DatagramChannelImpl.c \
+    DatagramDispatcher.c \
+    FileChannelImpl.c \
+    FileDispatcherImpl.c \
+    FileKey.c \
+    IOUtil.c \
+    MappedByteBuffer.c \
+    Net.c \
+    ServerSocketChannelImpl.c \
+    SocketChannelImpl.c \
+    SocketDispatcher.c
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  BUILD_LIBNIO_FILES += \
+      Iocp.c \
+      RegistryFileTypeDetector.c \
+      WindowsAsynchronousFileChannelImpl.c \
+      WindowsAsynchronousServerSocketChannelImpl.c \
+      WindowsAsynchronousSocketChannelImpl.c \
+      WindowsNativeDispatcher.c \
+      WindowsSelectorImpl.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), linux)
+  BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
+  BUILD_LIBNIO_FILES += \
+      EPoll.c \
+      EPollArrayWrapper.c \
+      EPollPort.c \
+      InheritedChannel.c \
+      NativeThread.c \
+      PollArrayWrapper.c \
+      UnixAsynchronousServerSocketChannelImpl.c \
+      UnixAsynchronousSocketChannelImpl.c \
+      GnomeFileTypeDetector.c \
+      MagicFileTypeDetector.c \
+      LinuxNativeDispatcher.c \
+      LinuxWatchService.c \
+      UnixCopyFile.c \
+      UnixNativeDispatcher.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
+  BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
+  BUILD_LIBNIO_FILES += \
+      InheritedChannel.c \
+      NativeThread.c \
+      PollArrayWrapper.c \
+      UnixAsynchronousServerSocketChannelImpl.c \
+      UnixAsynchronousSocketChannelImpl.c \
+      BsdNativeDispatcher.c \
+      MacOSXNativeDispatcher.c \
+      UnixCopyFile.c \
+      UnixNativeDispatcher.c \
+      KQueue.c \
+      KQueuePort.c \
+      KQueueArrayWrapper.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
+  BUILD_LIBNIO_FILES += \
+      DevPollArrayWrapper.c \
+      InheritedChannel.c \
+      NativeThread.c \
+      PollArrayWrapper.c \
+      SolarisEventPort.c \
+      UnixAsynchronousServerSocketChannelImpl.c \
+      UnixAsynchronousSocketChannelImpl.c \
+      GnomeFileTypeDetector.c \
+      SolarisNativeDispatcher.c \
+      SolarisWatchService.c \
+      UnixCopyFile.c \
+      UnixNativeDispatcher.c
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
+    LIBRARY := nio, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(BUILD_LIBNIO_SRC), \
+    INCLUDE_FILES := $(BUILD_LIBNIO_FILES), \
+    LANG := C, \
+    OPTIMIZATION := HIGH, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        $(BUILD_LIBNIO_CFLAGS), \
+    MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
+    LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_linux := -ljava -lnet -lpthread $(LIBDL), \
+    LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
+        -lsendfile -ljava -lnet -lc, \
+    LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
+        $(JDK_OUTPUTDIR)/objs/libnet/net.lib \
+        advapi32.lib, \
+    LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \
+    LDFLAGS_SUFFIX :=, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=nio.dll" \
+        -D "JDK_INTERNAL_NAME=nio" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnio, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+BUILD_LIBRARIES += $(BUILD_LIBNIO)
+
+$(BUILD_LIBNIO): $(BUILD_LIBNET)
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS_API), posix)
+
+  ifneq ($(OPENJDK_TARGET_OS), macosx)
+
+    # Suppress unused parameters required by exported JNI functions.
+    SCTP_WERROR := -Werror -Wno-error=unused-parameter
+    ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
+      SCTP_WERROR :=
+    endif
+
+    $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
+        LIBRARY := sctp, \
+        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+        SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch/sctp, \
+        LANG := C, \
+        OPTIMIZATION := LOW, \
+        CFLAGS := $(CFLAGS_JDKLIB) \
+            -I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
+            -I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
+            -I$(JDK_TOPDIR)/src/share/native/java/net \
+            -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
+            -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net, \
+        CFLAGS_linux := $(SCTP_WERROR), \
+        MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsctp/mapfile-vers, \
+        LDFLAGS := $(LDFLAGS_JDKLIB) \
+            $(call SET_SHARED_LIBRARY_ORIGIN), \
+        LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
+        LDFLAGS_SUFFIX_posix := -lnio -lnet, \
+        LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
+        LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
+        OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsctp, \
+        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+    BUILD_LIBRARIES += $(BUILD_LIBSCTP)
+
+    $(BUILD_LIBSCTP): $(BUILD_LIBNIO)
+  endif
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/lib/PlatformLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,283 @@
+#
+# 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
+# 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.
+#
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE, \
+      LIBRARY := AppleScriptEngine, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/apple/applescript, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          -I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := -framework Cocoa \
+          -framework Carbon \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          $(LDFLAGS_JDKLIB_SUFFIX), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA)
+
+  BUILD_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
+
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP, \
+      LIBRARY := osxapp, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
+          -I$(JDK_OUTPUTDIR)/gensrc/sun/osxapp \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX_macosx := \
+          -framework Accelerate \
+          -framework ApplicationServices \
+          -framework AudioToolbox \
+          -framework Carbon \
+          -framework Cocoa \
+          -framework Security \
+          -framework ExceptionHandling \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          -framework JavaRuntimeSupport \
+          -framework OpenGL \
+          -framework IOSurface \
+          -framework QuartzCore, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxapp, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBOSXAPP)
+
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+  LIBOSX_DIRS := \
+      $(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
+      $(JDK_TOPDIR)/src/macosx/native/java/util \
+      $(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
+      $(JDK_TOPDIR)/src/macosx/native/apple/security \
+      $(JDK_TOPDIR)/src/macosx/native/apple/launcher
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
+      LIBRARY := osx, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(LIBOSX_DIRS), \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          $(foreach dir, $(LIBOSX_DIRS), -I$(dir)) \
+          -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX_macosx := \
+          -losxapp \
+          -framework Cocoa \
+          -framework ApplicationServices \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          -framework JavaRuntimeSupport \
+          -framework Security \
+          -framework SystemConfiguration \
+          $(LDFLAGS_JDKLIB_SUFFIX), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBOSX)
+
+  $(BUILD_LIBOSX): $(BUILD_LIBOSXAPP)
+
+  $(BUILD_LIBOSX): $(BUILD_LIBJAVA)
+
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC32, \
+      LIBRARY := JObjC, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc32, \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
+          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := -fpascal-strings \
+          -fobjc-gc \
+          -gdwarf-2 \
+          $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -m32, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          -m32, \
+      LDFLAGS_SUFFIX := -framework Foundation -framework JavaVM \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          -lffi, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc32, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC64, \
+      LIBRARY := JObjC, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc64, \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
+          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := -fpascal-strings \
+          -fobjc-gc \
+          -gdwarf-2 \
+          $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          , \
+      LDFLAGS := -fpascal-strings \
+          -fobjc-gc \
+          -gdwarf-2 \
+          $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := -framework Foundation -framework JavaVM \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          -lffi, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc64, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX): $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
+	$(LIPO) -create -output $@ $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
+
+  BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX)
+
+endif
+
+##########################################################################################
+
+ifndef OPENJDK
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+
+    ACCESSBRIDGE_SRCDIR := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge
+
+    define SetupAccessBridge
+      # Parameter 1 Suffix
+      # Parameter 2 Machine
+      # Parameter 3 ACCESSBRIDGE_ARCH_ suffix
+
+      $(call SetupNativeCompilation,BUILD_JAWTACCESSBRIDGE$1, \
+          LIBRARY = JAWTAccessBridge$1, \
+          OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+          SRC := $(ACCESSBRIDGE_SRCDIR), \
+          INCLUDE_FILES := JAWTAccessBridge.cpp, \
+          LANG := C++, \
+          OPTIMIZATION := LOW, \
+          CFLAGS := $(CFLAGS_JDKLIB) \
+              -DACCESSBRIDGE_ARCH_$3, \
+          LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
+              winspool.lib jawt.lib comdlg32.lib advapi32.lib shell32.lib \
+              ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
+              -subsystem:windows -machine:$2 \
+              -def:$(ACCESSBRIDGE_SRCDIR)/JAWTAccessBridge.DEF, \
+          VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
+          RC_FLAGS := $(RC_FLAGS), \
+          OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawtaccessbridge$1, \
+          DEBUG_SYMBOLS := true)
+
+      $$(BUILD_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
+
+      $(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \
+          LIBRARY = JavaAccessBridge$1, \
+          OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+          SRC := $(ACCESSBRIDGE_SRCDIR), \
+          INCLUDE_FILES := AccessBridgeATInstance.cpp AccessBridgeDebug.cpp \
+              AccessBridgeJavaEntryPoints.cpp \
+              AccessBridgeMessages.cpp JavaAccessBridge.cpp, \
+          LANG := C++, \
+          OPTIMIZATION := LOW, \
+          CFLAGS := $(CFLAGS_JDKLIB) \
+              -DACCESSBRIDGE_ARCH_$3, \
+          LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
+              winspool.lib comdlg32.lib advapi32.lib shell32.lib \
+              ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
+              -subsystem:windows -machine:$2 \
+              -def:$(ACCESSBRIDGE_SRCDIR)/JavaAccessBridge.DEF, \
+          VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
+          RC_FLAGS := $(RC_FLAGS), \
+          OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavaaccessbridge$1, \
+          DEBUG_SYMBOLS := true)
+
+      $(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \
+          LIBRARY = WindowsAccessBridge$1, \
+          OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+          SRC := $(ACCESSBRIDGE_SRCDIR), \
+          INCLUDE_FILES := AccessBridgeJavaVMInstance.cpp AccessBridgeMessageQueue.cpp \
+              AccessBridgeMessages.cpp AccessBridgeWindowsEntryPoints.cpp \
+              WinAccessBridge.cpp AccessBridgeDebug.cpp \
+              AccessBridgeEventHandler.cpp, \
+          LANG := C++, \
+          OPTIMIZATION := LOW, \
+          CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
+              -DACCESSBRIDGE_ARCH_$3, \
+          LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
+              winspool.lib comdlg32.lib advapi32.lib shell32.lib \
+              ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
+              -subsystem:windows -machine:$2 \
+              -def:$(ACCESSBRIDGE_SRCDIR)/WinAccessBridge.DEF, \
+          VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
+          RC_FLAGS := $(RC_FLAGS), \
+          OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libwindowsaccessbridge$1, \
+          DEBUG_SYMBOLS := true)
+
+      BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \
+          $$(BUILD_WINDOWSACCESSBRIDGE$1)
+
+    endef
+
+    ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+      $(eval $(call SetupAccessBridge,-32,I386,32))
+      $(eval $(call SetupAccessBridge,,I386,LEGACY))
+    else
+      $(eval $(call SetupAccessBridge,-64,X64,64))
+    endif
+  endif
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/lib/SecurityLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,289 @@
+#
+# 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
+# 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.
+#
+
+LIBJAAS_MAPFILE :=
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+  LIBJAAS_EXCLUDE_FILES := Solaris.c
+else
+  # only on solaris...wonder why
+  LIBJAAS_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjaas/mapfile-vers
+endif
+
+LIBJAAS_NAME := jaas_unix
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBJAAS_NAME := jaas_nt
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
+    LIBRARY := $(LIBJAAS_NAME), \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/security/auth/module, \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB), \
+    MAPFILE := $(LIBJAAS_MAPFILE), \
+    LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib, \
+    LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
+    LDFLAGS_SUFFIX_solaris := -lc, \
+    EXCLUDE_FILES := $(LIBJAAS_EXCLUDE_FILES), \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
+        -D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjaas, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBJAAS): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJAAS)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
+    LIBRARY := j2pcsc, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio, \
+    LANG := C, \
+    CFLAGS_posix := -D__sun_jdk, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        -I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio/MUSCLE, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pcsc/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_posix := $(LIBDL), \
+    LDFLAGS_SUFFIX_windows := winscard.lib, \
+    LDFLAGS_SUFFIX_solaris := -lc, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=j2pcsc.dll" \
+        -D "JDK_INTERNAL_NAME=j2pcsc" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pcsc, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC)
+
+##########################################################################################
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
+      LIBRARY := j2gss, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
+          $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          -I$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
+      MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2gss/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := $(LIBDL), \
+      LDFLAGS_SUFFIX_solaris := -lc, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBJ2GSS)
+endif
+
+##########################################################################################
+
+ifneq ($(BUILD_CRYPTO), no)
+  BUILD_LIBKRB5_NAME :=
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    BUILD_LIBKRB5_NAME := w2k_lsa_auth
+    BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
+    BUILD_LIBKRB5_LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
+        gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
+        ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
+  else ifeq ($(OPENJDK_TARGET_OS), macosx)
+    BUILD_LIBKRB5_NAME := osxkrb5
+    BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5
+    BUILD_LIBKRB5_LIBS := -framework Kerberos
+  endif
+
+  ifneq ($(BUILD_LIBKRB5_NAME), )
+    $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
+        LIBRARY := $(BUILD_LIBKRB5_NAME), \
+        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+        SRC := $(BUILD_LIBKRB5_SRC), \
+        LANG := C, \
+        OPTIMIZATION := LOW, \
+        CFLAGS := $(CFLAGS_JDKLIB) \
+            -I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
+            -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5, \
+        LDFLAGS := $(LDFLAGS_JDKLIB) \
+            $(call SET_SHARED_LIBRARY_ORIGIN), \
+        LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
+        VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+        RC_FLAGS := $(RC_FLAGS) \
+            -D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
+            -D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
+            -D "JDK_FTYPE=0x2L", \
+        OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkrb5, \
+        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+    BUILD_LIBRARIES += $(BUILD_LIBKRB5)
+  endif
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI, \
+      LIBRARY := sunmscapi, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
+      LANG := C++, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=sunmscapi.dll" \
+          -D "JDK_INTERNAL_NAME=sunmscapi" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunmscapi, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
+endif
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
+    LIBRARY := j2pkcs11, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
+        $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
+        -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pkcs11/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_posix := $(LIBDL), \
+    LDFLAGS_SUFFIX_solaris := -lc, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=j2pkcs11.dll" \
+        -D "JDK_INTERNAL_NAME=j2pkcs11" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pkcs11, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+BUILD_LIBRARIES += $(BUILD_LIBJ2PKCS11)
+
+##########################################################################################
+
+ifeq ($(ENABLE_INTREE_EC), yes)
+
+  BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
+      -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
+
+  #
+  # On sol-sparc...all libraries are compiled with -xregs=no%appl
+  # (set in CFLAGS_REQUIRED_sparc)
+  #
+  # except!!! libsunec.so
+  #
+  ECC_JNI_SOLSPARC_FILTER :=
+  ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+    ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
+  endif
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
+      LIBRARY := sunec, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec \
+          $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
+      LANG := C++, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
+          $(BUILD_LIBSUNEC_FLAGS) \
+          -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
+      CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
+          $(BUILD_LIBSUNEC_FLAGS), \
+      MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsunec/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
+      LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := $(LIBCXX), \
+      LDFLAGS_SUFFIX_linux := -lc, \
+      LDFLAGS_SUFFIX_solaris := -lc, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=sunec.dll" \
+          -D "JDK_INTERNAL_NAME=sunec" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunec, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBSUNEC)
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifndef OPENJDK
+
+    $(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO, \
+        LIBRARY := j2ucrypto, \
+        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+        SRC := $(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
+        LANG := C, \
+        OPTIMIZATION := LOW, \
+        CFLAGS := $(CFLAGS_JDKLIB) \
+            -I$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
+        MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2ucrypto/mapfile-vers, \
+        LDFLAGS := $(LDFLAGS_JDKLIB), \
+        LDFLAGS_SUFFIX := $(LIBDL), \
+        LDFLAGS_SUFFIX_solaris := -lc, \
+        OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2ucrypto, \
+        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+    $(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
+
+    BUILD_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
+
+  endif
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/lib/ServiceabilityLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,431 @@
+#
+# 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
+# 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.
+#
+
+LIBATTACH_EXCLUDE_FILES :=
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+  LIBATTACH_EXCLUDE_FILES += SolarisVirtualMachine.c
+endif
+ifneq ($(OPENJDK_TARGET_OS), linux)
+  LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c
+endif
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
+    LIBRARY := attach, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tools/attach, \
+    EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB), \
+    CFLAGS_windows := /Gy, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=attach.dll" \
+        -D "JDK_INTERNAL_NAME=attach" \
+        -D "JDK_FTYPE=0x2L", \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_solaris := -ldoor, \
+    LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/makefiles/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
+    LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+    LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libattach, \
+    DEBUG_SYMBOLS := true))
+
+$(BUILD_LIBATTACH): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBATTACH)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
+    LIBRARY := dt_socket, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/transport/socket \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
+        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
+        -I$(JDK_TOPDIR)/src/share/transport/socket \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \
+        -I$(JDK_TOPDIR)/src/share/back/export \
+        -I$(JDK_TOPDIR)/src/share/back, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdt_socket/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_linux := -lpthread, \
+    LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lc, \
+    LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=dt_socket.dll" \
+        -D "JDK_INTERNAL_NAME=dt_socket" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_socket, \
+    DEBUG_SYMBOLS := true))
+
+$(BUILD_LIBDT_SOCKET): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBDT_SOCKET)
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
+      LIBRARY := dt_shmem, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
+          $(JDK_TOPDIR)/src/share/transport/shmem \
+          $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
+          -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
+          -I$(JDK_TOPDIR)/src/share/transport/shmem \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \
+          -I$(JDK_TOPDIR)/src/share/back/export, \
+      LDFLAGS := $(LDFLAGS_JDKLIB), \
+      LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
+      LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=dt_shmem.dll" \
+          -D "JDK_INTERNAL_NAME=dt_shmem" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_shmem, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  BUILD_LIBRARIES += $(BUILD_LIBDT_SHMEM)
+
+endif # OPENJDK_TARGET_OS
+
+##########################################################################################
+
+# JDWP_LOGGING causes log messages to be compiled into the library.
+$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
+    LIBRARY := jdwp, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
+        -I$(JDK_TOPDIR)/src/share/transport/export \
+        -I$(JDK_TOPDIR)/src/share/back/export \
+        -I$(JDK_TOPDIR)/src/share/npt \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
+        -I$(JDK_TOPDIR)/src/share/back \
+        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \
+        -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdwp/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_linux := $(LIBDL), \
+    LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \
+    LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=jdwp.dll" \
+        -D "JDK_INTERNAL_NAME=jdwp" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjdwp, \
+    DEBUG_SYMBOLS := true))
+
+$(BUILD_LIBJDWP): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJDWP)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
+    LIBRARY := jsdt, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace \
+        $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tracing/dtrace, \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        -I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsdt/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_linux := $(LIBDL), \
+    LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL), \
+    LDFLAGS_SUFFIX_macosx := $(LIBDL), \
+    LDFLAGS_SUFFIX_solaris := -lc, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=jsdt.dll" \
+        -D "JDK_INTERNAL_NAME=jsdt" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \
+    DEBUG_SYMBOLS := true))
+
+$(BUILD_LIBJSDT): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJSDT)
+
+##########################################################################################
+
+LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/share/instrument \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument
+
+LIBINSTRUMENT_FILES := \
+    EncodingSupport.c \
+    EncodingSupport_md.c \
+    FileSystemSupport_md.c \
+    InstrumentationImplNativeMethods.c \
+    InvocationAdapter.c \
+    JarFacade.c \
+    JPLISAgent.c \
+    JPLISAssert.c \
+    JavaExceptions.c \
+    PathCharsValidator.c \
+    Reentrancy.c \
+    Utilities.c \
+    canonicalize_md.c
+
+LIBINSTRUMENT_DIR := $(JDK_OUTPUTDIR)/objs/libinstrument
+LIBINSTRUMENT_CFLAGS := $(CFLAGS_JDKLIB) \
+    -I$(JDK_TOPDIR)/src/share/instrument \
+    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument \
+    -I$(JDK_TOPDIR)/src/share/bin
+
+LIBINSTRUMENT_LDFLAGS :=
+LIBINSTRUMENT_LDFLAGS_SUFFIX :=
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
+      -export:Agent_OnAttach advapi32.lib
+  # Statically link the C runtime so that there are not dependencies on modules
+  # not on the search patch when invoked from the Windows system directory
+  # (or elsewhere).
+  LIBINSTRUMENT_CFLAGS := $(filter-out -MD, $(LIBINSTRUMENT_CFLAGS))
+  # equivalent of strcasecmp is stricmp on Windows
+  LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
+    LIBRARY := instrument, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(LIBINSTRUMENT_SRC), \
+    INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
+    CFLAGS_debug := -DJPLIS_LOGGING, \
+    CFLAGS_release := -DNO_JPLIS_LOGGING, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libinstrument/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN) \
+        $(LIBINSTRUMENT_LDFLAGS), \
+    LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
+    LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
+    LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
+        -framework Cocoa -framework Security -framework ApplicationServices, \
+    LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
+    LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
+    LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
+    LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=instrument.dll" \
+        -D "JDK_INTERNAL_NAME=instrument" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(LIBINSTRUMENT_DIR), \
+    DEBUG_SYMBOLS := true))
+
+ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows))
+  $(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
+else
+  $(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
+endif
+$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT)
+
+##########################################################################################
+
+BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/management \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/management
+
+BUILD_LIBMANAGEMENT_EXCLUDES :=
+
+BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  BUILD_LIBMANAGEMENT_EXCLUDES += OperatingSystem_md.c
+else
+  BUILD_LIBMANAGEMENT_EXCLUDES += UnixOperatingSystem_md.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+  BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS), linux)
+  BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
+endif
+
+LIBMANAGEMENT_OPTIMIZATION := HIGH
+ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
+  ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+    LIBMANAGEMENT_OPTIMIZATION := LOW
+  endif
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
+    LIBRARY := management, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(BUILD_LIBMANAGEMENT_SRC), \
+    EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
+    LANG := C, \
+    OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
+    CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBMANAGEMENT_CFLAGS), \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmanagement/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_solaris := -lkstat, \
+    LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+    LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=management.dll" \
+        -D "JDK_INTERNAL_NAME=management" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \
+    DEBUG_SYMBOLS := true))
+
+$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBMANAGEMENT)
+
+##########################################################################################
+
+BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/hprof
+BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
+    -I$(JDK_TOPDIR)/src/share/npt \
+    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
+    -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
+
+BUILD_LIBHPROF_LDFLAGS :=
+
+LIBHPROF_OPTIMIZATION := HIGHEST
+ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
+  ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+    LIBHPROF_OPTIMIZATION := LOW
+  endif
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
+    LIBRARY := hprof, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(BUILD_LIBHPROF_SRC), \
+    LANG := C, \
+    OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        $(BUILD_LIBHPROF_CFLAGS), \
+    CFLAGS_debug := -DHPROF_LOGGING, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libhprof/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_windows := wsock32.lib winmm.lib advapi32.lib, \
+    LDFLAGS_SUFFIX_linux := $(LIBDL), \
+    LDFLAGS_SUFFIX_macosx := $(LIBDL), \
+    LDFLAGS_SUFFIX_solaris := -lsocket -lnsl $(LIBDL) -lc, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=hprof.dll" \
+        -D "JDK_INTERNAL_NAME=hprof" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libhprof_jvmti, \
+    DEBUG_SYMBOLS := true))
+
+BUILD_LIBRARIES += $(BUILD_LIBHPROF)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
+    LIBRARY := java_crw_demo, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
+    LANG := C, \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava_crw_demo/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_solaris := -lc, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=java_crw_demo.dll" \
+        -D "JDK_INTERNAL_NAME=java_crw_demo" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava_crw_demo, \
+    DEBUG_SYMBOLS := true))
+
+BUILD_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
+
+##########################################################################################
+
+ifndef OPENJDK
+  ifeq ($(ENABLE_JFR), true)
+
+    $(eval $(call SetupNativeCompilation,BUILD_LIBJFR, \
+        LIBRARY := jfr, \
+        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+        SRC := $(JDK_TOPDIR)/src/closed/share/native/oracle/jfr, \
+        LANG := C, \
+        OPTIMIZATION := LOW, \
+        CFLAGS := $(CFLAGS_JDKLIB) \
+            -I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
+        MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjfr/mapfile-vers, \
+        LDFLAGS := $(LDFLAGS_JDKLIB) \
+            $(call SET_SHARED_LIBRARY_ORIGIN), \
+        LDFLAGS_SUFFIX_solaris := -lc, \
+        VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+        RC_FLAGS := $(RC_FLAGS) \
+            -D "JDK_FNAME=jfr.dll" \
+            -D "JDK_INTERNAL_NAME=jfr" \
+            -D "JDK_FTYPE=0x2L", \
+        OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjfr, \
+        DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+    BUILD_LIBRARIES += $(BUILD_LIBJFR)
+
+  endif
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/lib/SoundLibraries.gmk	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,237 @@
+#
+# 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
+# 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.
+#
+
+LIBJSOUND_SRC_DIRS := \
+    $(JDK_TOPDIR)/src/share/native/com/sun/media/sound \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/media/sound
+
+LIBJSOUND_SRC_FILES := Utilities.c Platform.c
+
+LIBJSOUND_LANG := C
+LIBJSOUND_CFLAGS := $(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir))
+
+EXTRA_SOUND_JNI_LIBS :=
+
+LIBJSOUND_MIDIFILES := \
+    MidiInDevice.c \
+    MidiInDeviceProvider.c \
+    MidiOutDevice.c \
+    MidiOutDeviceProvider.c \
+    PlatformMidi.c
+
+# files needed for ports
+LIBJSOUND_PORTFILES := \
+    PortMixerProvider.c \
+    PortMixer.c
+
+# files needed for direct audio
+LIBJSOUND_DAUDIOFILES := \
+    DirectAudioDeviceProvider.c \
+    DirectAudioDevice.c
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  EXTRA_SOUND_JNI_LIBS += jsoundds
+  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS \
+      -DUSE_PLATFORM_MIDI_OUT=TRUE \
+      -DUSE_PLATFORM_MIDI_IN=TRUE \
+      -DUSE_PORTS=TRUE
+  LIBJSOUND_SRC_FILES += \
+      PLATFORM_API_WinOS_MidiIn.cpp \
+      PLATFORM_API_WinOS_MidiOut.c \
+      PLATFORM_API_WinOS_Util.c \
+      PLATFORM_API_WinOS_Ports.c
+  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
+  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
+endif # OPENJDK_TARGET_OS windows
+
+ifeq ($(OPENJDK_TARGET_OS), linux)
+  EXTRA_SOUND_JNI_LIBS += jsoundalsa
+  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
+endif # OPENJDK_TARGET_OS linux
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  LIBJSOUND_LANG := C++
+  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
+      -DUSE_PORTS=TRUE \
+      -DUSE_DAUDIO=TRUE \
+      -DUSE_PLATFORM_MIDI_OUT=TRUE \
+      -DUSE_PLATFORM_MIDI_IN=TRUE
+  LIBJSOUND_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/sun/media/sound
+  LIBJSOUND_SRC_FILES += \
+      PLATFORM_API_MacOSX_Utils.cpp \
+      PLATFORM_API_MacOSX_PCM.cpp \
+      PLATFORM_API_MacOSX_Ports.cpp \
+      PLATFORM_API_MacOSX_MidiIn.c \
+      PLATFORM_API_MacOSX_MidiOut.c \
+      PLATFORM_API_MacOSX_MidiUtils.c
+  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
+  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
+  LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
+endif # OPENJDK_TARGET_OS macosx
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \
+      -DUSE_PORTS=TRUE \
+      -DUSE_DAUDIO=TRUE
+  LIBJSOUND_SRC_FILES += \
+      PLATFORM_API_SolarisOS_Utils.c \
+      PLATFORM_API_SolarisOS_Ports.c \
+      PLATFORM_API_SolarisOS_PCM.c
+  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
+  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
+  LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
+endif # OPENJDK_TARGET_OS solaris
+
+
+ifeq ($(JVM_VARIANT_ZERO), true)
+  LIBJSOUND_CFLAGS += -DX_ARCH=X_ZERO
+else
+  ifeq ($(OPENJDK_TARGET_CPU), x86)
+    LIBJSOUND_CFLAGS += -DX_ARCH=X_I586
+  endif
+
+  ifeq ($(OPENJDK_TARGET_CPU), sparc)
+    LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARC
+  endif
+
+  ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
+    LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARCV9
+  endif
+
+  ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+    LIBJSOUND_CFLAGS += -DX_ARCH=X_AMD64
+  endif
+
+  ifeq ($(OPENJDK_TARGET_CPU), arm)
+    LIBJSOUND_CFLAGS += -DX_ARCH=X_ARM
+  endif
+
+  ifeq ($(OPENJDK_TARGET_CPU), ppc)
+    LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC
+  endif
+endif
+
+LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
+    LIBRARY := jsound, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(LIBJSOUND_SRC_DIRS), \
+    INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \
+    LANG := $(LIBJSOUND_LANG), \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(CFLAGS_JDKLIB) \
+        $(LIBJSOUND_CFLAGS), \
+    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsound/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_macosx := -framework CoreAudio -framework CoreFoundation \
+        -framework CoreServices -framework AudioUnit $(LIBCXX) \
+        -framework CoreMIDI -framework AudioToolbox, \
+    LDFLAGS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \
+    LDFLAGS_SUFFIX_posix := -ljava -ljvm, \
+    LDFLAGS_SUFFIX_solaris := -lc, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=jsound.dll" \
+        -D "JDK_INTERNAL_NAME=jsound" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsound, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJSOUND)
+
+##########################################################################################
+
+ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA, \
+      LIBRARY := jsoundalsa, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(LIBJSOUND_SRC_DIRS), \
+      INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
+          $(LIBJSOUND_DAUDIOFILES) \
+          PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
+          PLATFORM_API_LinuxOS_ALSA_PCM.c \
+          PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
+          PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
+          PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
+          PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
+          PLATFORM_API_LinuxOS_ALSA_Ports.c, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
+          $(LIBJSOUND_CFLAGS) \
+          -DUSE_DAUDIO=TRUE \
+          -DUSE_PORTS=TRUE \
+          -DUSE_PLATFORM_MIDI_OUT=TRUE \
+          -DUSE_PLATFORM_MIDI_IN=TRUE, \
+      MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsoundalsa/mapfile-vers, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := $(ALSA_LIBS) -ljava -ljvm, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundalsa, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
+
+  BUILD_LIBRARIES += $(BUILD_LIBJSOUNDALSA)
+
+endif
+
+##########################################################################################
+
+ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS, \
+      LIBRARY := jsoundds, \
+      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+      SRC := $(LIBJSOUND_SRC_DIRS), \
+      INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
+          PLATFORM_API_WinOS_DirectSound.cpp, \
+      LANG := C++, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          $(LIBJSOUND_CFLAGS) \
+          -DUSE_DAUDIO=TRUE, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=jsoundds.dll" \
+          -D "JDK_INTERNAL_NAME=jsoundds" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundds, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
+
+  BUILD_LIBRARIES += $(BUILD_LIBJSOUNDDS)
+
+endif
--- a/makefiles/mapfiles/libawt/mapfile-mawt-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libawt/mapfile-mawt-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -201,7 +201,7 @@
                 Java_sun_print_CUPSPrinter_initIDs;
                 Java_sun_print_CUPSPrinter_getCupsServer;
                 Java_sun_print_CUPSPrinter_getCupsPort;
-                Java_sun_print_CUPSPrinter_canConnect;	
+                Java_sun_print_CUPSPrinter_canConnect;
                 Java_sun_print_CUPSPrinter_getMedia;
                 Java_sun_print_CUPSPrinter_getPageSizes;
 
@@ -230,7 +230,7 @@
                 Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
                 Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
                 Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
-                
+
 		awt_display;
 		awt_Lock;
 		awt_Unlock;
@@ -253,7 +253,7 @@
 		getAwtLockFunctions;
 		getAwtData;
 		getAwtDisplay;
-		
+
 		# libfontmanager entry points
 		AWTIsHeadless;
 		AWTCountFonts;
@@ -282,4 +282,3 @@
 	local:
 		*;
 };
-
--- a/makefiles/mapfiles/libawt/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libawt/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -46,9 +46,9 @@
 		Java_java_awt_MenuBar_initIDs;
 		Java_java_awt_ScrollPaneAdjustable_initIDs;
 		Java_java_awt_Toolkit_initIDs;
-                Java_sun_awt_DebugSettings_setCTracingOn__Z; 
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2; 
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I; 
+                Java_sun_awt_DebugSettings_setCTracingOn__Z;
+                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
+                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
 		Java_sun_awt_image_ByteComponentRaster_initIDs;
 		Java_sun_awt_image_GifImageDecoder_initIDs;
 		Java_sun_awt_image_GifImageDecoder_parseImage;
@@ -156,7 +156,7 @@
 		colorValueID;
                 mul8table;
                 jvm;
-        
+
                 # ProcessPath entry points and data
                 doDrawPath;
                 doFillPath;
@@ -195,4 +195,3 @@
 	local:
 		*;
 };
-
--- a/makefiles/mapfiles/libawt/mapfile-vers-linux	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libawt/mapfile-vers-linux	Wed Oct 30 18:38:20 2013 +0000
@@ -47,9 +47,9 @@
 		Java_java_awt_ScrollPaneAdjustable_initIDs;
 		Java_java_awt_Toolkit_initIDs;
 		Java_java_awt_TrayIcon_initIDs;
-                Java_sun_awt_DebugSettings_setCTracingOn__Z; 
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2; 
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I; 
+                Java_sun_awt_DebugSettings_setCTracingOn__Z;
+                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
+                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
 		Java_sun_awt_image_ByteComponentRaster_initIDs;
 		Java_sun_awt_image_GifImageDecoder_initIDs;
 		Java_sun_awt_image_GifImageDecoder_parseImage;
@@ -223,8 +223,8 @@
 		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
 		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
 		Java_sun_awt_X11GraphicsEnvironment_initXRender;
-        
-        
+
+
 
 		Java_java_awt_AWTEvent_initIDs;
 		Java_java_awt_Button_initIDs;
@@ -287,7 +287,7 @@
 		getAwtLockFunctions;
 		getAwtData;
 		getAwtDisplay;
-		
+
 		# libfontmanager entry points
 		AWTIsHeadless;
 		AWTCountFonts;
@@ -314,4 +314,3 @@
 	local:
 		*;
 };
-
--- a/makefiles/mapfiles/libawt_headless/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libawt_headless/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -73,7 +73,7 @@
 		Java_sun_print_CUPSPrinter_initIDs;
 		Java_sun_print_CUPSPrinter_getCupsServer;
 		Java_sun_print_CUPSPrinter_getCupsPort;
-		Java_sun_print_CUPSPrinter_canConnect;	
+		Java_sun_print_CUPSPrinter_canConnect;
 		Java_sun_print_CUPSPrinter_getMedia;
 		Java_sun_print_CUPSPrinter_getPageSizes;
 
@@ -106,4 +106,3 @@
 	local:
 		*;
 };
-
--- a/makefiles/mapfiles/libawt_xawt/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libawt_xawt/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -439,7 +439,7 @@
 	Java_sun_print_CUPSPrinter_initIDs;
 	Java_sun_print_CUPSPrinter_getCupsServer;
 	Java_sun_print_CUPSPrinter_getCupsPort;
-	Java_sun_print_CUPSPrinter_canConnect;	
+	Java_sun_print_CUPSPrinter_canConnect;
 	Java_sun_print_CUPSPrinter_getMedia;
 	Java_sun_print_CUPSPrinter_getPageSizes;
 
--- a/makefiles/mapfiles/libfontmanager/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libfontmanager/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -28,7 +28,7 @@
 SUNWprivate_1.1 {
 	global:
                 getSunFontIDs;
-                newLayoutTableCache; 
+                newLayoutTableCache;
                 freeLayoutTableCache;
                 isNullScalerContext;
                 Java_sun_font_NullFontScaler_getNullScalerContext;
--- a/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk	Wed Oct 30 18:38:20 2013 +0000
@@ -30,7 +30,7 @@
 SUNWprivate_1.1 {
 	global:
                 getSunFontIDs;
-                newLayoutTableCache; 
+                newLayoutTableCache;
                 freeLayoutTableCache;
                 isNullScalerContext;
                 Java_sun_font_NullFontScaler_getNullScalerContext;
--- a/makefiles/mapfiles/libj2pcsc/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libj2pcsc/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -39,7 +39,7 @@
 		Java_sun_security_smartcardio_PCSC_SCardBeginTransaction;
 		Java_sun_security_smartcardio_PCSC_SCardEndTransaction;
 		Java_sun_security_smartcardio_PCSC_SCardControl;
-		
+
 	local:
 		*;
 };
--- a/makefiles/mapfiles/libjava/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libjava/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -267,7 +267,8 @@
 		Java_sun_misc_GC_maxObjectInspectionAge;
 		Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0;
 		Java_sun_reflect_NativeMethodAccessorImpl_invoke0;
-		Java_sun_reflect_Reflection_getCallerClass;
+		Java_sun_reflect_Reflection_getCallerClass__;
+		Java_sun_reflect_Reflection_getCallerClass__I;
 		Java_sun_reflect_Reflection_getClassAccessFlags;
                 Java_sun_misc_Version_getJdkVersionInfo;
                 Java_sun_misc_Version_getJdkSpecialVersion;
--- a/makefiles/mapfiles/libjava/reorder-sparc	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libjava/reorder-sparc	Wed Oct 30 18:38:20 2013 +0000
@@ -27,7 +27,8 @@
 text: .text%Java_java_io_FileDescriptor_initIDs;
 text: .text%Java_java_io_FileOutputStream_initIDs;
 text: .text%Java_java_lang_System_setIn0;
-text: .text%Java_sun_reflect_Reflection_getCallerClass;
+text: .text%Java_sun_reflect_Reflection_getCallerClass__;
+text: .text%Java_sun_reflect_Reflection_getCallerClass__I;
 text: .text%Java_java_lang_Class_forName0;
 text: .text%Java_java_lang_Object_getClass;
 text: .text%Java_sun_reflect_Reflection_getClassAccessFlags;
--- a/makefiles/mapfiles/libjava/reorder-sparcv9	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libjava/reorder-sparcv9	Wed Oct 30 18:38:20 2013 +0000
@@ -26,7 +26,8 @@
 text: .text%Java_java_io_FileDescriptor_initIDs;
 text: .text%Java_java_io_FileOutputStream_initIDs;
 text: .text%Java_java_lang_System_setIn0;
-text: .text%Java_sun_reflect_Reflection_getCallerClass;
+text: .text%Java_sun_reflect_Reflection_getCallerClass__;
+text: .text%Java_sun_reflect_Reflection_getCallerClass__I;
 text: .text%Java_java_lang_Class_forName0;
 text: .text%Java_java_lang_String_intern;
 text: .text%Java_java_lang_Float_floatToIntBits;
--- a/makefiles/mapfiles/libjava/reorder-x86	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libjava/reorder-x86	Wed Oct 30 18:38:20 2013 +0000
@@ -28,7 +28,8 @@
 text: .text%Java_java_io_FileDescriptor_initIDs;
 text: .text%Java_java_io_FileOutputStream_initIDs;
 text: .text%Java_java_lang_System_setIn0;
-text: .text%Java_sun_reflect_Reflection_getCallerClass;
+text: .text%Java_sun_reflect_Reflection_getCallerClass__;
+text: .text%Java_sun_reflect_Reflection_getCallerClass__I;
 text: .text%Java_java_lang_Class_forName0;
 text: .text%Java_java_lang_String_intern;
 text: .text%Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0;
--- a/makefiles/mapfiles/libjdga/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libjdga/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -27,7 +27,7 @@
 
 SUNWprivate_1.1 {
 	global:
-            JDgaLibInit;	
+            JDgaLibInit;
 	local:
 	    *;
 };
--- a/makefiles/mapfiles/libjli/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libjli/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -36,7 +36,7 @@
 		JLI_ReportExceptionDescription;
 		JLI_GetStdArgs;
 		JLI_GetStdArgc;
-		
+
 	local:
 		*;
 };
--- a/makefiles/mapfiles/libmanagement/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libmanagement/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -57,7 +57,7 @@
 	    Java_sun_management_GcInfoBuilder_fillGcAttributeInfo;
 	    Java_sun_management_GcInfoBuilder_getLastGcInfo0;
 	    Java_sun_management_GcInfoBuilder_getNumGcExtAttributes;
-	    Java_sun_management_HotSpotDiagnostic_dumpHeap;
+	    Java_sun_management_HotSpotDiagnostic_dumpHeap0;
 	    Java_sun_management_HotspotThread_getInternalThreadCount;
 	    Java_sun_management_HotspotThread_getInternalThreadTimes0;
 	    Java_sun_management_MemoryImpl_getMemoryManagers0;
--- a/makefiles/mapfiles/libverify/mapfile-vers	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/mapfiles/libverify/mapfile-vers	Wed Oct 30 18:38:20 2013 +0000
@@ -22,7 +22,7 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
- 
+
 SUNWprivate_1.1 {
    global:
            VerifyClass;
--- a/makefiles/profile-includes.txt	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/profile-includes.txt	Wed Oct 30 18:38:20 2013 +0000
@@ -253,4 +253,3 @@
     ext/nashorn.jar \
     ext/zipfs.jar \
     jfr.jar
-
--- a/makefiles/profile-rtjar-includes.txt	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/profile-rtjar-includes.txt	Wed Oct 30 18:38:20 2013 +0000
@@ -24,22 +24,22 @@
 #
 
 # Included or excluded types must take one of two forms
-# - *.class   to indicate all classes; or else
+# - *.class to indicate all classes; or else
 # - a full single type name e.g.
-#      com/sun/security/auth/callback/DialogCallbackHandler$$1.class
+#     com/sun/security/auth/callback/DialogCallbackHandler$$1.class
 # You can not use arbitrary wildcards like DialogCallbackHandler*.class.
 #
 # Notes:
-#  -  Nested types must use $$ in place of $ as $ is the make meta-character
-#  -  If a package is not listed in any profile's inclusion list then it will
-#     not appear in any profile. But if a package is also missing from the
-#     full JRE's inclusion list then it will still be part of the full JRE.
-#     This is because the full JRE's inclusion lists are only used to define
-#     the exclusion lists for profiles; they are not used to define the full
-#     JRE contents - that is still done with the pre-profile legacy mechanism
-#     (all packagesthat can be found, less those not intended for rt.jar).
-#     This was done to minimize the impact of profiles on the regular
-#     non-profile build.
+# - Nested types must use $$ in place of $ as $ is the make meta-character
+# - If a package is not listed in any profile's inclusion list then it will
+#   not appear in any profile. But if a package is also missing from the
+#   full JRE's inclusion list then it will still be part of the full JRE.
+#   This is because the full JRE's inclusion lists are only used to define
+#   the exclusion lists for profiles; they are not used to define the full
+#   JRE contents - that is still done with the pre-profile legacy mechanism
+#   (all packagesthat can be found, less those not intended for rt.jar).
+#   This was done to minimize the impact of profiles on the regular
+#   non-profile build.
 #
 PROFILE_1_RTJAR_INCLUDE_PACKAGES := \
     com/sun/demo/jvmti/hprof \
@@ -71,11 +71,11 @@
     sun/usagetracker \
     sun/util
 
-PROFILE_1_RTJAR_INCLUDE_TYPES := 
+PROFILE_1_RTJAR_INCLUDE_TYPES :=
 
-PROFILE_1_RTJAR_EXCLUDE_TYPES := 
+PROFILE_1_RTJAR_EXCLUDE_TYPES :=
 
-PROFILE_1_INCLUDE_METAINF_SERVICES := 
+PROFILE_1_INCLUDE_METAINF_SERVICES :=
 
 
 PROFILE_2_RTJAR_INCLUDE_PACKAGES := \
@@ -96,12 +96,12 @@
     sun/rmi \
     sun/util/xml
 
-PROFILE_2_RTJAR_INCLUDE_TYPES := 
+PROFILE_2_RTJAR_INCLUDE_TYPES :=
 
-PROFILE_2_RTJAR_EXCLUDE_TYPES := 
+PROFILE_2_RTJAR_EXCLUDE_TYPES :=
 
 PROFILE_2_INCLUDE_METAINF_SERVICES := \
-    META-INF/services/sun.util.spi.XmlPropertiesProvider 
+    META-INF/services/sun.util.spi.XmlPropertiesProvider
 
 
 PROFILE_3_RTJAR_INCLUDE_PACKAGES := \
@@ -146,7 +146,7 @@
     sun/security/smartcardio \
     sun/tracing
 
-PROFILE_3_RTJAR_INCLUDE_TYPES := 
+PROFILE_3_RTJAR_INCLUDE_TYPES :=
 
 PROFILE_3_RTJAR_EXCLUDE_TYPES := \
     com/sun/security/auth/callback/DialogCallbackHandler$$1.class \
@@ -237,22 +237,20 @@
     javax/management/remote/rmi/_RMIServer_Stub.class \
     javax/rmi/*.class
 
-FULL_JRE_RTJAR_EXCLUDE_TYPES := 
+FULL_JRE_RTJAR_EXCLUDE_TYPES :=
 
 FULL_JRE_INCLUDE_METAINF_SERVICES := \
-    META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin  \
-    META-INF/services/com.sun.tools.internal.xjc.Plugin  \
-    META-INF/services/javax.print.PrintServiceLookup  \
-    META-INF/services/javax.print.StreamPrintServiceFactory  \
-    META-INF/services/javax.sound.midi.spi.MidiDeviceProvider  \
-    META-INF/services/javax.sound.midi.spi.MidiFileReader  \
-    META-INF/services/javax.sound.midi.spi.MidiFileWriter  \
-    META-INF/services/javax.sound.midi.spi.SoundbankReader  \
-    META-INF/services/javax.sound.sampled.spi.AudioFileReader  \
-    META-INF/services/javax.sound.sampled.spi.AudioFileWriter  \
-    META-INF/services/javax.sound.sampled.spi.FormatConversionProvider  \
-    META-INF/services/javax.sound.sampled.spi.MixerProvider  \
-    META-INF/services/sun.java2d.cmm.PCMM  \
-    META-INF/services/sun.java2d.pipe.RenderingEngine 
-
-
+    META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
+    META-INF/services/com.sun.tools.internal.xjc.Plugin \
+    META-INF/services/javax.print.PrintServiceLookup \
+    META-INF/services/javax.print.StreamPrintServiceFactory \
+    META-INF/services/javax.sound.midi.spi.MidiDeviceProvider \
+    META-INF/services/javax.sound.midi.spi.MidiFileReader \
+    META-INF/services/javax.sound.midi.spi.MidiFileWriter \
+    META-INF/services/javax.sound.midi.spi.SoundbankReader \
+    META-INF/services/javax.sound.sampled.spi.AudioFileReader \
+    META-INF/services/javax.sound.sampled.spi.AudioFileWriter \
+    META-INF/services/javax.sound.sampled.spi.FormatConversionProvider \
+    META-INF/services/javax.sound.sampled.spi.MixerProvider \
+    META-INF/services/sun.java2d.cmm.PCMM \
+    META-INF/services/sun.java2d.pipe.RenderingEngine
--- a/makefiles/scripts/addNotices.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/scripts/addNotices.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -25,7 +25,7 @@
 #
 
 # Parse the first contiguous comment block in this script and generate
-# a java comment block.  If this script is invoked with a copyright 
+# a java comment block. If this script is invoked with a copyright
 # year/year range, the java comment block will contain a Sun copyright.
 
 COPYRIGHT_YEARS="$1"
@@ -41,5 +41,5 @@
 fi
 
 $NAWK ' /^#.*Copyright.*Oracle/ { next }
-        /^#([^!]|$)/ { sub(/^#/, " *"); print }
-        /^$/ { print " */"; exit } ' $0
+    /^#([^!]|$)/ { sub(/^#/, " *"); print }
+    /^$/ { print " */"; exit } ' $0
--- a/makefiles/scripts/genCharsetProvider.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/scripts/genCharsetProvider.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -28,17 +28,17 @@
 # Generate a charset provider class
 
 # Required environment variables
-#   NAWK	awk tool
-#   TEMPDIR      temporary directory
-#   HASHER	Hasher program
+#   NAWK    awk tool
+#   TEMPDIR temporary directory
+#   HASHER  Hasher program
 
 SPEC=$1; shift
 DST=$1; shift
 
 eval `$NAWK <$SPEC '
-  /^[ \t]*copyright / { printf "COPYRIGHT_YEARS=\"%s %s\"\n", $2, $3; }
-  /^[ \t]*package / { printf "PKG=%s\n", $2; }
-  /^[ \t]*class / { printf "CLASS=%s\n", $2; }
+    /^[ \t]*copyright / { printf "COPYRIGHT_YEARS=\"%s %s\"\n", $2, $3; }
+    /^[ \t]*package / { printf "PKG=%s\n", $2; }
+    /^[ \t]*class / { printf "CLASS=%s\n", $2; }
 '`
 
 OUT=$DST/$CLASS.java
@@ -69,50 +69,50 @@
 # Alias tables
 #
 $NAWK <$SPEC >>$OUT '
-  BEGIN { n = 1; m = 1; }
+    BEGIN { n = 1; m = 1; }
 
-  /^[ \t]*charset / {
-    csn = $2; cln = $3;
-    lcsn = tolower(csn);
-    lcsns[n++] = lcsn;
-    csns[lcsn] = csn;
-    classMap[lcsn] = cln;
-    if (n > 2)
+    /^[ \t]*charset / {
+      csn = $2; cln = $3;
+      lcsn = tolower(csn);
+      lcsns[n++] = lcsn;
+      csns[lcsn] = csn;
+      classMap[lcsn] = cln;
+      if (n > 2)
+        printf "    };\n\n";
+      printf "    static final String[] aliases_%s = new String[] {\n", cln;
+    }
+
+    /^[ \t]*alias / {
+      acsns[m++] = tolower($2);
+      aliasMap[tolower($2)] = lcsn;
+      printf "        \"%s\",\n", $2;
+    }
+
+    END {
       printf "    };\n\n";
-    printf "    static final String[] aliases_%s = new String[] {\n", cln;
-  }
-
-  /^[ \t]*alias / {
-    acsns[m++] = tolower($2);
-    aliasMap[tolower($2)] = lcsn; 
-    printf "        \"%s\",\n", $2;
-  }
-
-  END {
-    printf "    };\n\n";
-  }
+    }
 '
 
 
 # Prehashed alias and class maps
 #
 $NAWK <$SPEC >$TEMPDIR/aliases '
-  /^[ \t]*charset / {
-    csn = $2;
-    lcsn = tolower(csn);
-  }
-  /^[ \t]*alias / {
-    an = tolower($2);
-    printf "%-20s \"%s\"\n", an, lcsn;
-  }
+    /^[ \t]*charset / {
+      csn = $2;
+      lcsn = tolower(csn);
+    }
+    /^[ \t]*alias / {
+      an = tolower($2);
+      printf "%-20s \"%s\"\n", an, lcsn;
+    }
 '
 
 $NAWK <$SPEC >$TEMPDIR/classes '
-  /^[ \t]*charset / {
-    csn = $2; cln = $3;
-    lcsn = tolower(csn);
-    printf "%-20s \"%s\"\n", lcsn, cln;
-  }
+    /^[ \t]*charset / {
+      csn = $2; cln = $3;
+      lcsn = tolower(csn);
+      printf "%-20s \"%s\"\n", lcsn, cln;
+    }
 '
 
 ${HASHER} -i Aliases <$TEMPDIR/aliases >>$OUT
--- a/makefiles/scripts/genExceptions.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/scripts/genExceptions.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -32,7 +32,7 @@
 gen() {
   ID=$1
   WHAT=$2
-  SVUID=$3 
+  SVUID=$3
   ARG_TYPE=$4
   ARG_ID=$5
   ARG_PROP=$6
@@ -43,7 +43,7 @@
 
   $SH ${SCRIPTS}/addNotices.sh "$COPYRIGHT_YEARS" > $out
 
-cat >>$out <<__END__
+  cat >>$out <<__END__
 
 // -- This file was mechanically generated: Do not edit! -- //
 
--- a/makefiles/scripts/localelist.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/scripts/localelist.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -40,70 +40,67 @@
 
 toJavaLocale()
 {
-    NewLocale=`echo $1 | $NAWK '
-		BEGIN {
-		    # The following values have to be consistent with java.util.Locale.
-		    javalocales["en"] = "ENGLISH";
-		    javalocales["fr"] = "FRENCH";
-		    javalocales["de"] = "GERMAN";
-		    javalocales["it"] = "ITALIAN";
-		    javalocales["ja"] = "JAPANESE";
-		    javalocales["ko"] = "KOREAN";
-		    javalocales["zh"] = "CHINESE";
-		    javalocales["zh_CN"] = "SIMPLIFIED_CHINESE";
-		    javalocales["zh_TW"] = "TRADITIONAL_CHINESE";
-		    javalocales["fr_FR"] = "FRANCE";
-		    javalocales["de_DE"] = "GERMANY";
-		    javalocales["it_IT"] = "ITALY";
-		    javalocales["ja_JP"] = "JAPAN";
-		    javalocales["ko_KR"] = "KOREA";
-		    javalocales["en_GB"] = "UK";
-		    javalocales["en_US"] = "US";
-		    javalocales["en_CA"] = "CANADA";
-		    javalocales["fr_CA"] = "CANADA_FRENCH";
-		}
-		{
-		    if ($0 in javalocales) {
-			print "	Locale." javalocales[$0];
-		    } else {
-			split($0, a, "_");
-			if (a[3] != "") {
-			    print " new Locale(\"" a[1] "\", \"" a[2] "\", \"" a[3] "\")";
-			} else if (a[2] != "") {
-			    print " new Locale(\"" a[1] "\", \"" a[2] "\")";
-			} else {
-			    print " new Locale(\"" a[1] "\")";
-			}
-		    }
-		}'`
+  NewLocale=`echo $1 | $NAWK '
+      BEGIN {
+        # The following values have to be consistent with java.util.Locale.
+        javalocales["en"] = "ENGLISH";
+        javalocales["fr"] = "FRENCH";
+        javalocales["de"] = "GERMAN";
+        javalocales["it"] = "ITALIAN";
+        javalocales["ja"] = "JAPANESE";
+        javalocales["ko"] = "KOREAN";
+        javalocales["zh"] = "CHINESE";
+        javalocales["zh_CN"] = "SIMPLIFIED_CHINESE";
+        javalocales["zh_TW"] = "TRADITIONAL_CHINESE";
+        javalocales["fr_FR"] = "FRANCE";
+        javalocales["de_DE"] = "GERMANY";
+        javalocales["it_IT"] = "ITALY";
+        javalocales["ja_JP"] = "JAPAN";
+        javalocales["ko_KR"] = "KOREA";
+        javalocales["en_GB"] = "UK";
+        javalocales["en_US"] = "US";
+        javalocales["en_CA"] = "CANADA";
+        javalocales["fr_CA"] = "CANADA_FRENCH";
+      }
+      {
+        if ($0 in javalocales) {
+          print "        Locale." javalocales[$0];
+        } else {
+          split($0, a, "_");
+          if (a[3] != "") {
+            print " new Locale(\"" a[1] "\", \"" a[2] "\", \"" a[3] "\")";
+          } else if (a[2] != "") {
+            print " new Locale(\"" a[1] "\", \"" a[2] "\")";
+          } else {
+            print " new Locale(\"" a[1] "\")";
+          }
+        }
+      }'`
 
-    JAVA_LOCALES=$JAVA_LOCALES$NewLocale
+  JAVA_LOCALES=$JAVA_LOCALES$NewLocale
 }
 
 # count the number of locales
 counter=0
 for i in $LOCALES
 do
-    counter=`expr $counter + 1`
+  counter=`expr $counter + 1`
 done
 
 index=0
 for locale in $LOCALES
 do
-    index=`expr $index + 1`;
-    if [ $index != $counter ]
-    then
-	toJavaLocale $locale
-	JAVA_LOCALES=$JAVA_LOCALES","
-    else
-	toJavaLocale $locale
-    fi
+  index=`expr $index + 1`;
+  if [ $index != $counter ]
+  then
+    toJavaLocale $locale
+    JAVA_LOCALES=$JAVA_LOCALES","
+  else
+    toJavaLocale $locale
+  fi
 done
 
 # replace the #LOCALE_LIST# in the precompiled CoreResourceBundleControl.java file.
 
 $SED -e "s@^#warn .*@// -- This file was mechanically generated: Do not edit! -- //@" \
-    -e  "s/#LOCALE_LIST#/$JAVA_LOCALES/g" $2 > $3
-
-
-
+    -e "s/#LOCALE_LIST#/$JAVA_LOCALES/g" $2 > $3
--- a/makefiles/sun/awt/ToBin.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/makefiles/sun/awt/ToBin.java	Wed Oct 30 18:38:20 2013 +0000
@@ -36,7 +36,7 @@
         BufferedImage bi = null;
         int iconWidth = im.getWidth(null);
         int iconHeight = im.getHeight(null);
-        if (im != null && iconHeight != 0 &&  iconWidth != 0) {
+        if (im != null && iconHeight != 0 && iconWidth != 0) {
             bi = new BufferedImage(iconWidth, iconHeight, BufferedImage.TYPE_INT_ARGB);
             Graphics g = bi.getGraphics();
             try {
--- a/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	Wed Oct 30 18:38:20 2013 +0000
@@ -37,8 +37,6 @@
 import sun.swing.*;
 import apple.laf.*;
 
-import com.apple.resources.MacOSXResourceBundle;
-
 public class AquaLookAndFeel extends BasicLookAndFeel {
     static final String sOldPropertyPrefix = "com.apple.macos."; // old prefix for things like 'useScreenMenuBar'
     static final String sPropertyPrefix = "apple.laf."; // new prefix for things like 'useScreenMenuBar'
@@ -252,7 +250,7 @@
         table.setDefaultLocale(Locale.getDefault());
         table.addResourceBundle(PKG_PREFIX + "resources.aqua");
         try {
-            final ResourceBundle aquaProperties = MacOSXResourceBundle.getMacResourceBundle(PKG_PREFIX + "resources.aqua");
+            final ResourceBundle aquaProperties = ResourceBundle.getBundle(PKG_PREFIX + "resources.aqua");
             final Enumeration<String> propertyKeys = aquaProperties.getKeys();
 
             while (propertyKeys.hasMoreElements()) {
--- a/src/macosx/classes/com/apple/laf/AquaUtils.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/macosx/classes/com/apple/laf/AquaUtils.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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,6 +29,7 @@
 import java.awt.image.*;
 import java.lang.ref.SoftReference;
 import java.lang.reflect.Method;
+import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.*;
 
@@ -41,56 +42,68 @@
 import sun.lwawt.macosx.CImage;
 import sun.lwawt.macosx.CImage.Creator;
 import sun.lwawt.macosx.CPlatformWindow;
+import sun.misc.Launcher;
+import sun.reflect.misc.ReflectUtil;
+import sun.security.action.GetPropertyAction;
 import sun.swing.SwingUtilities2;
 
 import com.apple.laf.AquaImageFactory.SlicedImageControl;
 
-public class AquaUtils {
-    final static String ANIMATIONS_SYSTEM_PROPERTY = "swing.enableAnimations";
+final class AquaUtils {
+
+    private static final String ANIMATIONS_PROPERTY = "swing.enableAnimations";
 
-    /*
+    /**
+     * Suppresses default constructor, ensuring non-instantiability.
+     */
+    private AquaUtils() {
+    }
+
+    /**
      * Convenience function for determining ComponentOrientation.  Helps us
      * avoid having Munge directives throughout the code.
      */
-    public static boolean isLeftToRight(final Component c) {
+    static boolean isLeftToRight(final Component c) {
         return c.getComponentOrientation().isLeftToRight();
     }
 
-    public static void enforceComponentOrientation(Component c, ComponentOrientation orientation) {
+    static void enforceComponentOrientation(final Component c, final ComponentOrientation orientation) {
         c.setComponentOrientation(orientation);
         if (c instanceof Container) {
-            for (Component child : ((Container)c).getComponents()) {
+            for (final Component child : ((Container)c).getComponents()) {
                 enforceComponentOrientation(child, orientation);
             }
         }
     }
 
-    private static CImage.Creator getCImageCreatorInternal() {
-        return java.security.AccessController.doPrivileged(new PrivilegedAction<CImage.Creator>() {
+    private static Creator getCImageCreatorInternal() {
+        return AccessController.doPrivileged(new PrivilegedAction<Creator>() {
+            @Override
             public Creator run() {
                 try {
                     final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
                     getCreatorMethod.setAccessible(true);
-                    return (CImage.Creator)getCreatorMethod.invoke(null, new Object[] {});
-                } catch (final Exception e) {
+                    return (Creator)getCreatorMethod.invoke(null, new Object[] {});
+                } catch (final Exception ignored) {
                     return null;
                 }
             }
         });
     }
 
-    private static final RecyclableSingleton<CImage.Creator> cImageCreator = new RecyclableSingleton<CImage.Creator>() {
+    private static final RecyclableSingleton<Creator> cImageCreator = new RecyclableSingleton<Creator>() {
         @Override
         protected Creator getInstance() {
             return getCImageCreatorInternal();
         }
     };
-    static CImage.Creator getCImageCreator() {
+    static Creator getCImageCreator() {
         return cImageCreator.get();
     }
 
-    protected static Image generateSelectedDarkImage(final Image image) {
+    static Image generateSelectedDarkImage(final Image image) {
         final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
+            @Override
             int getGreyFor(final int gray) {
                 return gray * 75 / 100;
             }
@@ -98,8 +111,9 @@
         return Toolkit.getDefaultToolkit().createImage(prod);
     }
 
-    protected static Image generateDisabledImage(final Image image) {
+    static Image generateDisabledImage(final Image image) {
         final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
+            @Override
             int getGreyFor(final int gray) {
                 return 255 - ((255 - gray) * 65 / 100);
             }
@@ -107,19 +121,20 @@
         return Toolkit.getDefaultToolkit().createImage(prod);
     }
 
-    protected static Image generateLightenedImage(final Image image, final int percent) {
+    static Image generateLightenedImage(final Image image, final int percent) {
         final GrayFilter filter = new GrayFilter(true, percent);
         final ImageProducer prod = new FilteredImageSource(image.getSource(), filter);
         return Toolkit.getDefaultToolkit().createImage(prod);
     }
 
-    static abstract class IconImageFilter extends RGBImageFilter {
-        public IconImageFilter() {
+    private abstract static class IconImageFilter extends RGBImageFilter {
+        IconImageFilter() {
             super();
             canFilterIndexColorModel = true;
         }
 
-        public int filterRGB(final int x, final int y, final int rgb) {
+        @Override
+        public final int filterRGB(final int x, final int y, final int rgb) {
             final int red = (rgb >> 16) & 0xff;
             final int green = (rgb >> 8) & 0xff;
             final int blue = rgb & 0xff;
@@ -135,14 +150,14 @@
             return result;
         }
 
-        abstract int getGreyFor(final int gray);
+        abstract int getGreyFor(int gray);
     }
 
-    public abstract static class RecyclableObject<T> {
-        protected SoftReference<T> objectRef = null;
+    abstract static class RecyclableObject<T> {
+        private SoftReference<T> objectRef;
 
-        public T get() {
-            T referent = null;
+        T get() {
+            T referent;
             if (objectRef != null && (referent = objectRef.get()) != null) return referent;
             referent = create();
             objectRef = new SoftReference<T>(referent);
@@ -152,8 +167,8 @@
         protected abstract T create();
     }
 
-    public abstract static class RecyclableSingleton<T> {
-        public T get() {
+    abstract static class RecyclableSingleton<T> {
+        final T get() {
             final AppContext appContext = AppContext.getAppContext();
             SoftReference<T> ref = (SoftReference<T>) appContext.get(this);
             if (ref != null) {
@@ -166,38 +181,36 @@
             return object;
         }
 
-        public void reset() {
-            AppContext appContext = AppContext.getAppContext();
-            appContext.remove(this);
+        void reset() {
+            AppContext.getAppContext().remove(this);
         }
 
-        protected abstract T getInstance();
+        abstract T getInstance();
     }
 
-    public static class RecyclableSingletonFromDefaultConstructor<T> extends RecyclableSingleton<T> {
-        protected final Class<T> clazz;
+    static class RecyclableSingletonFromDefaultConstructor<T> extends RecyclableSingleton<T> {
+        private final Class<T> clazz;
 
-        public RecyclableSingletonFromDefaultConstructor(final Class<T> clazz) {
+        RecyclableSingletonFromDefaultConstructor(final Class<T> clazz) {
             this.clazz = clazz;
         }
 
-        protected T getInstance() {
+        @Override
+        T getInstance() {
             try {
+                ReflectUtil.checkPackageAccess(clazz);
                 return clazz.newInstance();
-            } catch (final InstantiationException e) {
-                e.printStackTrace();
-            } catch (final IllegalAccessException e) {
-                e.printStackTrace();
+            } catch (InstantiationException | IllegalAccessException ignored) {
             }
             return null;
         }
     }
 
-    public abstract static class LazyKeyedSingleton<K, V> {
-        protected Map<K, V> refs;
+    abstract static class LazyKeyedSingleton<K, V> {
+        private Map<K, V> refs;
 
-        public V get(final K key) {
-            if (refs == null) refs = new HashMap<K, V>();
+        V get(final K key) {
+            if (refs == null) refs = new HashMap<>();
 
             final V cachedValue = refs.get(key);
             if (cachedValue != null) return cachedValue;
@@ -207,44 +220,45 @@
             return value;
         }
 
-        protected abstract V getInstance(final K key);
+        protected abstract V getInstance(K key);
     }
 
-    static final RecyclableSingleton<Boolean> enableAnimations = new RecyclableSingleton<Boolean>() {
+    private static final RecyclableSingleton<Boolean> enableAnimations = new RecyclableSingleton<Boolean>() {
         @Override
         protected Boolean getInstance() {
-            final String sizeProperty = (String)java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.GetPropertyAction(ANIMATIONS_SYSTEM_PROPERTY));
-            return new Boolean(!"false".equals(sizeProperty)); // should be true by default
+            final String sizeProperty = (String) AccessController.doPrivileged((PrivilegedAction<?>)new GetPropertyAction(
+                    ANIMATIONS_PROPERTY));
+            return !"false".equals(sizeProperty); // should be true by default
         }
     };
-    static boolean animationsEnabled() {
+    private static boolean animationsEnabled() {
         return enableAnimations.get();
     }
 
-    static final int MENU_BLINK_DELAY = 50; // 50ms == 3/60 sec, according to the spec
-    protected static void blinkMenu(final Selectable selectable) {
+    private static final int MENU_BLINK_DELAY = 50; // 50ms == 3/60 sec, according to the spec
+    static void blinkMenu(final Selectable selectable) {
         if (!animationsEnabled()) return;
         try {
             selectable.paintSelected(false);
             Thread.sleep(MENU_BLINK_DELAY);
             selectable.paintSelected(true);
             Thread.sleep(MENU_BLINK_DELAY);
-        } catch (final InterruptedException e) { }
+        } catch (final InterruptedException ignored) { }
     }
 
     interface Selectable {
-        void paintSelected(final boolean selected);
+        void paintSelected(boolean selected);
     }
 
     interface JComponentPainter {
-        public void paint(JComponent c, Graphics g, int x, int y, int w, int h);
+        void paint(JComponent c, Graphics g, int x, int y, int w, int h);
     }
 
     interface Painter {
-        public void paint(final Graphics g, int x, int y, int w, int h);
+        void paint(Graphics g, int x, int y, int w, int h);
     }
 
-    public static void paintDropShadowText(final Graphics g, final JComponent c, final Font font, final FontMetrics metrics, final int x, final int y, final int offsetX, final int offsetY, final Color textColor, final Color shadowColor, final String text) {
+    static void paintDropShadowText(final Graphics g, final JComponent c, final Font font, final FontMetrics metrics, final int x, final int y, final int offsetX, final int offsetY, final Color textColor, final Color shadowColor, final String text) {
         g.setFont(font);
         g.setColor(shadowColor);
         SwingUtilities2.drawString(c, g, text, x + offsetX, y + offsetY + metrics.getAscent());
@@ -252,22 +266,22 @@
         SwingUtilities2.drawString(c, g, text, x, y + metrics.getAscent());
     }
 
-    public static class ShadowBorder implements Border {
-        final Painter prePainter;
-        final Painter postPainter;
+    static class ShadowBorder implements Border {
+        private final Painter prePainter;
+        private final Painter postPainter;
 
-        final int offsetX;
-        final int offsetY;
-        final float distance;
-        final int blur;
-        final Insets insets;
-        final ConvolveOp blurOp;
+        private final int offsetX;
+        private final int offsetY;
+        private final float distance;
+        private final int blur;
+        private final Insets insets;
+        private final ConvolveOp blurOp;
 
-        public ShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur) {
+        ShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur) {
             this.prePainter = prePainter; this.postPainter = postPainter;
             this.offsetX = offsetX; this.offsetY = offsetY; this.distance = distance; this.blur = blur;
             final int halfBlur = blur / 2;
-            this.insets = new Insets(halfBlur - offsetY, halfBlur - offsetX, halfBlur + offsetY, halfBlur + offsetX);
+            insets = new Insets(halfBlur - offsetY, halfBlur - offsetX, halfBlur + offsetY, halfBlur + offsetX);
 
             final float blurry = intensity / (blur * blur);
             final float[] blurKernel = new float[blur * blur];
@@ -275,14 +289,17 @@
             blurOp = new ConvolveOp(new Kernel(blur, blur, blurKernel));
         }
 
-        public boolean isBorderOpaque() {
+        @Override
+        public final boolean isBorderOpaque() {
             return false;
         }
 
-        public Insets getBorderInsets(final Component c) {
+        @Override
+        public final Insets getBorderInsets(final Component c) {
             return insets;
         }
 
+        @Override
         public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
             final BufferedImage img = new BufferedImage(width + blur * 2, height + blur * 2, BufferedImage.TYPE_INT_ARGB_PRE);
             paintToImage(img, x, y, width, height);
@@ -290,7 +307,7 @@
             g.drawImage(img, -blur, -blur, null);
         }
 
-        protected void paintToImage(final BufferedImage img, final int x, final int y, final int width, final int height) {
+        private void paintToImage(final BufferedImage img, final int x, final int y, final int width, final int height) {
             // clear the prior image
             Graphics2D imgG = (Graphics2D)img.getGraphics();
             imgG.setComposite(AlphaComposite.Clear);
@@ -319,10 +336,10 @@
         }
     }
 
-    public static class SlicedShadowBorder extends ShadowBorder {
-        final SlicedImageControl slices;
+    static class SlicedShadowBorder extends ShadowBorder {
+        private final SlicedImageControl slices;
 
-        public SlicedShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur, final int templateWidth, final int templateHeight, final int leftCut, final int topCut, final int rightCut, final int bottomCut) {
+        SlicedShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur, final int templateWidth, final int templateHeight, final int leftCut, final int topCut, final int rightCut, final int bottomCut) {
             super(prePainter, postPainter, offsetX, offsetY, distance, intensity, blur);
 
             final BufferedImage i = new BufferedImage(templateWidth, templateHeight, BufferedImage.TYPE_INT_ARGB_PRE);
@@ -331,15 +348,12 @@
             slices = new SlicedImageControl(i, leftCut, topCut, rightCut, bottomCut, false);
         }
 
+        @Override
         public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
             slices.paint(g, x, y, width, height);
         }
     }
 
-    public interface NineSliceMetricsProvider {
-
-    }
-
 //    static void debugFrame(String name, Image image) {
 //        JFrame f = new JFrame(name);
 //        f.setContentPane(new JLabel(new ImageIcon(image)));
@@ -350,28 +364,30 @@
     // special casing naughty applications, like InstallAnywhere
     // <rdar://problem/4851533> REGR: JButton: Myst IV: the buttons of 1.0.3 updater have redraw issue
     static boolean shouldUseOpaqueButtons() {
-        final ClassLoader launcherClassLoader = sun.misc.Launcher.getLauncher().getClassLoader();
+        final ClassLoader launcherClassLoader = Launcher.getLauncher().getClassLoader();
         if (classExists(launcherClassLoader, "com.installshield.wizard.platform.macosx.MacOSXUtils")) return true;
         return false;
     }
 
-    static boolean classExists(final ClassLoader classLoader, final String clazzName) {
+    private static boolean classExists(final ClassLoader classLoader, final String clazzName) {
         try {
             return Class.forName(clazzName, false, classLoader) != null;
-        } catch (final Throwable e) { }
+        } catch (final Throwable ignored) { }
         return false;
     }
 
-    private static RecyclableSingleton<Method> getJComponentGetFlagMethod = new RecyclableSingleton<Method>() {
+    private static final RecyclableSingleton<Method> getJComponentGetFlagMethod = new RecyclableSingleton<Method>() {
+        @Override
         protected Method getInstance() {
-            return java.security.AccessController.doPrivileged(
+            return AccessController.doPrivileged(
                 new PrivilegedAction<Method>() {
+                    @Override
                     public Method run() {
                         try {
                             final Method method = JComponent.class.getDeclaredMethod("getFlag", new Class[] { int.class });
                             method.setAccessible(true);
                             return method;
-                        } catch (final Throwable e) {
+                        } catch (final Throwable ignored) {
                             return null;
                         }
                     }
@@ -380,18 +396,18 @@
         }
     };
 
-    private static final Integer OPAQUE_SET_FLAG = new Integer(24); // private int JComponent.OPAQUE_SET
-    protected static boolean hasOpaqueBeenExplicitlySet(final JComponent c) {
+    private static final Integer OPAQUE_SET_FLAG = 24; // private int JComponent.OPAQUE_SET
+    static boolean hasOpaqueBeenExplicitlySet(final JComponent c) {
         final Method method = getJComponentGetFlagMethod.get();
         if (method == null) return false;
         try {
             return Boolean.TRUE.equals(method.invoke(c, OPAQUE_SET_FLAG));
-        } catch (final Throwable e) {
+        } catch (final Throwable ignored) {
             return false;
         }
     }
 
-    protected static boolean isWindowTextured(final Component c) {
+    private static boolean isWindowTextured(final Component c) {
         if (!(c instanceof JComponent)) {
             return false;
         }
@@ -412,13 +428,12 @@
         return new Color(color.getRed(), color.getGreen(), color.getBlue(), 0);
     }
 
-    protected static void fillRect(final Graphics g, final Component c) {
+    static void fillRect(final Graphics g, final Component c) {
         fillRect(g, c, c.getBackground(), 0, 0, c.getWidth(), c.getHeight());
     }
 
-    protected static void fillRect(final Graphics g, final Component c,
-                                   final Color color, final int x, final int y,
-                                   final int w, final int h) {
+    static void fillRect(final Graphics g, final Component c, final Color color,
+                         final int x, final int y, final int w, final int h) {
         if (!(g instanceof Graphics2D)) {
             return;
         }
--- a/src/macosx/classes/com/apple/laf/ScreenMenu.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/macosx/classes/com/apple/laf/ScreenMenu.java	Wed Oct 30 18:38:20 2013 +0000
@@ -36,7 +36,10 @@
 import sun.lwawt.LWToolkit;
 import sun.lwawt.macosx.*;
 
-class ScreenMenu extends Menu implements ContainerListener, ComponentListener, ScreenMenuPropertyHandler {
+final class ScreenMenu extends Menu
+        implements ContainerListener, ComponentListener,
+                   ScreenMenuPropertyHandler {
+
     static {
         java.security.AccessController.doPrivileged(
             new java.security.PrivilegedAction<Void>() {
@@ -48,20 +51,22 @@
     }
 
     // screen menu stuff
-    public static native long addMenuListeners(ScreenMenu listener, long nativeMenu);
-    public static native void removeMenuListeners(long modelPtr);
+    private static native long addMenuListeners(ScreenMenu listener, long nativeMenu);
+    private static native void removeMenuListeners(long modelPtr);
 
-    long fModelPtr = 0;
+    private transient long fModelPtr;
 
-    Hashtable<Component, MenuItem> fItems;
-    JMenu fInvoker;
+    private final Hashtable<Component, MenuItem> fItems;
+    private final JMenu fInvoker;
 
-    Component fLastMouseEventTarget;
-    Rectangle fLastTargetRect;
+    private Component fLastMouseEventTarget;
+    private Rectangle fLastTargetRect;
     private volatile Rectangle[] fItemBounds;
 
+    private ScreenMenuPropertyListener fPropertyListener;
+
     // Array of child hashes used to see if we need to recreate the Menu.
-    int childHashArray[];
+    private int childHashArray[];
 
     ScreenMenu(final JMenu invoker) {
         super(invoker.getText());
@@ -74,25 +79,12 @@
         updateItems();
     }
 
-    // I'm always 'visible', but never on screen
-    static class ScreenMenuComponent extends Container {
-        public boolean isVisible() { return true; }
-        public boolean isShowing() { return true; }
-        public void setVisible(final boolean b) {}
-        public void show() {}
-    }
-
-    ScreenMenuComponent makeScreenMenuComponent() {
-        return new ScreenMenuComponent();
-    }
-
-
     /**
      * Determine if we need to tear down the Menu and re-create it, since the contents may have changed in the Menu opened listener and
      * we do not get notified of it, because EDT is busy in our code. We only need to update if the menu contents have changed in some
      * way, such as the number of menu items, the text of the menuitems, icon, shortcut etc.
      */
-    static boolean needsUpdate(final Component items[], final int childHashArray[]) {
+    private static boolean needsUpdate(final Component items[], final int childHashArray[]) {
       if (items == null || childHashArray == null) {
         return true;
       }
@@ -112,7 +104,7 @@
      * Used to recreate the AWT based Menu structure that implements the Screen Menu.
      * Also computes hashcode and stores them so that we can compare them later in needsUpdate.
      */
-    void updateItems() {
+    private void updateItems() {
         final int count = fInvoker.getMenuComponentCount();
         final Component[] items = fInvoker.getMenuComponents();
         if (needsUpdate(items, childHashArray)) {
@@ -163,16 +155,14 @@
             LWCToolkit.invokeAndWait(new Runnable() {
                 public void run() {
                     invoker.setSelected(false);
-
-            // Null out the tracking rectangles and the array.
+                    // Null out the tracking rectangles and the array.
                     if (fItemBounds != null) {
-            for (int i = 0; i < fItemBounds.length; i++) {
-                fItemBounds[i] = null;
-            }
+                        for (int i = 0; i < fItemBounds.length; i++) {
+                            fItemBounds[i] = null;
+                        }
                     }
-
-            fItemBounds = null;
-    }
+                    fItemBounds = null;
+                }
             }, invoker);
         } catch (final Exception e) {
             e.printStackTrace();
@@ -237,49 +227,56 @@
         });
     }
 
-    ScreenMenuPropertyListener fPropertyListener;
+    @Override
     public void addNotify() {
-        super.addNotify();
-        if (fModelPtr == 0) {
-        fInvoker.addContainerListener(this);
-        fInvoker.addComponentListener(this);
-        fPropertyListener = new ScreenMenuPropertyListener(this);
-        fInvoker.addPropertyChangeListener(fPropertyListener);
+        synchronized (getTreeLock()) {
+            super.addNotify();
+            if (fModelPtr == 0) {
+                fInvoker.addContainerListener(this);
+                fInvoker.addComponentListener(this);
+                fPropertyListener = new ScreenMenuPropertyListener(this);
+                fInvoker.addPropertyChangeListener(fPropertyListener);
 
-        final Icon icon = fInvoker.getIcon();
-        if (icon != null) {
-            this.setIcon(icon);
-        }
+                final Icon icon = fInvoker.getIcon();
+                if (icon != null) {
+                    setIcon(icon);
+                }
 
-        final String tooltipText = fInvoker.getToolTipText();
-        if (tooltipText != null) {
-            this.setToolTipText(tooltipText);
-        }
-        final MenuComponentPeer peer = getPeer();
-        if (peer instanceof CMenu) {
-            final CMenu menu = (CMenu)peer;
-            final long nativeMenu = menu.getNativeMenu();
-            fModelPtr = addMenuListeners(this, nativeMenu);
+                final String tooltipText = fInvoker.getToolTipText();
+                if (tooltipText != null) {
+                    setToolTipText(tooltipText);
+                }
+                final MenuComponentPeer peer = getPeer();
+                if (peer instanceof CMenu) {
+                    final CMenu menu = (CMenu) peer;
+                    final long nativeMenu = menu.getNativeMenu();
+                    fModelPtr = addMenuListeners(this, nativeMenu);
+                }
             }
         }
     }
 
+    @Override
     public void removeNotify() {
-        // Call super so that the NSMenu has been removed, before we release the delegate in removeMenuListeners
-        super.removeNotify();
-        fItems.clear();
-        if (fModelPtr != 0) {
-            removeMenuListeners(fModelPtr);
-            fModelPtr = 0;
-            fInvoker.removeContainerListener(this);
-            fInvoker.removeComponentListener(this);
-            fInvoker.removePropertyChangeListener(fPropertyListener);
+        synchronized (getTreeLock()) {
+            // Call super so that the NSMenu has been removed, before we release
+            // the delegate in removeMenuListeners
+            super.removeNotify();
+            fItems.clear();
+            if (fModelPtr != 0) {
+                removeMenuListeners(fModelPtr);
+                fModelPtr = 0;
+                fInvoker.removeContainerListener(this);
+                fInvoker.removeComponentListener(this);
+                fInvoker.removePropertyChangeListener(fPropertyListener);
+            }
         }
     }
 
     /**
      * Invoked when a component has been added to the container.
      */
+    @Override
     public void componentAdded(final ContainerEvent e) {
         addItem(e.getChild());
     }
@@ -287,23 +284,26 @@
     /**
      * Invoked when a component has been removed from the container.
      */
+    @Override
     public void componentRemoved(final ContainerEvent e) {
         final Component child = e.getChild();
         final MenuItem sm = fItems.get(child);
         if (sm == null) return;
 
-            remove(sm);
-            fItems.remove(sm);
-        }
+        remove(sm);
+        fItems.remove(sm);
+    }
 
     /**
      * Invoked when the component's size changes.
      */
+    @Override
     public void componentResized(final ComponentEvent e) {}
 
     /**
      * Invoked when the component's position changes.
      */
+    @Override
     public void componentMoved(final ComponentEvent e) {}
 
     /**
@@ -311,6 +311,7 @@
      * See componentHidden - we should still have a MenuItem
      * it just isn't inserted
      */
+    @Override
     public void componentShown(final ComponentEvent e) {
         setVisible(true);
     }
@@ -321,11 +322,12 @@
      * so we remove the ScreenMenuItem from the ScreenMenu
      * but leave it in fItems
      */
+    @Override
     public void componentHidden(final ComponentEvent e) {
         setVisible(false);
     }
 
-    public void setVisible(final boolean b) {
+    private void setVisible(final boolean b) {
         // Tell our parent to add/remove us
         final MenuContainer parent = getParent();
 
@@ -333,20 +335,24 @@
             if (parent instanceof ScreenMenu) {
                 final ScreenMenu sm = (ScreenMenu)parent;
                 sm.setChildVisible(fInvoker, b);
-    }
+            }
         }
     }
 
+    @Override
     public void setChildVisible(final JMenuItem child, final boolean b) {
         fItems.remove(child);
         updateItems();
     }
 
+    @Override
     public void setAccelerator(final KeyStroke ks) {}
 
     // only check and radio items can be indeterminate
+    @Override
     public void setIndeterminate(boolean indeterminate) { }
 
+    @Override
     public void setToolTipText(final String text) {
         final MenuComponentPeer peer = getPeer();
         if (!(peer instanceof CMenuItem)) return;
@@ -355,6 +361,7 @@
         cmi.setToolTipText(text);
     }
 
+    @Override
     public void setIcon(final Icon i) {
         final MenuComponentPeer peer = getPeer();
         if (!(peer instanceof CMenuItem)) return;
@@ -374,9 +381,8 @@
     /**
      * Gets a hashCode for a JMenu or JMenuItem or subclass so that we can compare for
      * changes in the Menu.
-     *
      */
-    static int getHashCode(final Component m) {
+    private static int getHashCode(final Component m) {
         int hashCode = m.hashCode();
 
         if (m instanceof JMenuItem) {
@@ -408,7 +414,7 @@
         return hashCode;
     }
 
-    void addItem(final Component m) {
+    private void addItem(final Component m) {
         if (!m.isVisible()) return;
         MenuItem sm = fItems.get(m);
 
--- a/src/macosx/classes/com/apple/resources/MacOSXResourceBundle.java	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.apple.resources;
-
-import java.security.*;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import java.io.*;
-
-public class MacOSXResourceBundle extends PropertyResourceBundle {
-    MacOSXResourceBundle(InputStream stream) throws IOException {
-        super(stream);
-    }
-
-    void setItsParent(ResourceBundle rb) {
-        setParent(rb);
-    }
-
-    public static ResourceBundle getMacResourceBundle(String baseJavaBundle) throws Exception {
-        return getMacResourceBundle(baseJavaBundle, null);
-    }
-
-    public static ResourceBundle getMacResourceBundle(String baseJavaBundle, String filename) throws Exception {
-        LoadNativeBundleAction lnba = new LoadNativeBundleAction(baseJavaBundle, filename);
-        return (ResourceBundle)java.security.AccessController.doPrivileged(lnba);
-    }
-}
-
-class LoadNativeBundleAction implements PrivilegedExceptionAction {
-    String mBaseJavaBundle;
-    String mFilenameOverride;
-
-    LoadNativeBundleAction(String baseJavaBundle, String filenameOverride) {
-        mBaseJavaBundle = baseJavaBundle;
-        mFilenameOverride = filenameOverride;
-    }
-
-    public Object run() {
-        java.util.ResourceBundle returnValue = null;
-        MacOSXResourceBundle macOSrb = null;
-
-        // Load the Mac OS X resources.
-        // Use a base filename if we were given one. Otherwise, we will look for the last piece of the bundle path
-        // with '.properties' appended. Either way, the native method will take care of the extension.
-        String filename = mFilenameOverride;
-
-        if (filename == null) {
-            filename = mBaseJavaBundle.substring(mBaseJavaBundle.lastIndexOf('.') + 1);
-        }
-
-        File propsFile = null;
-        String propertyFileName = getPathToBundleFile(filename);
-        InputStream stream = null;
-
-        try {
-            propsFile = new File(propertyFileName);
-            stream = new FileInputStream(propsFile);
-            stream = new java.io.BufferedInputStream(stream);
-            macOSrb = new MacOSXResourceBundle(stream);
-        } catch (Exception e) {
-            //e.printStackTrace();
-            //System.out.println("Failed to create resources from application bundle.  Using Java-based resources.");
-        } finally {
-            try {
-                if (stream != null) stream.close();
-                stream = null;
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-
-        returnValue = ResourceBundle.getBundle(mBaseJavaBundle);
-
-        // If we have a platform-specific bundle, make it the parent of the generic bundle, so failures propagate up to the parent.
-        if (returnValue != null) {
-            if (macOSrb != null) {
-                macOSrb.setItsParent(returnValue);
-                returnValue = macOSrb;
-            }
-        }
-
-        return returnValue;
-    }
-
-    private static native String getPathToBundleFile(String filename);
-}
-
--- a/src/macosx/native/com/apple/resources/MacOSXResourceBundle.m	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  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.
- */
-
-#import <dlfcn.h>
-#import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN PATH_MAX
-#endif
-
-static jboolean
-GetPathFromCurrentBinary(char *buf, jint bufsize)
-{
-    Dl_info dlinfo;
-    dladdr((void *)GetPathFromCurrentBinary, &dlinfo);
-    if (realpath(dlinfo.dli_fname, buf) == NULL) {
-//      fprintf(stderr, "Error: realpath(`%s') failed.\n", dlinfo.dli_fname);
-        return JNI_FALSE;
-    }
-
-    const char *libawt = "lib/libawt.dylib";
-    int strLen, libawtLen;
-
-    strLen = strlen(buf);
-    libawtLen = strlen(libawt);
-
-    if (strLen < libawtLen ||
-        strcmp(buf + strLen - libawtLen, libawt) != 0) {
-        return JNI_FALSE;
-    }
-
-    buf[strLen - libawtLen] = '\0';
-
-    return JNI_TRUE;
-}
-
-#define JAVA_DLL "libjava.dylib"
-
-static jboolean
-GetJREPath(char *buf, jint bufsize)
-{
-    /* try to get the path from the current binary, if not, bail to the framework */
-    if (GetPathFromCurrentBinary(buf, bufsize) == JNI_TRUE) {
-        /* does the rest of the JRE exist? */
-        char libjava[MAXPATHLEN];
-        snprintf(libjava, MAXPATHLEN, "%s/lib/" JAVA_DLL, buf);
-        if (access(libjava, F_OK) == 0) {
-            return JNI_TRUE;
-        }
-    }
-
-    return JNI_FALSE;
-}
-
-static NSString *getRunningJavaBundle()
-{
-    char path[MAXPATHLEN];
-    GetJREPath(path, MAXPATHLEN);
-    return [[NSString alloc] initWithFormat:@"%@/bundle", [NSString stringWithUTF8String:path]];
-}
-
-/*
- * Class:     com_apple_resources_LoadNativeBundleAction
- * Method:    getPathToBundleFile
- * Signature: (Ljava/lang/String)Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL
-Java_com_apple_resources_LoadNativeBundleAction_getPathToBundleFile
-    (JNIEnv *env, jclass klass, jstring filename)
-{
-    jstring returnVal = NULL;
-    if (filename == NULL) {
-        return NULL;
-    }
-
-JNF_COCOA_ENTER(env);
-    NSBundle *javaBundle = [NSBundle bundleWithPath:getRunningJavaBundle()];
-    NSString *baseFilename = JNFJavaToNSString(env, filename);
-    NSString *propertyFilePath = [javaBundle pathForResource:baseFilename ofType:@"properties"];
-
-    if (propertyFilePath != nil) {
-        returnVal = JNFNSToJavaString(env, propertyFilePath);
-    }
-JNF_COCOA_EXIT(env);
-
-    return returnVal;
-}
--- a/src/share/back/ThreadGroupReferenceImpl.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/back/ThreadGroupReferenceImpl.c	Wed Oct 30 18:38:20 2013 +0000
@@ -47,7 +47,7 @@
 
         (void)memset(&info, 0, sizeof(info));
         threadGroupInfo(group, &info);
-        (void)outStream_writeString(out, info.name);
+        (void)outStream_writeString(out, info.name == NULL ? "" : info.name);
         if ( info.name != NULL )
             jvmtiDeallocate(info.name);
 
--- a/src/share/back/outStream.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/back/outStream.c	Wed Oct 30 18:38:20 2013 +0000
@@ -298,17 +298,15 @@
 outStream_writeString(PacketOutputStream *stream, char *string)
 {
     jdwpError error;
-    jint      length;
+    jint      length = string != NULL ? (int)strlen(string) : 0;
 
     /* Options utf8=y/n controls if we want Standard UTF-8 or Modified */
     if ( gdata->modifiedUtf8 ) {
-        length = (int)strlen(string);
         (void)outStream_writeInt(stream, length);
         error = writeBytes(stream, (jbyte *)string, length);
     } else {
         jint      new_length;
 
-        length = (int)strlen(string);
         new_length = (gdata->npt->utf8mToUtf8sLength)
                             (gdata->npt->utf, (jbyte*)string, length);
         if ( new_length == length ) {
--- a/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	Wed Oct 30 18:38:20 2013 +0000
@@ -271,22 +271,6 @@
         }
     }
 
-    public String toString() {
-        String LINE_SEP = System.getProperty("line.separator");
-
-        StringBuffer strbuf
-            = new StringBuffer("SunJCE Diffie-Hellman Private Key:"
-                               + LINE_SEP + "x:" + LINE_SEP
-                               + Debug.toHexString(this.x)
-                               + LINE_SEP + "p:" + LINE_SEP
-                               + Debug.toHexString(this.p)
-                               + LINE_SEP + "g:" + LINE_SEP
-                               + Debug.toHexString(this.g));
-        if (this.l != 0)
-            strbuf.append(LINE_SEP + "l:" + LINE_SEP + "    " + this.l);
-        return strbuf.toString();
-    }
-
     private void parseKeyBits() throws InvalidKeyException {
         try {
             DerInputStream in = new DerInputStream(this.key);
--- a/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java	Wed Oct 30 18:38:20 2013 +0000
@@ -53,7 +53,10 @@
 
     public static void ObjectInit(Object obj)
     {
-        if ( engaged != 0 ) {
+        if ( engaged != 0) {
+            if (obj == null) {
+                throw new IllegalArgumentException("Null object.");
+            }
             nativeObjectInit(Thread.currentThread(), obj);
         }
     }
@@ -66,7 +69,10 @@
 
     public static void NewArray(Object obj)
     {
-        if ( engaged != 0 ) {
+        if ( engaged != 0) {
+            if (obj == null) {
+                throw new IllegalArgumentException("Null object.");
+            }
             nativeNewArray(Thread.currentThread(), obj);
         }
     }
@@ -82,6 +88,14 @@
     public static void CallSite(int cnum, int mnum)
     {
         if ( engaged != 0 ) {
+            if (cnum < 0) {
+                throw new IllegalArgumentException("Negative class index");
+            }
+
+            if (mnum < 0) {
+                throw new IllegalArgumentException("Negative method index");
+            }
+
             nativeCallSite(Thread.currentThread(), cnum, mnum);
         }
     }
@@ -95,6 +109,14 @@
     public static void ReturnSite(int cnum, int mnum)
     {
         if ( engaged != 0 ) {
+            if (cnum < 0) {
+                throw new IllegalArgumentException("Negative class index");
+            }
+
+            if (mnum < 0) {
+                throw new IllegalArgumentException("Negative method index");
+            }
+
             nativeReturnSite(Thread.currentThread(), cnum, mnum);
         }
     }
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1165,6 +1165,11 @@
             target = imRas;
         }
         int [] bandSizes = target.getSampleModel().getSampleSize();
+        for (int i = 0; i < bandSizes.length; i++) {
+            if (bandSizes[i] <= 0 || bandSizes[i] > 8) {
+                throw new IIOException("Illegal band size: should be 0 < size <= 8");
+            }
+        }
 
         /*
          * If the process is sequential, and we have restart markers,
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -495,8 +495,8 @@
             // handle <= 8-bit samples.  We now check the band sizes and throw
             // an exception for images, such as USHORT_GRAY, with > 8 bits
             // per sample.
-            if (bandSizes[i] > 8) {
-                throw new IIOException("Sample size must be <= 8");
+            if (bandSizes[i] <= 0 || bandSizes[i] > 8) {
+                throw new IIOException("Illegal band size: should be 0 < size <= 8");
             }
             // 4450894 part 2: We expand IndexColorModel images to full 24-
             // or 32-bit in grabPixels() for each scanline.  For indexed
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -41,7 +41,7 @@
 FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
 FileChooser.pathLabel.textAndMnemonic=Aus&wahl:
 FileChooser.filterLabel.textAndMnemonic=Filter:
-FileChooser.foldersLabel.textAndMnemonic=Or&dner
+FileChooser.foldersLabel.textAndMnemonic=O&rdner
 FileChooser.filesLabel.textAndMnemonic=&Dateien
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen.
--- a/src/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 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
@@ -36,13 +36,34 @@
 import java.rmi.NoSuchObjectException;
 
 import com.sun.jmx.remote.internal.IIOPProxy;
+import java.io.SerializablePermission;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.Permissions;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.security.ProtectionDomain;
 
 /**
- * An implementatin of IIOPProxy that simply delegates to the appropriate
+ * An implementation of IIOPProxy that simply delegates to the appropriate
  * RMI-IIOP and CORBA APIs.
  */
 
 public class IIOPProxyImpl implements IIOPProxy {
+    // special ACC used to initialize the IIOP stub
+    // the only allowed privilege is SerializablePermission("enableSubclassImplementation")
+    private static final AccessControlContext STUB_ACC;
+
+    static {
+        Permissions p = new Permissions();
+        p.add(new SerializablePermission("enableSubclassImplementation"));
+        STUB_ACC = new AccessControlContext(
+            new ProtectionDomain[]{
+                new ProtectionDomain(null, p)
+            }
+        );
+    }
+
     public IIOPProxyImpl() { }
 
     @Override
@@ -113,7 +134,24 @@
     }
 
     @Override
-    public Remote toStub(Remote obj) throws NoSuchObjectException {
-        return PortableRemoteObject.toStub(obj);
+    public Remote toStub(final Remote obj) throws NoSuchObjectException {
+        if (System.getSecurityManager() == null) {
+            return PortableRemoteObject.toStub(obj);
+        } else {
+            try {
+                return AccessController.doPrivileged(new PrivilegedExceptionAction<Remote>() {
+
+                    @Override
+                    public Remote run() throws Exception {
+                        return PortableRemoteObject.toStub(obj);
+                    }
+                }, STUB_ACC);
+            } catch (PrivilegedActionException e) {
+                if (e.getException() instanceof NoSuchObjectException) {
+                    throw (NoSuchObjectException)e.getException();
+                }
+                throw new RuntimeException("Unexpected exception type", e.getException());
+            }
+        }
     }
 }
--- a/src/share/classes/com/sun/jmx/snmp/SnmpString.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpString.java	Wed Oct 30 18:38:20 2013 +0000
@@ -130,7 +130,7 @@
      * @return The value.
      */
     public byte[] byteValue() {
-        return value ;
+        return value.clone() ;
     }
 
     /**
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java	Wed Oct 30 18:38:20 2013 +0000
@@ -476,8 +476,7 @@
                 rootOid[i++]= val.longValue();
             }
         }
-        return rootOid;
-
+        return rootOid.clone();
     }
 
     // --------------------------------------------------------------------
--- a/src/share/classes/com/sun/jmx/snmp/daemon/CommunicatorServer.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/jmx/snmp/daemon/CommunicatorServer.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1248,7 +1248,7 @@
                      "of this CommunicatorServer instance has changed.");
         }
 
-        return notifInfos;
+        return notifInfos.clone();
     }
 
     /**
--- a/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	Wed Oct 30 18:38:20 2013 +0000
@@ -25,11 +25,12 @@
 
 package com.sun.jndi.ldap;
 
-import java.net.URL;
 import java.net.URLClassLoader;
 import java.net.MalformedURLException;
+import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import sun.misc.SharedSecrets;
 
 final class VersionHelper12 extends VersionHelper {
 
@@ -82,12 +83,16 @@
     }
 
     Thread createThread(final Runnable r) {
+        final AccessControlContext acc = AccessController.getContext();
+        // 4290486: doPrivileged is needed to create a thread in
+        // an environment that restricts "modifyThreadGroup".
         return AccessController.doPrivileged(
-            new PrivilegedAction<Thread>() {
-                public Thread run() {
-                    return new Thread(r);
+                new PrivilegedAction<Thread>() {
+                    public Thread run() {
+                        return SharedSecrets.getJavaLangAccess()
+                                .newThreadWithAcc(r, acc);
+                    }
                 }
-            }
         );
     }
 }
--- a/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	Wed Oct 30 18:38:20 2013 +0000
@@ -67,6 +67,11 @@
      *                     cannot be created, opened, or written to.
      * @throws UnsupportedOperationException if this operation is not supported.
      * @throws NullPointerException if <tt>outputFile</tt> is <tt>null</tt>.
+     * @throws SecurityException
+     *         If a security manager exists and its {@link
+     *         java.lang.SecurityManager#checkWrite(java.lang.String)}
+     *         method denies write access to the named file
+     *         or the caller does not have ManagmentPermission("control").
      */
     public void dumpHeap(String outputFile, boolean live) throws java.io.IOException;
 
--- a/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	Wed Oct 30 18:38:20 2013 +0000
@@ -84,7 +84,7 @@
             lastPackage = pkg;
             printClass(clazz);
             if (clazz.getId() != -1) {
-                out.print(" [" + clazz.getIdString() + "]");
+                print(" [" + clazz.getIdString() + "]");
             }
             out.println("<br>");
         }
--- a/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java	Wed Oct 30 18:38:20 2013 +0000
@@ -112,12 +112,12 @@
         out.println("<h2>Instances</h2>");
 
         printAnchorStart();
-        out.print("instances/" + encodeForURL(clazz));
+        print("instances/" + encodeForURL(clazz));
         out.print("\">");
         out.println("Exclude subclasses</a><br>");
 
         printAnchorStart();
-        out.print("allInstances/" + encodeForURL(clazz));
+        print("allInstances/" + encodeForURL(clazz));
         out.print("\">");
         out.println("Include subclasses</a><br>");
 
@@ -126,19 +126,19 @@
             out.println("<h2>New Instances</h2>");
 
             printAnchorStart();
-            out.print("newInstances/" + encodeForURL(clazz));
+            print("newInstances/" + encodeForURL(clazz));
             out.print("\">");
             out.println("Exclude subclasses</a><br>");
 
             printAnchorStart();
-            out.print("allNewInstances/" + encodeForURL(clazz));
+            print("allNewInstances/" + encodeForURL(clazz));
             out.print("\">");
             out.println("Include subclasses</a><br>");
         }
 
         out.println("<h2>References summary by Type</h2>");
         printAnchorStart();
-        out.print("refsByType/" + encodeForURL(clazz));
+        print("refsByType/" + encodeForURL(clazz));
         out.print("\">");
         out.println("References summary by type</a>");
 
--- a/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java	Wed Oct 30 18:38:20 2013 +0000
@@ -41,21 +41,17 @@
 
 
 import java.net.Socket;
-import java.net.ServerSocket;
-import java.net.InetAddress;
 
 import java.io.InputStream;
 import java.io.BufferedInputStream;
 import java.io.IOException;
-import java.io.Writer;
 import java.io.BufferedWriter;
 import java.io.PrintWriter;
-import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.io.BufferedOutputStream;
 
 import com.sun.tools.hat.internal.model.Snapshot;
 import com.sun.tools.hat.internal.oql.OQLEngine;
+import com.sun.tools.hat.internal.util.Misc;
 
 public class HttpReader implements Runnable {
 
@@ -87,7 +83,7 @@
                 outputError("Protocol error");
             }
             int data;
-            StringBuffer queryBuf = new StringBuffer();
+            StringBuilder queryBuf = new StringBuilder();
             while ((data = in.read()) != -1 && data != ' ') {
                 char ch = (char) data;
                 queryBuf.append(ch);
@@ -217,7 +213,7 @@
     private void outputError(String msg) {
         out.println();
         out.println("<html><body bgcolor=\"#ffffff\">");
-        out.println(msg);
+        out.println(Misc.encodeHtml(msg));
         out.println("</body></html>");
     }
 
--- a/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java	Wed Oct 30 18:38:20 2013 +0000
@@ -102,7 +102,7 @@
             int count = clazz.getInstancesCount(false);
             print("" + count);
             printAnchorStart();
-            out.print("instances/" + encodeForURL(classes[i]));
+            print("instances/" + encodeForURL(classes[i]));
             out.print("\"> ");
             if (count == 1) {
                 print("instance");
@@ -121,7 +121,7 @@
                 }
                 print("(");
                 printAnchorStart();
-                out.print("newInstances/" + encodeForURL(classes[i]));
+                print("newInstances/" + encodeForURL(classes[i]));
                 out.print("\">");
                 print("" + newInst + " new");
                 out.print("</a>) ");
--- a/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java	Wed Oct 30 18:38:20 2013 +0000
@@ -54,10 +54,7 @@
                 out.print((char)ch);
             }
         } catch (Exception exp) {
-            out.println(exp.getMessage());
-            out.println("<pre>");
-            exp.printStackTrace(out);
-            out.println("</pre>");
+            printException(exp);
         }
     }
 }
--- a/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java	Wed Oct 30 18:38:20 2013 +0000
@@ -32,10 +32,7 @@
 
 package com.sun.tools.hat.internal.server;
 
-import com.sun.tools.hat.internal.model.*;
 import com.sun.tools.hat.internal.oql.*;
-import com.sun.tools.hat.internal.util.ArraySorter;
-import com.sun.tools.hat.internal.util.Comparer;
 
 /**
  * This handles Object Query Language (OQL) queries.
@@ -68,7 +65,7 @@
         out.println("<p align='center'>");
         out.println("<textarea name='query' cols=80 rows=10>");
         if (oql != null) {
-            out.println(oql);
+            println(oql);
         }
         out.println("</textarea>");
         out.println("</p>");
@@ -91,10 +88,7 @@
                          try {
                              out.println(engine.toHtml(o));
                          } catch (Exception e) {
-                             out.println(e.getMessage());
-                             out.println("<pre>");
-                             e.printStackTrace(out);
-                             out.println("</pre>");
+                             printException(e);
                          }
                          out.println("</td></tr>");
                          return false;
@@ -102,10 +96,7 @@
                  });
             out.println("</table>");
         } catch (OQLException exp) {
-            out.println(exp.getMessage());
-            out.println("<pre>");
-            exp.printStackTrace(out);
-            out.println("</pre>");
+            printException(exp);
         }
     }
 
--- a/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java	Wed Oct 30 18:38:20 2013 +0000
@@ -36,6 +36,7 @@
 
 import com.sun.tools.hat.internal.model.*;
 import com.sun.tools.hat.internal.util.Misc;
+import java.io.StringWriter;
 
 import java.net.URLEncoder;
 import java.io.UnsupportedEncodingException;
@@ -96,7 +97,7 @@
     }
 
     protected void error(String msg) {
-        out.println(msg);
+        println(msg);
     }
 
     protected void printAnchorStart() {
@@ -160,7 +161,6 @@
             out.println("null");
             return;
         }
-        String name = clazz.getName();
         printAnchorStart();
         out.print("class/");
         print(encodeForURL(clazz));
@@ -208,6 +208,15 @@
         }
     }
 
+    protected void printException(Throwable t) {
+        println(t.getMessage());
+        out.println("<pre>");
+        StringWriter sw = new StringWriter();
+        t.printStackTrace(new PrintWriter(sw));
+        print(sw.toString());
+        out.println("</pre>");
+    }
+
     protected void printHex(long addr) {
         if (snapshot.getIdentifierSize() == 4) {
             out.print(Misc.toHex((int)addr));
@@ -223,4 +232,8 @@
     protected void print(String str) {
         out.print(Misc.encodeHtml(str));
     }
+
+    protected void println(String str) {
+        out.println(Misc.encodeHtml(str));
+    }
 }
--- a/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java	Wed Oct 30 18:38:20 2013 +0000
@@ -89,7 +89,7 @@
             out.println("<p align='center'>");
             printClass(clazz);
             if (clazz.getId() != -1) {
-                out.println("[" + clazz.getIdString() + "]");
+                println("[" + clazz.getIdString() + "]");
             }
             out.println("</p>");
 
@@ -125,9 +125,9 @@
             JavaClass clazz = classes[i];
             out.println("<tr><td>");
             out.print("<a href='/refsByType/");
-            out.print(clazz.getIdString());
+            print(clazz.getIdString());
             out.print("'>");
-            out.print(clazz.getName());
+            print(clazz.getName());
             out.println("</a>");
             out.println("</td><td>");
             out.println(map.get(clazz));
--- a/src/share/classes/java/awt/datatransfer/DataFlavor.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/awt/datatransfer/DataFlavor.java	Wed Oct 30 18:38:20 2013 +0000
@@ -30,6 +30,9 @@
 import java.util.*;
 
 import sun.awt.datatransfer.DataTransferer;
+import sun.reflect.misc.ReflectUtil;
+
+import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
 
 /**
  * A {@code DataFlavor} provides meta information about data. {@code DataFlavor}
@@ -116,27 +119,33 @@
                                                    ClassLoader fallback)
         throws ClassNotFoundException
     {
-        ClassLoader systemClassLoader = (ClassLoader)
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
-                    public Object run() {
-                        ClassLoader cl = Thread.currentThread().
-                            getContextClassLoader();
-                        return (cl != null)
-                            ? cl
-                            : ClassLoader.getSystemClassLoader();
+        ReflectUtil.checkPackageAccess(className);
+        try {
+            SecurityManager sm = System.getSecurityManager();
+            if (sm != null) {
+                sm.checkPermission(GET_CLASSLOADER_PERMISSION);
+            }
+            ClassLoader loader = ClassLoader.getSystemClassLoader();
+            try {
+                // bootstrap class loader and system class loader if present
+                return Class.forName(className, true, loader);
+            }
+            catch (ClassNotFoundException exception) {
+                // thread context class loader if and only if present
+                loader = Thread.currentThread().getContextClassLoader();
+                if (loader != null) {
+                    try {
+                        return Class.forName(className, true, loader);
                     }
-                    });
-
-        try {
-            return Class.forName(className, true, systemClassLoader);
-        } catch (ClassNotFoundException e2) {
-            if (fallback != null) {
-                return Class.forName(className, true, fallback);
-            } else {
-                throw new ClassNotFoundException(className);
+                    catch (ClassNotFoundException e) {
+                        // fallback to user's class loader
+                    }
+                }
             }
+        } catch (SecurityException exception) {
+            // ignore secured class loaders
         }
+        return Class.forName(className, true, fallback);
     }
 
     /*
--- a/src/share/classes/java/beans/Beans.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/beans/Beans.java	Wed Oct 30 18:38:20 2013 +0000
@@ -42,6 +42,8 @@
 import java.io.ObjectStreamClass;
 import java.io.StreamCorruptedException;
 
+import java.lang.reflect.Modifier;
+
 import java.net.URL;
 
 import java.security.AccessController;
@@ -224,6 +226,10 @@
                 throw ex;
             }
 
+            if (!Modifier.isPublic(cl.getModifiers())) {
+                throw new ClassNotFoundException("" + cl + " : no public access");
+            }
+
             /*
              * Try to instantiate the class.
              */
--- a/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Wed Oct 30 18:38:20 2013 +0000
@@ -222,6 +222,9 @@
     // Write out the properties of this instance.
     private void initBean(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
         for (Field field : type.getFields()) {
+            if (!ReflectUtil.isPackageAccessible(field.getDeclaringClass())) {
+                continue;
+            }
             int mod = field.getModifiers();
             if (Modifier.isFinal(mod) || Modifier.isStatic(mod) || Modifier.isTransient(mod)) {
                 continue;
--- a/src/share/classes/java/beans/MetaData.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/beans/MetaData.java	Wed Oct 30 18:38:20 2013 +0000
@@ -42,6 +42,7 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.lang.reflect.InvocationTargetException;
 
 import java.security.AccessController;
@@ -56,7 +57,7 @@
 
 import sun.swing.PrintColorUIResource;
 
-import java.util.Objects;
+import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
 
 /*
  * Like the <code>Intropector</code>, the <code>MetaData</code> class
@@ -850,13 +851,15 @@
 
 static class StaticFieldsPersistenceDelegate extends PersistenceDelegate {
     protected void installFields(Encoder out, Class<?> cls) {
-        Field fields[] = cls.getFields();
-        for(int i = 0; i < fields.length; i++) {
-            Field field = fields[i];
-            // Don't install primitives, their identity will not be preserved
-            // by wrapping.
-            if (Object.class.isAssignableFrom(field.getType())) {
-                out.writeExpression(new Expression(field, "get", new Object[]{null}));
+        if (Modifier.isPublic(cls.getModifiers()) && isPackageAccessible(cls)) {
+            Field fields[] = cls.getFields();
+            for(int i = 0; i < fields.length; i++) {
+                Field field = fields[i];
+                // Don't install primitives, their identity will not be preserved
+                // by wrapping.
+                if (Object.class.isAssignableFrom(field.getType())) {
+                    out.writeExpression(new Expression(field, "get", new Object[]{null}));
+                }
             }
         }
     }
--- a/src/share/classes/java/io/ByteArrayInputStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/ByteArrayInputStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -275,7 +275,6 @@
      * Closing a <tt>ByteArrayInputStream</tt> has no effect. The methods in
      * this class can be called after the stream has been closed without
      * generating an <tt>IOException</tt>.
-     * <p>
      */
     public void close() throws IOException {
     }
--- a/src/share/classes/java/io/ByteArrayOutputStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/ByteArrayOutputStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -263,8 +263,6 @@
      * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in
      * this class can be called after the stream has been closed without
      * generating an <tt>IOException</tt>.
-     * <p>
-     *
      */
     public void close() throws IOException {
     }
--- a/src/share/classes/java/io/Closeable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/Closeable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -34,7 +34,6 @@
  *
  * @since 1.5
  */
-@FunctionalInterface
 public interface Closeable extends AutoCloseable {
 
     /**
--- a/src/share/classes/java/io/DataInput.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/DataInput.java	Wed Oct 30 18:38:20 2013 +0000
@@ -155,7 +155,7 @@
      * to the length of {@code b}.
      * <p>
      * This method blocks until one of the
-     * following conditions occurs:<p>
+     * following conditions occurs:
      * <ul>
      * <li>{@code b.length}
      * bytes of input data are available, in which
@@ -197,7 +197,7 @@
      * <p>
      * This method
      * blocks until one of the following conditions
-     * occurs:<p>
+     * occurs:
      * <ul>
      * <li>{@code len} bytes
      * of input data are available, in which case
@@ -316,8 +316,8 @@
      * be the second byte. The value
      * returned
      * is:
-     * <p><pre><code>(short)((a &lt;&lt; 8) | (b &amp; 0xff))
-     * </code></pre>
+     * <pre>{@code (short)((a << 8) | (b & 0xff))
+     * }</pre>
      * This method
      * is suitable for reading the bytes written
      * by the {@code writeShort} method of
@@ -337,8 +337,8 @@
      * be the first byte read and
      * {@code b}
      * be the second byte. The value returned is:
-     * <p><pre><code>(((a &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff))
-     * </code></pre>
+     * <pre>{@code (((a & 0xff) << 8) | (b & 0xff))
+     * }</pre>
      * This method is suitable for reading the bytes
      * written by the {@code writeShort} method
      * of interface {@code DataOutput}  if
@@ -359,8 +359,8 @@
      * be the first byte read and {@code b}
      * be the second byte. The value
      * returned is:
-     * <p><pre><code>(char)((a &lt;&lt; 8) | (b &amp; 0xff))
-     * </code></pre>
+     * <pre>{@code (char)((a << 8) | (b & 0xff))
+     * }</pre>
      * This method
      * is suitable for reading bytes written by
      * the {@code writeChar} method of interface
@@ -377,10 +377,10 @@
      * Reads four input bytes and returns an
      * {@code int} value. Let {@code a-d}
      * be the first through fourth bytes read. The value returned is:
-     * <p><pre><code>
-     * (((a &amp; 0xff) &lt;&lt; 24) | ((b &amp; 0xff) &lt;&lt; 16) |
-     * &#32;((c &amp; 0xff) &lt;&lt; 8) | (d &amp; 0xff))
-     * </code></pre>
+     * <pre>{@code
+     * (((a & 0xff) << 24) | ((b & 0xff) << 16) |
+     *  ((c & 0xff) <<  8) | (d & 0xff))
+     * }</pre>
      * This method is suitable
      * for reading bytes written by the {@code writeInt}
      * method of interface {@code DataOutput}.
@@ -397,16 +397,16 @@
      * a {@code long} value. Let {@code a-h}
      * be the first through eighth bytes read.
      * The value returned is:
-     * <p><pre><code>
-     * (((long)(a &amp; 0xff) &lt;&lt; 56) |
-     *  ((long)(b &amp; 0xff) &lt;&lt; 48) |
-     *  ((long)(c &amp; 0xff) &lt;&lt; 40) |
-     *  ((long)(d &amp; 0xff) &lt;&lt; 32) |
-     *  ((long)(e &amp; 0xff) &lt;&lt; 24) |
-     *  ((long)(f &amp; 0xff) &lt;&lt; 16) |
-     *  ((long)(g &amp; 0xff) &lt;&lt;  8) |
-     *  ((long)(h &amp; 0xff)))
-     * </code></pre>
+     * <pre>{@code
+     * (((long)(a & 0xff) << 56) |
+     *  ((long)(b & 0xff) << 48) |
+     *  ((long)(c & 0xff) << 40) |
+     *  ((long)(d & 0xff) << 32) |
+     *  ((long)(e & 0xff) << 24) |
+     *  ((long)(f & 0xff) << 16) |
+     *  ((long)(g & 0xff) <<  8) |
+     *  ((long)(h & 0xff)))
+     * }</pre>
      * <p>
      * This method is suitable
      * for reading bytes written by the {@code writeLong}
@@ -540,9 +540,9 @@
      * not match the bit pattern {@code 10xxxxxx},
      * then a {@code UTFDataFormatException}
      * is thrown. Otherwise, the group is converted
-     * to the character:<p>
-     * <pre><code>(char)(((a&amp; 0x1F) &lt;&lt; 6) | (b &amp; 0x3F))
-     * </code></pre>
+     * to the character:
+     * <pre>{@code (char)(((a & 0x1F) << 6) | (b & 0x3F))
+     * }</pre>
      * If the first byte of a group
      * matches the bit pattern {@code 1110xxxx},
      * then the group consists of that byte {@code a}
@@ -554,10 +554,10 @@
      * does not match the bit pattern {@code 10xxxxxx},
      * then a {@code UTFDataFormatException}
      * is thrown. Otherwise, the group is converted
-     * to the character:<p>
-     * <pre><code>
-     * (char)(((a &amp; 0x0F) &lt;&lt; 12) | ((b &amp; 0x3F) &lt;&lt; 6) | (c &amp; 0x3F))
-     * </code></pre>
+     * to the character:
+     * <pre>{@code
+     * (char)(((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F))
+     * }</pre>
      * If the first byte of a group matches the
      * pattern {@code 1111xxxx} or the pattern
      * {@code 10xxxxxx}, then a {@code UTFDataFormatException}
--- a/src/share/classes/java/io/DataOutput.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/DataOutput.java	Wed Oct 30 18:38:20 2013 +0000
@@ -134,11 +134,11 @@
      * Writes two bytes to the output
      * stream to represent the value of the argument.
      * The byte values to be written, in the  order
-     * shown, are: <p>
-     * <pre><code>
-     * (byte)(0xff &amp; (v &gt;&gt; 8))
-     * (byte)(0xff &amp; v)
-     * </code> </pre> <p>
+     * shown, are:
+     * <pre>{@code
+     * (byte)(0xff & (v >> 8))
+     * (byte)(0xff & v)
+     * }</pre> <p>
      * The bytes written by this method may be
      * read by the <code>readShort</code> method
      * of interface <code>DataInput</code> , which
@@ -156,10 +156,10 @@
      * output stream.
      * The byte values to be written, in the  order
      * shown, are:
-     * <p><pre><code>
-     * (byte)(0xff &amp; (v &gt;&gt; 8))
-     * (byte)(0xff &amp; v)
-     * </code></pre><p>
+     * <pre>{@code
+     * (byte)(0xff & (v >> 8))
+     * (byte)(0xff & v)
+     * }</pre><p>
      * The bytes written by this method may be
      * read by the <code>readChar</code> method
      * of interface <code>DataInput</code> , which
@@ -176,12 +176,12 @@
      * comprised of four bytes, to the output stream.
      * The byte values to be written, in the  order
      * shown, are:
-     * <p><pre><code>
-     * (byte)(0xff &amp; (v &gt;&gt; 24))
-     * (byte)(0xff &amp; (v &gt;&gt; 16))
-     * (byte)(0xff &amp; (v &gt;&gt; &#32; &#32;8))
-     * (byte)(0xff &amp; v)
-     * </code></pre><p>
+     * <pre>{@code
+     * (byte)(0xff & (v >> 24))
+     * (byte)(0xff & (v >> 16))
+     * (byte)(0xff & (v >>  8))
+     * (byte)(0xff & v)
+     * }</pre><p>
      * The bytes written by this method may be read
      * by the <code>readInt</code> method of interface
      * <code>DataInput</code> , which will then
@@ -197,16 +197,16 @@
      * comprised of eight bytes, to the output stream.
      * The byte values to be written, in the  order
      * shown, are:
-     * <p><pre><code>
-     * (byte)(0xff &amp; (v &gt;&gt; 56))
-     * (byte)(0xff &amp; (v &gt;&gt; 48))
-     * (byte)(0xff &amp; (v &gt;&gt; 40))
-     * (byte)(0xff &amp; (v &gt;&gt; 32))
-     * (byte)(0xff &amp; (v &gt;&gt; 24))
-     * (byte)(0xff &amp; (v &gt;&gt; 16))
-     * (byte)(0xff &amp; (v &gt;&gt;  8))
-     * (byte)(0xff &amp; v)
-     * </code></pre><p>
+     * <pre>{@code
+     * (byte)(0xff & (v >> 56))
+     * (byte)(0xff & (v >> 48))
+     * (byte)(0xff & (v >> 40))
+     * (byte)(0xff & (v >> 32))
+     * (byte)(0xff & (v >> 24))
+     * (byte)(0xff & (v >> 16))
+     * (byte)(0xff & (v >>  8))
+     * (byte)(0xff & v)
+     * }</pre><p>
      * The bytes written by this method may be
      * read by the <code>readLong</code> method
      * of interface <code>DataInput</code> , which
@@ -314,24 +314,24 @@
      * If a character <code>c</code>
      * is in the range <code>&#92;u0001</code> through
      * <code>&#92;u007f</code>, it is represented
-     * by one byte:<p>
+     * by one byte:
      * <pre>(byte)c </pre>  <p>
      * If a character <code>c</code> is <code>&#92;u0000</code>
      * or is in the range <code>&#92;u0080</code>
      * through <code>&#92;u07ff</code>, then it is
      * represented by two bytes, to be written
-     * in the order shown:<p> <pre><code>
-     * (byte)(0xc0 | (0x1f &amp; (c &gt;&gt; 6)))
-     * (byte)(0x80 | (0x3f &amp; c))
-     *  </code></pre>  <p> If a character
+     * in the order shown: <pre>{@code
+     * (byte)(0xc0 | (0x1f & (c >> 6)))
+     * (byte)(0x80 | (0x3f & c))
+     * }</pre> <p> If a character
      * <code>c</code> is in the range <code>&#92;u0800</code>
      * through <code>uffff</code>, then it is
      * represented by three bytes, to be written
-     * in the order shown:<p> <pre><code>
-     * (byte)(0xe0 | (0x0f &amp; (c &gt;&gt; 12)))
-     * (byte)(0x80 | (0x3f &amp; (c &gt;&gt;  6)))
-     * (byte)(0x80 | (0x3f &amp; c))
-     *  </code></pre>  <p> First,
+     * in the order shown: <pre>{@code
+     * (byte)(0xe0 | (0x0f & (c >> 12)))
+     * (byte)(0x80 | (0x3f & (c >>  6)))
+     * (byte)(0x80 | (0x3f & c))
+     * }</pre>  <p> First,
      * the total number of bytes needed to represent
      * all the characters of <code>s</code> is
      * calculated. If this number is larger than
--- a/src/share/classes/java/io/FilePermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/FilePermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -55,7 +55,7 @@
  * a list of one or more comma-separated keywords. The possible keywords are
  * "read", "write", "execute", "delete", and "readlink". Their meaning is
  * defined as follows:
- * <P>
+ *
  * <DL>
  *    <DT> read <DD> read permission
  *    <DT> write <DD> write permission
@@ -297,11 +297,11 @@
     /**
      * Checks if this FilePermission object "implies" the specified permission.
      * <P>
-     * More specifically, this method returns true if:<p>
+     * More specifically, this method returns true if:
      * <ul>
-     * <li> <i>p</i> is an instanceof FilePermission,<p>
+     * <li> <i>p</i> is an instanceof FilePermission,
      * <li> <i>p</i>'s actions are a proper subset of this
-     * object's actions, and <p>
+     * object's actions, and
      * <li> <i>p</i>'s pathname is implied by this object's
      *      pathname. For example, "/tmp/*" implies "/tmp/foo", since
      *      "/tmp/*" encompasses all files in the "/tmp" directory,
--- a/src/share/classes/java/io/Flushable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/Flushable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -34,7 +34,6 @@
  *
  * @since 1.5
  */
-@FunctionalInterface
 public interface Flushable {
 
     /**
--- a/src/share/classes/java/io/InputStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/InputStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -306,8 +306,7 @@
      *
      * <p> The general contract of <code>reset</code> is:
      *
-     * <p><ul>
-     *
+     * <ul>
      * <li> If the method <code>markSupported</code> returns
      * <code>true</code>, then:
      *
--- a/src/share/classes/java/io/ObjectInputStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/ObjectInputStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -109,7 +109,7 @@
  *
  * <p>Serializable classes that require special handling during the
  * serialization and deserialization process should implement the following
- * methods:<p>
+ * methods:
  *
  * <pre>
  * private void writeObject(java.io.ObjectOutputStream stream)
@@ -491,11 +491,12 @@
     public void defaultReadObject()
         throws IOException, ClassNotFoundException
     {
-        if (curContext == null) {
+        SerialCallbackContext ctx = curContext;
+        if (ctx == null) {
             throw new NotActiveException("not in call to readObject");
         }
-        Object curObj = curContext.getObj();
-        ObjectStreamClass curDesc = curContext.getDesc();
+        Object curObj = ctx.getObj();
+        ObjectStreamClass curDesc = ctx.getDesc();
         bin.setBlockDataMode(false);
         defaultReadFields(curObj, curDesc);
         bin.setBlockDataMode(true);
@@ -529,11 +530,12 @@
     public ObjectInputStream.GetField readFields()
         throws IOException, ClassNotFoundException
     {
-        if (curContext == null) {
+        SerialCallbackContext ctx = curContext;
+        if (ctx == null) {
             throw new NotActiveException("not in call to readObject");
         }
-        Object curObj = curContext.getObj();
-        ObjectStreamClass curDesc = curContext.getDesc();
+        Object curObj = ctx.getObj();
+        ObjectStreamClass curDesc = ctx.getDesc();
         bin.setBlockDataMode(false);
         GetFieldImpl getField = new GetFieldImpl(curDesc);
         getField.readFields();
@@ -1968,7 +1970,6 @@
     private void defaultReadFields(Object obj, ObjectStreamClass desc)
         throws IOException
     {
-        // REMIND: is isInstance check necessary?
         Class<?> cl = desc.forClass();
         if (cl != null && obj != null && !cl.isInstance(obj)) {
             throw new ClassCastException();
--- a/src/share/classes/java/io/ObjectOutputStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/ObjectOutputStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -431,11 +431,12 @@
      *          <code>OutputStream</code>
      */
     public void defaultWriteObject() throws IOException {
-        if ( curContext == null ) {
+        SerialCallbackContext ctx = curContext;
+        if (ctx == null) {
             throw new NotActiveException("not in call to writeObject");
         }
-        Object curObj = curContext.getObj();
-        ObjectStreamClass curDesc = curContext.getDesc();
+        Object curObj = ctx.getObj();
+        ObjectStreamClass curDesc = ctx.getDesc();
         bout.setBlockDataMode(false);
         defaultWriteFields(curObj, curDesc);
         bout.setBlockDataMode(true);
@@ -453,11 +454,12 @@
      */
     public ObjectOutputStream.PutField putFields() throws IOException {
         if (curPut == null) {
-            if (curContext == null) {
+            SerialCallbackContext ctx = curContext;
+            if (ctx == null) {
                 throw new NotActiveException("not in call to writeObject");
             }
-            Object curObj = curContext.getObj();
-            ObjectStreamClass curDesc = curContext.getDesc();
+            Object curObj = ctx.getObj();
+            ObjectStreamClass curDesc = ctx.getDesc();
             curPut = new PutFieldImpl(curDesc);
         }
         return curPut;
@@ -1517,7 +1519,11 @@
     private void defaultWriteFields(Object obj, ObjectStreamClass desc)
         throws IOException
     {
-        // REMIND: perform conservative isInstance check here?
+        Class<?> cl = desc.forClass();
+        if (cl != null && obj != null && !cl.isInstance(obj)) {
+            throw new ClassCastException();
+        }
+
         desc.checkDefaultSerialize();
 
         int primDataSize = desc.getPrimDataSize();
--- a/src/share/classes/java/io/PipedInputStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/PipedInputStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -172,15 +172,14 @@
      * unconnected piped output stream and <code>snk</code>
      * is an unconnected piped input stream, they
      * may be connected by either the call:
-     * <p>
+     *
      * <pre><code>snk.connect(src)</code> </pre>
      * <p>
      * or the call:
-     * <p>
+     *
      * <pre><code>src.connect(snk)</code> </pre>
      * <p>
-     * The two
-     * calls have the same effect.
+     * The two calls have the same effect.
      *
      * @param      src   The piped output stream to connect to.
      * @exception  IOException  if an I/O error occurs.
--- a/src/share/classes/java/io/PipedReader.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/PipedReader.java	Wed Oct 30 18:38:20 2013 +0000
@@ -145,15 +145,14 @@
      * unconnected piped writer and <code>snk</code>
      * is an unconnected piped reader, they
      * may be connected by either the call:
-     * <p>
+     *
      * <pre><code>snk.connect(src)</code> </pre>
      * <p>
      * or the call:
-     * <p>
+     *
      * <pre><code>src.connect(snk)</code> </pre>
      * <p>
-     * The two
-     * calls have the same effect.
+     * The two calls have the same effect.
      *
      * @param      src   The piped writer to connect to.
      * @exception  IOException  if an I/O error occurs.
--- a/src/share/classes/java/io/RandomAccessFile.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/RandomAccessFile.java	Wed Oct 30 18:38:20 2013 +0000
@@ -784,7 +784,7 @@
      * </pre></blockquote>
      * <p>
      * then the result is equal to:
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      *     ((long)b1 &lt;&lt; 56) + ((long)b2 &lt;&lt; 48)
      *     + ((long)b3 &lt;&lt; 40) + ((long)b4 &lt;&lt; 32)
      *     + ((long)b5 &lt;&lt; 24) + ((long)b6 &lt;&lt; 16)
--- a/src/share/classes/java/io/Serializable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/Serializable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -55,7 +55,7 @@
  *
  * Classes that require special handling during the serialization and
  * deserialization process must implement special methods with these exact
- * signatures: <p>
+ * signatures:
  *
  * <PRE>
  * private void writeObject(java.io.ObjectOutputStream out)
@@ -101,7 +101,7 @@
  *
  * <p>Serializable classes that need to designate an alternative object to be
  * used when writing an object to the stream should implement this
- * special method with the exact signature: <p>
+ * special method with the exact signature:
  *
  * <PRE>
  * ANY-ACCESS-MODIFIER Object writeReplace() throws ObjectStreamException;
@@ -115,7 +115,7 @@
  *
  * Classes that need to designate a replacement when an instance of it
  * is read from the stream should implement this special method with the
- * exact signature.<p>
+ * exact signature.
  *
  * <PRE>
  * ANY-ACCESS-MODIFIER Object readResolve() throws ObjectStreamException;
@@ -133,7 +133,7 @@
  * deserialization will result in an {@link InvalidClassException}.  A
  * serializable class can declare its own serialVersionUID explicitly by
  * declaring a field named <code>"serialVersionUID"</code> that must be static,
- * final, and of type <code>long</code>:<p>
+ * final, and of type <code>long</code>:
  *
  * <PRE>
  * ANY-ACCESS-MODIFIER static final long serialVersionUID = 42L;
--- a/src/share/classes/java/io/SerializablePermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/io/SerializablePermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -43,7 +43,6 @@
  * The following table lists all the possible SerializablePermission target names,
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
- * <P>
  *
  * <table border=1 cellpadding=5 summary="Permission target name, what the permission allows, and associated risks">
  * <tr>
--- a/src/share/classes/java/lang/AbstractStringBuilder.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/AbstractStringBuilder.java	Wed Oct 30 18:38:20 2013 +0000
@@ -330,9 +330,9 @@
      * characters to be copied is {@code srcEnd-srcBegin}. The
      * characters are copied into the subarray of {@code dst} starting
      * at index {@code dstBegin} and ending at index:
-     * <p><blockquote><pre>
+     * <pre>{@code
      * dstbegin + (srcEnd-srcBegin) - 1
-     * </pre></blockquote>
+     * }</pre>
      *
      * @param      srcBegin   start copying at this offset.
      * @param      srcEnd     stop copying at this offset.
@@ -859,16 +859,16 @@
      *
      * <p> An invocation of this method of the form
      *
-     * <blockquote><pre>
-     * sb.subSequence(begin,&nbsp;end)</pre></blockquote>
+     * <pre>{@code
+     * sb.subSequence(begin,&nbsp;end)}</pre>
      *
      * behaves in exactly the same way as the invocation
      *
-     * <blockquote><pre>
-     * sb.substring(begin,&nbsp;end)</pre></blockquote>
+     * <pre>{@code
+     * sb.substring(begin,&nbsp;end)}</pre>
      *
      * This method is provided so that this class can
-     * implement the {@link CharSequence} interface. </p>
+     * implement the {@link CharSequence} interface.
      *
      * @param      start   the start index, inclusive.
      * @param      end     the end index, exclusive.
@@ -1287,9 +1287,9 @@
      * Returns the index within this string of the first occurrence of the
      * specified substring. The integer returned is the smallest value
      * <i>k</i> such that:
-     * <blockquote><pre>
+     * <pre>{@code
      * this.toString().startsWith(str, <i>k</i>)
-     * </pre></blockquote>
+     * }</pre>
      * is {@code true}.
      *
      * @param   str   any string.
@@ -1306,10 +1306,10 @@
      * Returns the index within this string of the first occurrence of the
      * specified substring, starting at the specified index.  The integer
      * returned is the smallest value {@code k} for which:
-     * <blockquote><pre>
+     * <pre>{@code
      *     k >= Math.min(fromIndex, this.length()) &&
      *                   this.toString().startsWith(str, k)
-     * </pre></blockquote>
+     * }</pre>
      * If no such value of <i>k</i> exists, then -1 is returned.
      *
      * @param   str         the substring for which to search.
@@ -1326,9 +1326,9 @@
      * of the specified substring.  The rightmost empty string "" is
      * considered to occur at the index value {@code this.length()}.
      * The returned index is the largest value <i>k</i> such that
-     * <blockquote><pre>
+     * <pre>{@code
      * this.toString().startsWith(str, k)
-     * </pre></blockquote>
+     * }</pre>
      * is true.
      *
      * @param   str   the substring to search for.
@@ -1345,10 +1345,10 @@
      * Returns the index within this string of the last occurrence of the
      * specified substring. The integer returned is the largest value <i>k</i>
      * such that:
-     * <blockquote><pre>
+     * <pre>{@code
      *     k <= Math.min(fromIndex, this.length()) &&
      *                   this.toString().startsWith(str, k)
-     * </pre></blockquote>
+     * }</pre>
      * If no such value of <i>k</i> exists, then -1 is returned.
      *
      * @param   str         the substring to search for.
--- a/src/share/classes/java/lang/ArrayStoreException.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/ArrayStoreException.java	Wed Oct 30 18:38:20 2013 +0000
@@ -29,7 +29,7 @@
  * Thrown to indicate that an attempt has been made to store the
  * wrong type of object into an array of objects. For example, the
  * following code generates an <code>ArrayStoreException</code>:
- * <p><blockquote><pre>
+ * <blockquote><pre>
  *     Object x[] = new String[3];
  *     x[0] = new Integer(0);
  * </pre></blockquote>
--- a/src/share/classes/java/lang/AutoCloseable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/AutoCloseable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -48,7 +48,6 @@
  * @author Josh Bloch
  * @since 1.7
  */
-@FunctionalInterface
 public interface AutoCloseable {
     /**
      * Closes this resource, relinquishing any underlying resources.
--- a/src/share/classes/java/lang/Byte.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Byte.java	Wed Oct 30 18:38:20 2013 +0000
@@ -244,7 +244,7 @@
      * <dd><i>Sign<sub>opt</sub></i> {@code 0X} <i>HexDigits</i>
      * <dd><i>Sign<sub>opt</sub></i> {@code #} <i>HexDigits</i>
      * <dd><i>Sign<sub>opt</sub></i> {@code 0} <i>OctalDigits</i>
-     * <p>
+     *
      * <dt><i>Sign:</i>
      * <dd>{@code -}
      * <dd>{@code +}
--- a/src/share/classes/java/lang/Character.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Character.java	Wed Oct 30 18:38:20 2013 +0000
@@ -5394,7 +5394,7 @@
      * Other_Lowercase as defined by the Unicode Standard.
      * <p>
      * The following are examples of lowercase characters:
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      * a b c d e f g h i j k l m n o p q r s t u v w x y z
      * '&#92;u00DF' '&#92;u00E0' '&#92;u00E1' '&#92;u00E2' '&#92;u00E3' '&#92;u00E4' '&#92;u00E5' '&#92;u00E6'
      * '&#92;u00E7' '&#92;u00E8' '&#92;u00E9' '&#92;u00EA' '&#92;u00EB' '&#92;u00EC' '&#92;u00ED' '&#92;u00EE'
@@ -5430,7 +5430,7 @@
      * Other_Lowercase as defined by the Unicode Standard.
      * <p>
      * The following are examples of lowercase characters:
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      * a b c d e f g h i j k l m n o p q r s t u v w x y z
      * '&#92;u00DF' '&#92;u00E0' '&#92;u00E1' '&#92;u00E2' '&#92;u00E3' '&#92;u00E4' '&#92;u00E5' '&#92;u00E6'
      * '&#92;u00E7' '&#92;u00E8' '&#92;u00E9' '&#92;u00EA' '&#92;u00EB' '&#92;u00EC' '&#92;u00ED' '&#92;u00EE'
@@ -5461,14 +5461,14 @@
      * or it has contributory property Other_Uppercase as defined by the Unicode Standard.
      * <p>
      * The following are examples of uppercase characters:
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
      * '&#92;u00C0' '&#92;u00C1' '&#92;u00C2' '&#92;u00C3' '&#92;u00C4' '&#92;u00C5' '&#92;u00C6' '&#92;u00C7'
      * '&#92;u00C8' '&#92;u00C9' '&#92;u00CA' '&#92;u00CB' '&#92;u00CC' '&#92;u00CD' '&#92;u00CE' '&#92;u00CF'
      * '&#92;u00D0' '&#92;u00D1' '&#92;u00D2' '&#92;u00D3' '&#92;u00D4' '&#92;u00D5' '&#92;u00D6' '&#92;u00D8'
      * '&#92;u00D9' '&#92;u00DA' '&#92;u00DB' '&#92;u00DC' '&#92;u00DD' '&#92;u00DE'
      * </pre></blockquote>
-     * <p> Many other Unicode characters are uppercase too.<p>
+     * <p> Many other Unicode characters are uppercase too.
      *
      * <p><b>Note:</b> This method cannot handle <a
      * href="#supplementary"> supplementary characters</a>. To support
@@ -5496,7 +5496,7 @@
      * or it has contributory property Other_Uppercase as defined by the Unicode Standard.
      * <p>
      * The following are examples of uppercase characters:
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
      * '&#92;u00C0' '&#92;u00C1' '&#92;u00C2' '&#92;u00C3' '&#92;u00C4' '&#92;u00C5' '&#92;u00C6' '&#92;u00C7'
      * '&#92;u00C8' '&#92;u00C9' '&#92;u00CA' '&#92;u00CB' '&#92;u00CC' '&#92;u00CD' '&#92;u00CE' '&#92;u00CF'
@@ -5540,7 +5540,7 @@
      * <li>{@code LATIN CAPITAL LETTER N WITH SMALL LETTER J}
      * <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z}
      * </ul>
-     * <p> Many other Unicode characters are titlecase too.<p>
+     * <p> Many other Unicode characters are titlecase too.
      *
      * <p><b>Note:</b> This method cannot handle <a
      * href="#supplementary"> supplementary characters</a>. To support
--- a/src/share/classes/java/lang/Class.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Class.java	Wed Oct 30 18:38:20 2013 +0000
@@ -91,7 +91,7 @@
  * <p> The following example uses a {@code Class} object to print the
  * class name of an object:
  *
- * <p> <blockquote><pre>
+ * <blockquote><pre>
  *     void printClassName(Object obj) {
  *         System.out.println("The class of " + obj +
  *                            " is " + obj.getClass().getName());
@@ -103,7 +103,7 @@
  * <cite>The Java&trade; Language Specification</cite>.
  * For example:
  *
- * <p> <blockquote>
+ * <blockquote>
  *     {@code System.out.println("The name of class Foo is: "+Foo.class.getName());}
  * </blockquote>
  *
@@ -1209,9 +1209,25 @@
      * type, or void,then this method returns null.
      *
      * @return the declaring class for this class
+     * @throws SecurityException
+     *         If a security manager, <i>s</i>, is present and the caller's
+     *         class loader is not the same as or an ancestor of the class
+     *         loader for the declaring class and invocation of {@link
+     *         SecurityManager#checkPackageAccess s.checkPackageAccess()}
+     *         denies access to the package of the declaring class
      * @since JDK1.1
      */
-    public native Class<?> getDeclaringClass();
+    @CallerSensitive
+    public Class<?> getDeclaringClass() throws SecurityException {
+        final Class<?> candidate = getDeclaringClass0();
+
+        if (candidate != null)
+            candidate.checkPackageAccess(
+                    ClassLoader.getClassLoader(Reflection.getCallerClass()), true);
+        return candidate;
+    }
+
+    private native Class<?> getDeclaringClass0();
 
 
     /**
@@ -1555,6 +1571,10 @@
      * <p> If this {@code Class} object represents a primitive type or void,
      * then the returned array has length 0.
      *
+     * <p> Static methods declared in superinterfaces of the class or interface
+     * represented by this {@code Class} object are not considered members of
+     * the class or interface.
+     *
      * <p> The elements in the returned array are not sorted and are not in any
      * particular order.
      *
@@ -1713,6 +1733,10 @@
      * <p> If this {@code Class} object represents an array type, then this
      * method does not find the {@code clone()} method.
      *
+     * <p> Static methods declared in superinterfaces of the class or interface
+     * represented by this {@code Class} object are not considered members of
+     * the class or interface.
+     *
      * @param name the name of the method
      * @param parameterTypes the list of parameters
      * @return the {@code Method} object that matches the specified
@@ -1736,7 +1760,7 @@
     public Method getMethod(String name, Class<?>... parameterTypes)
         throws NoSuchMethodException, SecurityException {
         checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
-        Method method = getMethod0(name, parameterTypes);
+        Method method = getMethod0(name, parameterTypes, true);
         if (method == null) {
             throw new NoSuchMethodException(getName() + "." + name + argumentTypesToString(parameterTypes));
         }
@@ -2711,6 +2735,14 @@
             }
         }
 
+        void addAllNonStatic(Method[] methods) {
+            for (Method candidate : methods) {
+                if (!Modifier.isStatic(candidate.getModifiers())) {
+                    add(candidate);
+                }
+            }
+        }
+
         int length() {
             return length;
         }
@@ -2781,7 +2813,7 @@
         MethodArray inheritedMethods = new MethodArray();
         Class<?>[] interfaces = getInterfaces();
         for (int i = 0; i < interfaces.length; i++) {
-            inheritedMethods.addAll(interfaces[i].privateGetPublicMethods());
+            inheritedMethods.addAllNonStatic(interfaces[i].privateGetPublicMethods());
         }
         if (!isInterface()) {
             Class<?> c = getSuperclass();
@@ -2884,7 +2916,7 @@
     }
 
 
-    private Method getMethod0(String name, Class<?>[] parameterTypes) {
+    private Method getMethod0(String name, Class<?>[] parameterTypes, boolean includeStaticMethods) {
         // Note: the intent is that the search algorithm this routine
         // uses be equivalent to the ordering imposed by
         // privateGetPublicMethods(). It fetches only the declared
@@ -2897,25 +2929,23 @@
         if ((res = searchMethods(privateGetDeclaredMethods(true),
                                  name,
                                  parameterTypes)) != null) {
-            return res;
+            if (includeStaticMethods || !Modifier.isStatic(res.getModifiers()))
+                return res;
         }
         // Search superclass's methods
         if (!isInterface()) {
             Class<? super T> c = getSuperclass();
             if (c != null) {
-                if ((res = c.getMethod0(name, parameterTypes)) != null) {
+                if ((res = c.getMethod0(name, parameterTypes, true)) != null) {
                     return res;
                 }
             }
         }
         // Search superinterfaces' methods
         Class<?>[] interfaces = getInterfaces();
-        for (int i = 0; i < interfaces.length; i++) {
-            Class<?> c = interfaces[i];
-            if ((res = c.getMethod0(name, parameterTypes)) != null) {
+        for (Class<?> c : interfaces)
+            if ((res = c.getMethod0(name, parameterTypes, false)) != null)
                 return res;
-            }
-        }
         // Not found
         return null;
     }
@@ -3284,7 +3314,10 @@
     public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationClass) {
         Objects.requireNonNull(annotationClass);
 
-        return AnnotationSupport.getMultipleAnnotations(annotationData().annotations, annotationClass);
+        AnnotationData annotationData = annotationData();
+        return AnnotationSupport.getAssociatedAnnotations(annotationData.declaredAnnotations,
+                                                          this,
+                                                          annotationClass);
     }
 
     /**
@@ -3314,7 +3347,8 @@
     public <A extends Annotation> A[] getDeclaredAnnotationsByType(Class<A> annotationClass) {
         Objects.requireNonNull(annotationClass);
 
-        return AnnotationSupport.getMultipleAnnotations(annotationData().declaredAnnotations, annotationClass);
+        return AnnotationSupport.getDirectlyAndIndirectlyPresent(annotationData().declaredAnnotations,
+                                                                 annotationClass);
     }
 
     /**
@@ -3408,6 +3442,10 @@
         return annotationType;
     }
 
+    Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap() {
+        return annotationData().declaredAnnotations;
+    }
+
     /* Backing store of user-defined values pertaining to this class.
      * Maintained by the ClassValue class.
      */
--- a/src/share/classes/java/lang/ClassCastException.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/ClassCastException.java	Wed Oct 30 18:38:20 2013 +0000
@@ -29,7 +29,7 @@
  * Thrown to indicate that the code has attempted to cast an object
  * to a subclass of which it is not an instance. For example, the
  * following code generates a <code>ClassCastException</code>:
- * <p><blockquote><pre>
+ * <blockquote><pre>
  *     Object x = new Integer(0);
  *     System.out.println((String)x);
  * </pre></blockquote>
--- a/src/share/classes/java/lang/ClassLoader.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/ClassLoader.java	Wed Oct 30 18:38:20 2013 +0000
@@ -57,6 +57,7 @@
 import sun.misc.VM;
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
+import sun.reflect.misc.ReflectUtil;
 import sun.security.util.SecurityConstants;
 
 /**
@@ -361,7 +362,7 @@
      * default implementation of this method searches for classes in the
      * following order:
      *
-     * <p><ol>
+     * <ol>
      *
      *   <li><p> Invoke {@link #findLoadedClass(String)} to check if the class
      *   has already been loaded.  </p></li>
@@ -486,6 +487,13 @@
     private void checkPackageAccess(Class<?> cls, ProtectionDomain pd) {
         final SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
+            if (ReflectUtil.isNonPublicProxyClass(cls)) {
+                for (Class<?> intf: cls.getInterfaces()) {
+                    checkPackageAccess(intf, pd);
+                }
+                return;
+            }
+
             final String name = cls.getName();
             final int i = name.lastIndexOf('.');
             if (i != -1) {
--- a/src/share/classes/java/lang/ClassValue.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/ClassValue.java	Wed Oct 30 18:38:20 2013 +0000
@@ -692,7 +692,7 @@
 
         /** Remove all stale entries, everywhere. */
         private void removeStaleEntries() {
-            Entry[] cache = getCache();
+            Entry<?>[] cache = getCache();
             removeStaleEntries(cache, 0, cache.length + PROBE_LIMIT - 1);
         }
 
--- a/src/share/classes/java/lang/Comparable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Comparable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -93,7 +93,6 @@
  * @see java.util.Comparator
  * @since 1.2
  */
-@FunctionalInterface
 public interface Comparable<T> {
     /**
      * Compares this object with the specified object for order.  Returns a
--- a/src/share/classes/java/lang/ConditionalSpecialCasing.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/ConditionalSpecialCasing.java	Wed Oct 30 18:38:20 2013 +0000
@@ -74,7 +74,6 @@
         new Entry(0x00CC, new char[]{0x0069, 0x0307, 0x0300}, new char[]{0x00CC}, "lt", 0), // # LATIN CAPITAL LETTER I WITH GRAVE
         new Entry(0x00CD, new char[]{0x0069, 0x0307, 0x0301}, new char[]{0x00CD}, "lt", 0), // # LATIN CAPITAL LETTER I WITH ACUTE
         new Entry(0x0128, new char[]{0x0069, 0x0307, 0x0303}, new char[]{0x0128}, "lt", 0), // # LATIN CAPITAL LETTER I WITH TILDE
-        new Entry(0x0130, new char[]{0x0069, 0x0307}, new char[]{0x0130}, "lt", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
 
         //# ================================================================================
         //# Turkish and Azeri
@@ -85,10 +84,7 @@
         new Entry(0x0049, new char[]{0x0131}, new char[]{0x0049}, "tr", NOT_BEFORE_DOT), // # LATIN CAPITAL LETTER I
         new Entry(0x0049, new char[]{0x0131}, new char[]{0x0049}, "az", NOT_BEFORE_DOT), // # LATIN CAPITAL LETTER I
         new Entry(0x0069, new char[]{0x0069}, new char[]{0x0130}, "tr", 0), // # LATIN SMALL LETTER I
-        new Entry(0x0069, new char[]{0x0069}, new char[]{0x0130}, "az", 0), // # LATIN SMALL LETTER I
-        //# ================================================================================
-        //# Other
-        new Entry(0x0130, new char[]{0x0069, 0x0307}, new char[]{0x0130}, "en", 0), // # LATIN CAPITALLETTER I WITH DOT ABOVE
+        new Entry(0x0069, new char[]{0x0069}, new char[]{0x0130}, "az", 0)  // # LATIN SMALL LETTER I
     };
 
     // A hash table that contains the above entries
--- a/src/share/classes/java/lang/Double.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Double.java	Wed Oct 30 18:38:20 2013 +0000
@@ -361,15 +361,11 @@
      * <dd><i>SignedInteger</i>
      * </dl>
      *
-     * <p>
-     *
      * <dl>
      * <dt><i>HexFloatingPointLiteral</i>:
      * <dd> <i>HexSignificand BinaryExponent FloatTypeSuffix<sub>opt</sub></i>
      * </dl>
      *
-     * <p>
-     *
      * <dl>
      * <dt><i>HexSignificand:</i>
      * <dd><i>HexNumeral</i>
@@ -380,15 +376,11 @@
      *     </i>{@code .} <i>HexDigits</i>
      * </dl>
      *
-     * <p>
-     *
      * <dl>
      * <dt><i>BinaryExponent:</i>
      * <dd><i>BinaryExponentIndicator SignedInteger</i>
      * </dl>
      *
-     * <p>
-     *
      * <dl>
      * <dt><i>BinaryExponentIndicator:</i>
      * <dd>{@code p}
--- a/src/share/classes/java/lang/Float.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Float.java	Wed Oct 30 18:38:20 2013 +0000
@@ -321,15 +321,11 @@
      * <dd><i>SignedInteger</i>
      * </dl>
      *
-     * <p>
-     *
      * <dl>
      * <dt><i>HexFloatingPointLiteral</i>:
      * <dd> <i>HexSignificand BinaryExponent FloatTypeSuffix<sub>opt</sub></i>
      * </dl>
      *
-     * <p>
-     *
      * <dl>
      * <dt><i>HexSignificand:</i>
      * <dd><i>HexNumeral</i>
@@ -340,15 +336,11 @@
      *     </i>{@code .} <i>HexDigits</i>
      * </dl>
      *
-     * <p>
-     *
      * <dl>
      * <dt><i>BinaryExponent:</i>
      * <dd><i>BinaryExponentIndicator SignedInteger</i>
      * </dl>
      *
-     * <p>
-     *
      * <dl>
      * <dt><i>BinaryExponentIndicator:</i>
      * <dd>{@code p}
--- a/src/share/classes/java/lang/Integer.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Integer.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1123,7 +1123,7 @@
      * <dd><i>Sign<sub>opt</sub></i> {@code 0X} <i>HexDigits</i>
      * <dd><i>Sign<sub>opt</sub></i> {@code #} <i>HexDigits</i>
      * <dd><i>Sign<sub>opt</sub></i> {@code 0} <i>OctalDigits</i>
-     * <p>
+     *
      * <dt><i>Sign:</i>
      * <dd>{@code -}
      * <dd>{@code +}
--- a/src/share/classes/java/lang/Iterable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Iterable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -42,7 +42,6 @@
  * @since 1.5
  * @jls 14.14.2 The enhanced for statement
  */
-@FunctionalInterface
 public interface Iterable<T> {
     /**
      * Returns an iterator over elements of type {@code T}.
@@ -52,10 +51,12 @@
     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.
+     * Performs the given action for each element of the {@code Iterable}
+     * until all elements have been processed or the action throws an
+     * exception.  Unless otherwise specified by the implementing class,
+     * actions are performed in the order of iteration (if an iteration order
+     * is specified).  Exceptions thrown by the action are relayed to the
+     * caller.
      *
      * @implSpec
      * <p>The default implementation behaves as if:
@@ -100,4 +101,3 @@
         return Spliterators.spliteratorUnknownSize(iterator(), 0);
     }
 }
-
--- a/src/share/classes/java/lang/Long.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Long.java	Wed Oct 30 18:38:20 2013 +0000
@@ -853,7 +853,7 @@
      * <dd><i>Sign<sub>opt</sub></i> {@code 0X} <i>HexDigits</i>
      * <dd><i>Sign<sub>opt</sub></i> {@code #} <i>HexDigits</i>
      * <dd><i>Sign<sub>opt</sub></i> {@code 0} <i>OctalDigits</i>
-     * <p>
+     *
      * <dt><i>Sign:</i>
      * <dd>{@code -}
      * <dd>{@code +}
--- a/src/share/classes/java/lang/Readable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Readable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -34,7 +34,6 @@
  *
  * @since 1.5
  */
-@FunctionalInterface
 public interface Readable {
 
     /**
--- a/src/share/classes/java/lang/RuntimePermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/RuntimePermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -47,7 +47,6 @@
  * The following table lists all the possible RuntimePermission target names,
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
- * <P>
  *
  * <table border=1 cellpadding=5 summary="permission target name,
  *  what the target allows,and associated risks">
--- a/src/share/classes/java/lang/SecurityManager.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/SecurityManager.java	Wed Oct 30 18:38:20 2013 +0000
@@ -56,7 +56,7 @@
  * are called by various methods in the Java libraries before those
  * methods perform certain potentially sensitive operations. The
  * invocation of such a <code>check</code> method typically looks like this:
- * <p><blockquote><pre>
+ * <blockquote><pre>
  *     SecurityManager security = System.getSecurityManager();
  *     if (security != null) {
  *         security.check<i>XXX</i>(argument, &nbsp;.&nbsp;.&nbsp;.&nbsp;);
@@ -323,7 +323,7 @@
      * by {@link ClassLoader#getSystemClassLoader}) or one of its ancestors.
      * <p>
      * This method will return
-     * <code>null</code> in the following three cases:<p>
+     * <code>null</code> in the following three cases:
      * <ol>
      *   <li>All methods on the execution stack are from classes
      *   defined using the system class loader or one of its ancestors.
@@ -370,7 +370,7 @@
      * by {@link ClassLoader#getSystemClassLoader}) or one of its ancestors.
      * <p>
      * This method will return
-     * <code>null</code> in the following three cases:<p>
+     * <code>null</code> in the following three cases:
      * <ol>
      *   <li>All methods on the execution stack are from classes
      *   defined using the system class loader or one of its ancestors.
@@ -429,7 +429,7 @@
      * by {@link ClassLoader#getSystemClassLoader}) or one of its ancestors.
      * <p>
      * This method will return
-     * -1 in the following three cases:<p>
+     * -1 in the following three cases:
      * <ol>
      *   <li>All methods on the execution stack are from classes
      *   defined using the system class loader or one of its ancestors.
@@ -1281,7 +1281,6 @@
      * This method calls <code>checkPermission</code> with the
      * <code>PropertyPermission(key, "read")</code> permission.
      * <p>
-     * <p>
      * If you override this method, then you should make a call to
      * <code>super.checkPropertyAccess</code>
      * at the point the overridden method would normally throw an
@@ -1714,7 +1713,7 @@
             throw new NullPointerException("class can't be null");
         }
         if (which != Member.PUBLIC) {
-            Class stack[] = getClassContext();
+            Class<?> stack[] = getClassContext();
             /*
              * stack depth of 4 should be the caller of one of the
              * methods in java.lang.Class that invoke checkMember
--- a/src/share/classes/java/lang/Short.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Short.java	Wed Oct 30 18:38:20 2013 +0000
@@ -249,7 +249,7 @@
      * <dd><i>Sign<sub>opt</sub></i> {@code 0X} <i>HexDigits</i>
      * <dd><i>Sign<sub>opt</sub></i> {@code #} <i>HexDigits</i>
      * <dd><i>Sign<sub>opt</sub></i> {@code 0} <i>OctalDigits</i>
-     * <p>
+     *
      * <dt><i>Sign:</i>
      * <dd>{@code -}
      * <dd>{@code +}
--- a/src/share/classes/java/lang/String.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/String.java	Wed Oct 30 18:38:20 2013 +0000
@@ -47,16 +47,16 @@
  * Strings are constant; their values cannot be changed after they
  * are created. String buffers support mutable strings.
  * Because String objects are immutable they can be shared. For example:
- * <p><blockquote><pre>
+ * <blockquote><pre>
  *     String str = "abc";
  * </pre></blockquote><p>
  * is equivalent to:
- * <p><blockquote><pre>
+ * <blockquote><pre>
  *     char data[] = {'a', 'b', 'c'};
  *     String str = new String(data);
  * </pre></blockquote><p>
  * Here are some more examples of how strings can be used:
- * <p><blockquote><pre>
+ * <blockquote><pre>
  *     System.out.println("abc");
  *     String cde = "cde";
  *     System.out.println("abc" + cde);
@@ -786,7 +786,7 @@
      * {@code srcEnd-srcBegin}). The characters are copied into the
      * subarray of {@code dst} starting at index {@code dstBegin}
      * and ending at index:
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      *     dstbegin + (srcEnd-srcBegin) - 1
      * </pre></blockquote>
      *
@@ -2598,21 +2598,14 @@
             }
             if (localeDependent || srcChar == '\u03A3') { // GREEK CAPITAL LETTER SIGMA
                 lowerChar = ConditionalSpecialCasing.toLowerCaseEx(this, i, locale);
-            } else if (srcChar == '\u0130') { // LATIN CAPITAL LETTER I DOT
-                lowerChar = Character.ERROR;
             } else {
                 lowerChar = Character.toLowerCase(srcChar);
             }
             if ((lowerChar == Character.ERROR)
                     || (lowerChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
                 if (lowerChar == Character.ERROR) {
-                    if (!localeDependent && srcChar == '\u0130') {
-                        lowerCharArray =
-                                ConditionalSpecialCasing.toLowerCaseCharArray(this, i, Locale.ENGLISH);
-                    } else {
-                        lowerCharArray =
-                                ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale);
-                    }
+                    lowerCharArray =
+                            ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale);
                 } else if (srcCount == 2) {
                     resultOffset += Character.toChars(lowerChar, result, i + resultOffset) - srcCount;
                     continue;
@@ -2669,7 +2662,7 @@
      * {@code String} may be a different length than the original {@code String}.
      * <p>
      * Examples of locale-sensitive and 1:M case mappings are in the following table.
-     * <p>
+     *
      * <table border="1" summary="Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.">
      * <tr>
      *   <th>Language Code of Locale</th>
--- a/src/share/classes/java/lang/System.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/System.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,9 +26,12 @@
 
 import java.io.*;
 import java.lang.reflect.Executable;
+import java.lang.annotation.Annotation;
+import java.security.AccessControlContext;
 import java.util.Properties;
 import java.util.PropertyPermission;
 import java.util.StringTokenizer;
+import java.util.Map;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.security.AllPermission;
@@ -1226,6 +1229,9 @@
             public AnnotationType getAnnotationType(Class<?> klass) {
                 return klass.getAnnotationType();
             }
+            public Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap(Class<?> klass) {
+                return klass.getDeclaredAnnotationMap();
+            }
             public byte[] getRawClassAnnotations(Class<?> klass) {
                 return klass.getRawAnnotations();
             }
@@ -1254,6 +1260,9 @@
             public String newStringUnsafe(char[] chars) {
                 return new String(chars, true);
             }
+            public Thread newThreadWithAcc(Runnable target, AccessControlContext acc) {
+                return new Thread(target, acc);
+            }
         });
     }
 }
--- a/src/share/classes/java/lang/Thread.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/Thread.java	Wed Oct 30 18:38:20 2013 +0000
@@ -76,7 +76,7 @@
  * <code>Thread</code>. An instance of the subclass can then be
  * allocated and started. For example, a thread that computes primes
  * larger than a stated value could be written as follows:
- * <p><hr><blockquote><pre>
+ * <hr><blockquote><pre>
  *     class PrimeThread extends Thread {
  *         long minPrime;
  *         PrimeThread(long minPrime) {
@@ -91,7 +91,7 @@
  * </pre></blockquote><hr>
  * <p>
  * The following code would then create a thread and start it running:
- * <p><blockquote><pre>
+ * <blockquote><pre>
  *     PrimeThread p = new PrimeThread(143);
  *     p.start();
  * </pre></blockquote>
@@ -102,7 +102,7 @@
  * then be allocated, passed as an argument when creating
  * <code>Thread</code>, and started. The same example in this other
  * style looks like the following:
- * <p><hr><blockquote><pre>
+ * <hr><blockquote><pre>
  *     class PrimeRun implements Runnable {
  *         long minPrime;
  *         PrimeRun(long minPrime) {
@@ -117,7 +117,7 @@
  * </pre></blockquote><hr>
  * <p>
  * The following code would then create a thread and start it running:
- * <p><blockquote><pre>
+ * <blockquote><pre>
  *     PrimeRun p = new PrimeRun(143);
  *     new Thread(p).start();
  * </pre></blockquote>
@@ -341,6 +341,15 @@
     }
 
     /**
+     * Initializes a Thread with the current AccessControlContext.
+     * @see #init(ThreadGroup,Runnable,String,long,AccessControlContext)
+     */
+    private void init(ThreadGroup g, Runnable target, String name,
+                      long stackSize) {
+        init(g, target, name, stackSize, null);
+    }
+
+    /**
      * Initializes a Thread.
      *
      * @param g the Thread group
@@ -348,9 +357,11 @@
      * @param name the name of the new Thread
      * @param stackSize the desired stack size for the new thread, or
      *        zero to indicate that this parameter is to be ignored.
+     * @param acc the AccessControlContext to inherit, or
+     *            AccessController.getContext() if null
      */
     private void init(ThreadGroup g, Runnable target, String name,
-                      long stackSize) {
+                      long stackSize, AccessControlContext acc) {
         if (name == null) {
             throw new NullPointerException("name cannot be null");
         }
@@ -396,7 +407,8 @@
             this.contextClassLoader = parent.getContextClassLoader();
         else
             this.contextClassLoader = parent.contextClassLoader;
-        this.inheritedAccessControlContext = AccessController.getContext();
+        this.inheritedAccessControlContext =
+                acc != null ? acc : AccessController.getContext();
         this.target = target;
         setPriority(priority);
         if (parent.inheritableThreadLocals != null)
@@ -449,6 +461,14 @@
     }
 
     /**
+     * Creates a new Thread that inherits the given AccessControlContext.
+     * This is not a public constructor.
+     */
+    Thread(Runnable target, AccessControlContext acc) {
+        init(null, target, "Thread-" + nextThreadNum(), 0, acc);
+    }
+
+    /**
      * Allocates a new {@code Thread} object. This constructor has the same
      * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
      * {@code (group, target, gname)} ,where {@code gname} is a newly generated
--- a/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -101,7 +101,6 @@
      *                       should implement.
      * @param additionalBridges Method types for additional signatures to be
      *                          bridged to the implementation method
-     * @throws ReflectiveOperationException
      * @throws LambdaConversionException If any of the meta-factory protocol
      * invariants are violated
      */
@@ -114,7 +113,7 @@
                                        boolean isSerializable,
                                        Class<?>[] markerInterfaces,
                                        MethodType[] additionalBridges)
-            throws ReflectiveOperationException, LambdaConversionException {
+            throws LambdaConversionException {
         this.targetClass = caller.lookupClass();
         this.invokedType = invokedType;
 
@@ -160,7 +159,7 @@
      * @throws ReflectiveOperationException
      */
     abstract CallSite buildCallSite()
-            throws ReflectiveOperationException, LambdaConversionException;
+            throws LambdaConversionException;
 
     /**
      * Check the meta-factory arguments for errors
--- a/src/share/classes/java/lang/invoke/CallSite.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/CallSite.java	Wed Oct 30 18:38:20 2013 +0000
@@ -124,7 +124,7 @@
      *         or if the target returned by the hook is not of the given {@code targetType}
      * @throws NullPointerException if the hook returns a null value
      * @throws ClassCastException if the hook returns something other than a {@code MethodHandle}
-     * @throws Throwable anything else thrown by the the hook function
+     * @throws Throwable anything else thrown by the hook function
      */
     /*package-private*/
     CallSite(MethodType targetType, MethodHandle createTargetHook) throws Throwable {
--- a/src/share/classes/java/lang/invoke/ConstantCallSite.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/ConstantCallSite.java	Wed Oct 30 18:38:20 2013 +0000
@@ -75,7 +75,7 @@
      *         or if the target returned by the hook is not of the given {@code targetType}
      * @throws NullPointerException if the hook returns a null value
      * @throws ClassCastException if the hook returns something other than a {@code MethodHandle}
-     * @throws Throwable anything else thrown by the the hook function
+     * @throws Throwable anything else thrown by the hook function
      */
     protected ConstantCallSite(MethodType targetType, MethodHandle createTargetHook) throws Throwable {
         super(targetType, createTargetHook);
@@ -85,7 +85,7 @@
     /**
      * Returns the target method of the call site, which behaves
      * like a {@code final} field of the {@code ConstantCallSite}.
-     * That is, the the target is always the original value passed
+     * That is, the target is always the original value passed
      * to the constructor call which created this instance.
      *
      * @return the immutable linkage state of this call site, a constant method handle
--- a/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -33,9 +33,10 @@
 import java.lang.reflect.Constructor;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
+import java.util.LinkedHashSet;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.PropertyPermission;
+import java.util.Set;
 
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
 
@@ -50,14 +51,13 @@
 
     private static final int CLASSFILE_VERSION = 51;
     private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE);
-    private static final String NAME_MAGIC_ACCESSOR_IMPL = "java/lang/invoke/MagicLambdaImpl";
+    private static final String JAVA_LANG_OBJECT = "java/lang/Object";
     private static final String NAME_CTOR = "<init>";
 
     //Serialization support
     private static final String NAME_SERIALIZED_LAMBDA = "java/lang/invoke/SerializedLambda";
     private static final String DESCR_METHOD_WRITE_REPLACE = "()Ljava/lang/Object;";
     private static final String NAME_METHOD_WRITE_REPLACE = "writeReplace";
-    private static final String NAME_OBJECT = "java/lang/Object";
     private static final String DESCR_CTOR_SERIALIZED_LAMBDA
             = MethodType.methodType(void.class,
                                     Class.class,
@@ -128,7 +128,6 @@
      *                       should implement.
      * @param additionalBridges Method types for additional signatures to be
      *                          bridged to the implementation method
-     * @throws ReflectiveOperationException
      * @throws LambdaConversionException If any of the meta-factory protocol
      * invariants are violated
      */
@@ -141,7 +140,7 @@
                                        boolean isSerializable,
                                        Class<?>[] markerInterfaces,
                                        MethodType[] additionalBridges)
-            throws ReflectiveOperationException, LambdaConversionException {
+            throws LambdaConversionException {
         super(caller, invokedType, samMethodName, samMethodType,
               implMethod, instantiatedMethodType,
               isSerializable, markerInterfaces, additionalBridges);
@@ -179,7 +178,7 @@
      * is not found
      */
     @Override
-    CallSite buildCallSite() throws ReflectiveOperationException, LambdaConversionException {
+    CallSite buildCallSite() throws LambdaConversionException {
         final Class<?> innerClass = spinInnerClass();
         if (invokedType.parameterCount() == 0) {
             final Constructor[] ctrs = AccessController.doPrivileged(
@@ -190,7 +189,7 @@
                 }
             });
             if (ctrs.length != 1) {
-                throw new ReflectiveOperationException("Expected one lambda constructor for "
+                throw new LambdaConversionException("Expected one lambda constructor for "
                         + innerClass.getCanonicalName() + ", got " + ctrs.length);
             }
             // The lambda implementing inner class constructor is private, set
@@ -202,13 +201,23 @@
                     return null;
                 }
             });
-            Object inst = ctrs[0].newInstance();
-            return new ConstantCallSite(MethodHandles.constant(samBase, inst));
+            try {
+                Object inst = ctrs[0].newInstance();
+                return new ConstantCallSite(MethodHandles.constant(samBase, inst));
+            }
+            catch (ReflectiveOperationException e) {
+                throw new LambdaConversionException("Exception instantiating lambda object", e);
+            }
         } else {
-            return new ConstantCallSite(
-                    MethodHandles.Lookup.IMPL_LOOKUP
-                         .findConstructor(innerClass, constructorType)
-                         .asType(constructorType.changeReturnType(samBase)));
+            try {
+                return new ConstantCallSite(
+                        MethodHandles.Lookup.IMPL_LOOKUP
+                             .findConstructor(innerClass, constructorType)
+                             .asType(constructorType.changeReturnType(samBase)));
+            }
+            catch (ReflectiveOperationException e) {
+                throw new LambdaConversionException("Exception finding constructor", e);
+            }
         }
     }
 
@@ -228,14 +237,23 @@
      * is not found
      */
     private Class<?> spinInnerClass() throws LambdaConversionException {
-        String[] interfaces = new String[markerInterfaces.length + 1];
-        interfaces[0] = samBase.getName().replace('.', '/');
-        for (int i=0; i<markerInterfaces.length; i++) {
-            interfaces[i+1] = markerInterfaces[i].getName().replace('.', '/');
+        String[] interfaces;
+        String samIntf = samBase.getName().replace('.', '/');
+        if (markerInterfaces.length == 0) {
+            interfaces = new String[]{samIntf};
+        } else {
+            // Assure no duplicate interfaces (ClassFormatError)
+            Set<String> itfs = new LinkedHashSet<>(markerInterfaces.length + 1);
+            itfs.add(samIntf);
+            for (int i = 0; i < markerInterfaces.length; i++) {
+                itfs.add(markerInterfaces[i].getName().replace('.', '/'));
+            }
+            interfaces = itfs.toArray(new String[itfs.size()]);
         }
+
         cw.visit(CLASSFILE_VERSION, ACC_SUPER + ACC_FINAL + ACC_SYNTHETIC,
                  lambdaClassName, null,
-                 NAME_MAGIC_ACCESSOR_IMPL, interfaces);
+                 JAVA_LANG_OBJECT, interfaces);
 
         // Generate final fields to be filled in by constructor
         for (int i = 0; i < argTypes.length; i++) {
@@ -287,21 +305,7 @@
             new PropertyPermission("user.dir", "read"));
         }
 
-        ClassLoader loader = targetClass.getClassLoader();
-        ProtectionDomain pd = (loader == null)
-                              ? null
-                              : AccessController.doPrivileged(
-                                      new PrivilegedAction<ProtectionDomain>() {
-                                          @Override
-                                          public ProtectionDomain run() {
-                                              return targetClass.getProtectionDomain();
-                                          }
-                                      }
-                              );
-
-        return UNSAFE.defineClass(lambdaClassName,
-                                  classBytes, 0, classBytes.length,
-                                  loader, pd);
+        return UNSAFE.defineAnonymousClass(targetClass, classBytes, null);
     }
 
     /**
@@ -313,7 +317,7 @@
                                             constructorDesc, null, null);
         ctor.visitCode();
         ctor.visitVarInsn(ALOAD, 0);
-        ctor.visitMethodInsn(INVOKESPECIAL, NAME_MAGIC_ACCESSOR_IMPL, NAME_CTOR,
+        ctor.visitMethodInsn(INVOKESPECIAL, JAVA_LANG_OBJECT, NAME_CTOR,
                              METHOD_DESCRIPTOR_VOID);
         int lvIndex = 0;
         for (int i = 0; i < argTypes.length; i++) {
@@ -353,7 +357,7 @@
         mv.visitLdcInsn(instantiatedMethodType.toMethodDescriptorString());
 
         mv.iconst(argTypes.length);
-        mv.visitTypeInsn(ANEWARRAY, NAME_OBJECT);
+        mv.visitTypeInsn(ANEWARRAY, JAVA_LANG_OBJECT);
         for (int i = 0; i < argTypes.length; i++) {
             mv.visitInsn(DUP);
             mv.iconst(i);
--- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -609,6 +609,7 @@
             cls = cls.getComponentType();
         if (cls.isPrimitive())
             return true;  // int[].class, for example
+        // could use VerifyAccess.isClassAccessible but the following is a safe approximation
         if (cls.getClassLoader() != Object.class.getClassLoader())
             return false;
         if (VerifyAccess.isSamePackage(MethodHandle.class, cls))
--- a/src/share/classes/java/lang/invoke/LambdaMetafactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/LambdaMetafactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -29,88 +29,128 @@
 import java.util.Arrays;
 
 /**
- * <p>Bootstrap methods for converting lambda expressions and method references to functional interface objects.</p>
- *
- * <p>For every lambda expressions or method reference in the source code, there is a target type which is a
- * functional interface. Evaluating a lambda expression produces an object of its target type. The mechanism for
- * evaluating lambda expressions is to invoke an invokedynamic call site, which takes arguments describing the sole
- * method of the functional interface and the implementation method, and returns an object (the lambda object) that
- * implements the target type. Methods of the lambda object invoke the implementation method. For method
- * references, the implementation method is simply the referenced method; for lambda expressions, the
- * implementation method is produced by the compiler based on the body of the lambda expression. The methods in
- * this file are the bootstrap methods for those invokedynamic call sites, called lambda factories, and the
- * bootstrap methods responsible for linking the lambda factories are called lambda meta-factories.
- *
- * <p>The bootstrap methods in this class take the information about the functional interface, the implementation
- * method, and the static types of the captured lambda arguments, and link a call site which, when invoked,
- * produces the lambda object.
- *
- * <p>When parameterized types are used, the instantiated type of the functional interface method may be different
- * from that in the functional interface. For example, consider
- * {@code interface I<T> { int m(T x); }} if this functional interface type is used in a lambda
- * {@code I<Byte>; v = ...}, we need both the actual functional interface method which has the signature
- * {@code (Object)int} and the erased instantiated type of the functional interface method (or simply
- * <I>instantiated method type</I>), which has signature
- * {@code (Byte)int}.
+ * <p>Methods to facilitate the creation of simple "function objects" that
+ * implement one or more interfaces by delegation to a provided {@link MethodHandle},
+ * possibly after type adaptation and partial evaluation of arguments.  These
+ * methods are typically used as <em>bootstrap methods</em> for {@code invokedynamic}
+ * call sites, to support the <em>lambda expression</em> and <em>method
+ * reference expression</em> features of the Java Programming Language.
  *
- * <p>The argument list of the implementation method and the argument list of the functional interface method(s)
- * may differ in several ways.  The implementation methods may have additional arguments to accommodate arguments
- * captured by the lambda expression; there may also be differences resulting from permitted adaptations of
- * arguments, such as casting, boxing, unboxing, and primitive widening. They may also differ because of var-args,
- * but this is expected to be handled by the compiler.
- *
- * <p>Invokedynamic call sites have two argument lists: a static argument list and a dynamic argument list.  The
- * static argument list lives in the constant pool; the dynamic argument list lives on the operand stack at
- * invocation time.  The bootstrap method has access to the entire static argument list (which in this case,
- * contains method handles describing the implementation method and the canonical functional interface method),
- * as well as a method signature describing the number and static types (but not the values) of the dynamic
- * arguments, and the static return type of the invokedynamic site.
+ * <p>Indirect access to the behavior specified by the provided {@code MethodHandle}
+ * proceeds in order through three phases:
+ * <ul>
+ *     <li><em>Linkage</em> occurs when the methods in this class are invoked.
+ *     They take as arguments an interface to be implemented (typically a
+ *     <em>functional interface</em>, one with a single abstract method), a
+ *     name and signature of a method from that interface to be implemented, a
+ *     method handle describing the desired implementation behavior
+ *     for that method, and possibly other additional metadata, and produce a
+ *     {@link CallSite} whose target can be used to create suitable function
+ *     objects.  Linkage may involve dynamically loading a new class that
+ *     implements the target interface. The {@code CallSite} can be considered a
+ *     "factory" for function objects and so these linkage methods are referred
+ *     to as "metafactories".</li>
  *
- * <p>The implementation method is described with a method handle. In theory, any method handle could be used.
- * Currently supported are method handles representing invocation of virtual, interface, constructor and static
- * methods.
+ *     <li><em>Capture</em> occurs when the {@code CallSite}'s target is
+ *     invoked, typically through an {@code invokedynamic} call site,
+ *     producing a function object.  This may occur many times for
+ *     a single factory {@code CallSite}.  Capture may involve allocation of a
+ *     new function object, or may return an existing function object.  The
+ *     behavior {@code MethodHandle} may have additional parameters beyond those
+ *     of the specified interface method; these are referred to as <em>captured
+ *     parameters</em>, which must be provided as arguments to the
+ *     {@code CallSite} target, and which may be early-bound to the behavior
+ *     {@code MethodHandle}.  The number of captured parameters and their types
+ *     are determined during linkage.</li>
  *
- * <p>Assume:
- * <ul>
- *      <li>the functional interface method has N arguments, of types (U1, U2, ... Un) and return type Ru</li>
- *      <li>then the instantiated method type also has N arguments, of types (T1, T2, ... Tn) and return type Rt</li>
- *      <li>the implementation method has M arguments, of types (A1..Am) and return type Ra,</li>
- *      <li>the dynamic argument list has K arguments of types (D1..Dk), and the invokedynamic return site has
- *          type Rd</li>
- *      <li>the functional interface type is F</li>
+ *     <li><em>Invocation</em> occurs when an implemented interface method
+ *     is invoked on a function object.  This may occur many times for a single
+ *     function object.  The method referenced by the behavior {@code MethodHandle}
+ *     is invoked with the captured arguments and any additional arguments
+ *     provided on invocation, as if by {@link MethodHandle#invoke(Object...)}.</li>
  * </ul>
  *
- * <p>The following signature invariants must hold:
+ * <p>It is sometimes useful to restrict the set of inputs or results permitted
+ * at invocation.  For example, when the generic interface {@code Predicate<T>}
+ * is parameterized as {@code Predicate<String>}, the input must be a
+ * {@code String}, even though the method to implement allows any {@code Object}.
+ * At linkage time, an additional {@link MethodType} parameter describes the
+ * "instantiated" method type; on invocation, the arguments and eventual result
+ * are checked against this {@code MethodType}.
+ *
+ * <p>This class provides two forms of linkage methods: a standard version
+ * ({@link #metafactory(MethodHandles.Lookup, String, MethodType, MethodType, MethodHandle, MethodType)})
+ * using an optimized protocol, and an alternate version
+ * {@link #altMetafactory(MethodHandles.Lookup, String, MethodType, Object...)}).
+ * The alternate version is a generalization of the standard version, providing
+ * additional control over the behavior of the generated function objects via
+ * flags and additional arguments.  The alternate version adds the ability to
+ * manage the following attributes of function objects:
+ *
  * <ul>
- *     <li>Rd is a subtype of F</li>
- *     <li>For i=1..N, Ti is a subtype of Ui</li>
- *     <li>Either Rt and Ru are primitive and are the same type, or both are reference types and
- *         Rt is a subtype of Ru</li>
- *     <li>If the implementation method is a static method:
- *     <ul>
- *         <li>K + N = M</li>
- *         <li>For i=1..K, Di = Ai</li>
- *         <li>For i=1..N, Ti is adaptable to Aj, where j=i+k</li>
- *     </ul></li>
- *     <li>If the implementation method is an instance method:
- *     <ul>
- *         <li>K + N = M + 1</li>
- *         <li>D1 must be a subtype of the enclosing class for the implementation method</li>
- *         <li>For i=2..K, Di = Aj, where j=i-1</li>
- *         <li>For i=1..N, Ti is adaptable to Aj, where j=i+k-1</li>
- *     </ul></li>
- *     <li>The return type Rt is void, or the return type Ra is not void and is adaptable to Rt</li>
+ *     <li><em>Bridging.</em>  It is sometimes useful to implement multiple
+ *     variations of the method signature, involving argument or return type
+ *     adaptation.  This occurs when multiple distinct VM signatures for a method
+ *     are logically considered to be the same method by the language.  The
+ *     flag {@code FLAG_BRIDGES} indicates that a list of additional
+ *     {@code MethodType}s will be provided, each of which will be implemented
+ *     by the resulting function object.  These methods will share the same
+ *     name and instantiated type.</li>
+ *
+ *     <li><em>Multiple interfaces.</em>  If needed, more than one interface
+ *     can be implemented by the function object.  (These additional interfaces
+ *     are typically marker interfaces with no methods.)  The flag {@code FLAG_MARKERS}
+ *     indicates that a list of additional interfaces will be provided, each of
+ *     which should be implemented by the resulting function object.</li>
+ *
+ *     <li><em>Serializability.</em>  The generated function objects do not
+ *     generally support serialization.  If desired, {@code FLAG_SERIALIZABLE}
+ *     can be used to indicate that the function objects should be serializable.
+ *     Serializable function objects will use, as their serialized form,
+ *     instances of the class {@code SerializedLambda}, which requires additional
+ *     assistance from the capturing class (the class described by the
+ *     {@link MethodHandles.Lookup} parameter {@code caller}); see
+ *     {@link SerializedLambda} for details.</li>
  * </ul>
  *
- * <p>Note that the potentially parameterized implementation return type provides the value for the SAM. Whereas
- * the completely known instantiated return type is adapted to the implementation arguments. Because the
- * instantiated type of the implementation method is not available, the adaptability of return types cannot be
- * checked as precisely at link-time as the arguments can be checked. Thus a loose version of link-time checking is
- * done on return type, while a strict version is applied to arguments.
+ * <p>Assume the linkage arguments are as follows:
+ * <ul>
+ *      <li>{@code invokedType} (describing the {@code CallSite} signature) has
+ *      K parameters of types (D1..Dk) and return type Rd;</li>
+ *      <li>{@code samMethodType} (describing the implemented method type) has N
+ *      parameters, of types (U1..Un) and return type Ru;</li>
+ *      <li>{@code implMethod} (the {@code MethodHandle} providing the
+ *      implementation has M parameters, of types (A1..Am) and return type Ra
+ *      (if the method describes an instance method, the method type of this
+ *      method handle already includes an extra first argument corresponding to
+ *      the receiver);</li>
+ *      <li>{@code instantiatedMethodType} (allowing restrictions on invocation)
+ *      has N parameters, of types (T1..Tn) and return type Rt.</li>
+ * </ul>
+ *
+ * <p>Then the following linkage invariants must hold:
+ * <ul>
+ *     <li>Rd is an interface</li>
+ *     <li>{@code implMethod} is a <em>direct method handle</em></li>
+ *     <li>{@code samMethodType} and {@code instantiatedMethodType} have the same
+ *     arity N, and for i=1..N, Ti and Ui are the same type, or Ti and Ui are
+ *     both reference types and Ti is a subtype of Ui</li>
+ *     <li>Either Rt and Ru are the same type, or both are reference types and
+ *     Rt is a subtype of Ru</li>
+ *     <li>K + N = M</li>
+ *     <li>For i=1..K, Di = Ai</li>
+ *     <li>For i=1..N, Ti is adaptable to Aj, where j=i+k</li>
+ *     <li>The return type Rt is void, or the return type Ra is not void and is
+ *     adaptable to Rt</li>
+ * </ul>
+ *
+ * <p>Further, at capture time, if {@code implMethod} corresponds to an instance
+ * method, and there are any capture arguments ({@code K > 0}), then the first
+ * capture argument (corresponding to the receiver) must be non-null.
  *
  * <p>A type Q is considered adaptable to S as follows:
  * <table summary="adaptable types">
- *     <tr><th>Q</th><th>S</th><th>Link-time checks</th><th>Capture-time checks</th></tr>
+ *     <tr><th>Q</th><th>S</th><th>Link-time checks</th><th>Invocation-time checks</th></tr>
  *     <tr>
  *         <td>Primitive</td><td>Primitive</td>
  *         <td>Q can be converted to S via a primitive widening conversion</td>
@@ -123,27 +163,59 @@
  *     </tr>
  *     <tr>
  *         <td>Reference</td><td>Primitive</td>
- *         <td>strict: Q is a primitive wrapper and Primitive(Q) can be widened to S
- *         <br>loose: If Q is a primitive wrapper, check that Primitive(Q) can be widened to S</td>
- *         <td>If Q is not a primitive wrapper, cast Q to the base Wrapper(S); for example Number for numeric types</td>
+ *         <td>for parameter types: Q is a primitive wrapper and Primitive(Q)
+ *         can be widened to S
+ *         <br>for return types: If Q is a primitive wrapper, check that
+ *         Primitive(Q) can be widened to S</td>
+ *         <td>If Q is not a primitive wrapper, cast Q to the base Wrapper(S);
+ *         for example Number for numeric types</td>
  *     </tr>
  *     <tr>
  *         <td>Reference</td><td>Reference</td>
- *         <td>strict: S is a supertype of Q
- *         <br>loose: none</td>
+ *         <td>for parameter types: S is a supertype of Q
+ *         <br>for return types: none</td>
  *         <td>Cast from Q to S</td>
  *     </tr>
  * </table>
  *
- * The default bootstrap ({@link #metafactory}) represents the common cases and uses an optimized protocol.
- * Alternate bootstraps (e.g., {@link #altMetafactory}) exist to support uncommon cases such as serialization
- * or additional marker superinterfaces.
+ * @apiNote These linkage methods are designed to support the evaluation
+ * of <em>lambda expressions</em> and <em>method references</em> in the Java
+ * Language.  For every lambda expressions or method reference in the source code,
+ * there is a target type which is a functional interface.  Evaluating a lambda
+ * expression produces an object of its target type. The recommended mechanism
+ * for evaluating lambda expressions is to desugar the lambda body to a method,
+ * invoke an invokedynamic call site whose static argument list describes the
+ * sole method of the functional interface and the desugared implementation
+ * method, and returns an object (the lambda object) that implements the target
+ * type. (For method references, the implementation method is simply the
+ * referenced method; no desugaring is needed.)
  *
+ * <p>The argument list of the implementation method and the argument list of
+ * the interface method(s) may differ in several ways.  The implementation
+ * methods may have additional arguments to accommodate arguments captured by
+ * the lambda expression; there may also be differences resulting from permitted
+ * adaptations of arguments, such as casting, boxing, unboxing, and primitive
+ * widening. (Varargs adaptations are not handled by the metafactories; these are
+ * expected to be handled by the caller.)
+ *
+ * <p>Invokedynamic call sites have two argument lists: a static argument list
+ * and a dynamic argument list.  The static argument list is stored in the
+ * constant pool; the dynamic argument is pushed on the operand stack at capture
+ * time.  The bootstrap method has access to the entire static argument list
+ * (which in this case, includes information describing the implementation method,
+ * the target interface, and the target interface method(s)), as well as a
+ * method signature describing the number and static types (but not the values)
+ * of the dynamic arguments and the static return type of the invokedynamic site.
+ *
+ * @implNote The implementation method is described with a method handle. In
+ * theory, any method handle could be used. Currently supported are direct method
+ * handles representing invocation of virtual, interface, constructor and static
+ * methods.
  */
 public class LambdaMetafactory {
 
-    /** Flag for alternate metafactories indicating the lambda object is
-     * must to be serializable */
+    /** Flag for alternate metafactories indicating the lambda object
+     * must be serializable */
     public static final int FLAG_SERIALIZABLE = 1 << 0;
 
     /**
@@ -163,41 +235,58 @@
     private static final MethodType[] EMPTY_MT_ARRAY = new MethodType[0];
 
     /**
-     * Standard meta-factory for conversion of lambda expressions or method
-     * references to functional interfaces.
+     * Facilitates the creation of simple "function objects" that implement one
+     * or more interfaces by delegation to a provided {@link MethodHandle},
+     * after appropriate type adaptation and partial evaluation of arguments.
+     * Typically used as a <em>bootstrap method</em> for {@code invokedynamic}
+     * call sites, to support the <em>lambda expression</em> and <em>method
+     * reference expression</em> features of the Java Programming Language.
+     *
+     * <p>This is the standard, streamlined metafactory; additional flexibility
+     * is provided by {@link #altMetafactory(MethodHandles.Lookup, String, MethodType, Object...)}.
+     * A general description of the behavior of this method is provided
+     * {@link LambdaMetafactory above}.
      *
-     * @param caller Stacked automatically by VM; represents a lookup context
-     *                   with the accessibility privileges of the caller.
-     * @param invokedName Stacked automatically by VM; the name of the invoked
-     *                    method as it appears at the call site.
-     *                    Used as the name of the functional interface method
-     *                    to which the lambda or method reference is being
-     *                    converted.
-     * @param invokedType Stacked automatically by VM; the signature of the
-     *                    invoked method, which includes the expected static
-     *                    type of the returned lambda object, and the static
-     *                    types of the captured arguments for the lambda.
+     * <p>When the target of the {@code CallSite} returned from this method is
+     * invoked, the resulting function objects are instances of a class which
+     * implements the interface named by the return type of {@code invokedType},
+     * declares a method with the name given by {@code invokedName} and the
+     * signature given by {@code samMethodType}.  It may also override additional
+     * methods from {@code Object}.
+     *
+     * @param caller Represents a lookup context with the accessibility
+     *               privileges of the caller.  When used with {@code invokedynamic},
+     *               this is stacked automatically by the VM.
+     * @param invokedName The name of the method to implement.  When used with
+     *                    {@code invokedynamic}, this is provided by the
+     *                    {@code NameAndType} of the {@code InvokeDynamic}
+     *                    structure and is stacked automatically by the VM.
+     * @param invokedType The expected signature of the {@code CallSite}.  The
+     *                    parameter types represent the types of capture variables;
+     *                    the return type is the interface to implement.   When
+     *                    used with {@code invokedynamic}, this is provided by
+     *                    the {@code NameAndType} of the {@code InvokeDynamic}
+     *                    structure and is stacked automatically by the VM.
      *                    In the event that the implementation method is an
-     *                    instance method, the first argument in the invocation
-     *                    signature will correspond to the receiver.
-     * @param samMethodType MethodType of the method in the functional interface
-     *                      to which the lambda or method reference is being
-     *                      converted, represented as a MethodType.
-     * @param implMethod The implementation method which should be called
-     *                   (with suitable adaptation of argument types, return
-     *                   types, and adjustment for captured arguments) when
-     *                   methods of the resulting functional interface instance
-     *                   are invoked.
-     * @param instantiatedMethodType The signature of the primary functional
-     *                               interface method after type variables
-     *                               are substituted with their instantiation
-     *                               from the capture site
-     * @return a CallSite, which, when invoked, will return an instance of the
-     * functional interface
-     * @throws ReflectiveOperationException if the caller is not able to
-     * reconstruct one of the method handles
-     * @throws LambdaConversionException If any of the meta-factory protocol
-     * invariants are violated
+     *                    instance method and this signature has any parameters,
+     *                    the first parameter in the invocation signature must
+     *                    correspond to the receiver.
+     * @param samMethodType Signature and return type of method to be implemented
+     *                      by the function object.
+     * @param implMethod A direct method handle describing the implementation
+     *                   method which should be called (with suitable adaptation
+     *                   of argument types, return types, and with captured
+     *                   arguments prepended to the invocation arguments) at
+     *                   invocation time.
+     * @param instantiatedMethodType The signature and return type that should
+     *                               be enforced dynamically at invocation time.
+     *                               This may be the same as {@code samMethodType},
+     *                               or may be a specialization of it.
+     * @return a CallSite whose target can be used to perform capture, generating
+     *         instances of the interface named by {@code invokedType}
+     * @throws LambdaConversionException If any of the linkage invariants
+     *                                   described {@link LambdaMetafactory above}
+     *                                   are violated
      */
     public static CallSite metafactory(MethodHandles.Lookup caller,
                                        String invokedName,
@@ -205,7 +294,7 @@
                                        MethodType samMethodType,
                                        MethodHandle implMethod,
                                        MethodType instantiatedMethodType)
-                   throws ReflectiveOperationException, LambdaConversionException {
+            throws LambdaConversionException {
         AbstractValidatingLambdaMetafactory mf;
         mf = new InnerClassLambdaMetafactory(caller, invokedType,
                                              invokedName, samMethodType,
@@ -216,60 +305,128 @@
     }
 
     /**
-     * Alternate meta-factory for conversion of lambda expressions or method
-     * references to functional interfaces, which supports serialization and
-     * other uncommon options.
+     * Facilitates the creation of simple "function objects" that implement one
+     * or more interfaces by delegation to a provided {@link MethodHandle},
+     * after appropriate type adaptation and partial evaluation of arguments.
+     * Typically used as a <em>bootstrap method</em> for {@code invokedynamic}
+     * call sites, to support the <em>lambda expression</em> and <em>method
+     * reference expression</em> features of the Java Programming Language.
      *
-     * The declared argument list for this method is:
+     * <p>This is the general, more flexible metafactory; a streamlined version
+     * is provided by {@link #altMetafactory(MethodHandles.Lookup, String, MethodType, Object...)}.
+     * A general description of the behavior of this method is provided
+     * {@link LambdaMetafactory above}.
      *
+     * <p>The argument list for this method includes three fixed parameters,
+     * corresponding to the parameters automatically stacked by the VM for the
+     * bootstrap method in an {@code invokedynamic} invocation, and an {@code Object[]}
+     * parameter that contains additional parameters.  The declared argument
+     * list for this method is:
+     *
+     * <pre>{@code
      *  CallSite altMetafactory(MethodHandles.Lookup caller,
      *                          String invokedName,
      *                          MethodType invokedType,
      *                          Object... args)
+     * }</pre>
      *
-     * but it behaves as if the argument list is:
+     * <p>but it behaves as if the argument list is as follows:
      *
+     * <pre>{@code
      *  CallSite altMetafactory(MethodHandles.Lookup caller,
      *                          String invokedName,
      *                          MethodType invokedType,
-     *                          MethodType samMethodType
+     *                          MethodType samMethodType,
      *                          MethodHandle implMethod,
      *                          MethodType instantiatedMethodType,
      *                          int flags,
-     *                          int markerInterfaceCount, // IF flags has MARKERS set
-     *                          Class... markerInterfaces // IF flags has MARKERS set
-     *                          int bridgeCount,          // IF flags has BRIDGES set
-     *                          MethodType... bridges     // IF flags has BRIDGES set
+     *                          int markerInterfaceCount,  // IF flags has MARKERS set
+     *                          Class... markerInterfaces, // IF flags has MARKERS set
+     *                          int bridgeCount,           // IF flags has BRIDGES set
+     *                          MethodType... bridges      // IF flags has BRIDGES set
      *                          )
+     * }</pre>
      *
+     * <p>Arguments that appear in the argument list for
+     * {@link #metafactory(MethodHandles.Lookup, String, MethodType, MethodType, MethodHandle, MethodType)}
+     * have the same specification as in that method.  The additional arguments
+     * are interpreted as follows:
+     * <ul>
+     *     <li>{@code flags} indicates additional options; this is a bitwise
+     *     OR of desired flags.  Defined flags are {@link #FLAG_BRIDGES},
+     *     {@link #FLAG_MARKERS}, and {@link #FLAG_SERIALIZABLE}.</li>
+     *     <li>{@code markerInterfaceCount} is the number of additional interfaces
+     *     the function object should implement, and is present if and only if the
+     *     {@code FLAG_MARKERS} flag is set.</li>
+     *     <li>{@code markerInterfaces} is a variable-length list of additional
+     *     interfaces to implement, whose length equals {@code markerInterfaceCount},
+     *     and is present if and only if the {@code FLAG_MARKERS} flag is set.</li>
+     *     <li>{@code bridgeCount} is the number of additional method signatures
+     *     the function object should implement, and is present if and only if
+     *     the {@code FLAG_BRIDGES} flag is set.</li>
+     *     <li>{@code bridges} is a variable-length list of additional
+     *     methods signatures to implement, whose length equals {@code bridgeCount},
+     *     and is present if and only if the {@code FLAG_BRIDGES} flag is set.</li>
+     * </ul>
+     *
+     * <p>Each class named by {@code markerInterfaces} is subject to the same
+     * restrictions as {@code Rd}, the return type of {@code invokedType},
+     * as described {@link LambdaMetafactory above}.  Each {@code MethodType}
+     * named by {@code bridges} is subject to the same restrictions as
+     * {@code samMethodType}, as described {@link LambdaMetafactory above}.
+     *
+     * <p>When FLAG_SERIALIZABLE is set in {@code flags}, the function objects
+     * will implement {@code Serializable}, and will have a {@code writeReplace}
+     * method that returns an appropriate {@link SerializedLambda}.  The
+     * {@code caller} class must have an appropriate {@code $deserializeLambda$}
+     * method, as described in {@link SerializedLambda}.
      *
-     * @param caller Stacked automatically by VM; represents a lookup context
-     *               with the accessibility privileges of the caller.
-     * @param invokedName Stacked automatically by VM; the name of the invoked
-     *                    method as it appears at the call site.
-     *                    Used as the name of the functional interface method
-     *                    to which the lambda or method reference is being
-     *                    converted.
-     * @param invokedType Stacked automatically by VM; the signature of the
-     *                    invoked method, which includes the expected static
-     *                    type of the returned lambda object, and the static
-     *                    types of the captured arguments for the lambda.
+     * <p>When the target of the {@code CallSite} returned from this method is
+     * invoked, the resulting function objects are instances of a class with
+     * the following properties:
+     * <ul>
+     *     <li>The class implements the interface named by the return type
+     *     of {@code invokedType} and any interfaces named by {@code markerInterfaces}</li>
+     *     <li>The class declares methods with the name given by {@code invokedName},
+     *     and the signature given by {@code samMethodType} and additional signatures
+     *     given by {@code bridges}</li>
+     *     <li>The class may override methods from {@code Object}, and may
+     *     implement methods related to serialization.</li>
+     * </ul>
+     *
+     * @param caller Represents a lookup context with the accessibility
+     *               privileges of the caller.  When used with {@code invokedynamic},
+     *               this is stacked automatically by the VM.
+     * @param invokedName The name of the method to implement.  When used with
+     *                    {@code invokedynamic}, this is provided by the
+     *                    {@code NameAndType} of the {@code InvokeDynamic}
+     *                    structure and is stacked automatically by the VM.
+     * @param invokedType The expected signature of the {@code CallSite}.  The
+     *                    parameter types represent the types of capture variables;
+     *                    the return type is the interface to implement.   When
+     *                    used with {@code invokedynamic}, this is provided by
+     *                    the {@code NameAndType} of the {@code InvokeDynamic}
+     *                    structure and is stacked automatically by the VM.
      *                    In the event that the implementation method is an
-     *                    instance method, the first argument in the invocation
-     *                    signature will correspond to the receiver.
-     * @param  args       flags and optional arguments, as described above
-     * @return a CallSite, which, when invoked, will return an instance of the
-     * functional interface
-     * @throws ReflectiveOperationException if the caller is not able to
-     * reconstruct one of the method handles
-     * @throws LambdaConversionException If any of the meta-factory protocol
-     * invariants are violated
+     *                    instance method and this signature has any parameters,
+     *                    the first parameter in the invocation signature must
+     *                    correspond to the receiver.
+     * @param  args       An {@code Object[]} array containing the required
+     *                    arguments {@code samMethodType}, {@code implMethod},
+     *                    {@code instantiatedMethodType}, {@code flags}, and any
+     *                    optional arguments, as described
+     *                    {@link #altMetafactory(MethodHandles.Lookup, String, MethodType, Object...)} above}
+     * @return a CallSite whose target can be used to perform capture, generating
+     *         instances of the interface named by {@code invokedType}
+     * @throws LambdaConversionException If any of the linkage invariants
+     *                                   described {@link LambdaMetafactory above}
+     *                                   are violated
      */
     public static CallSite altMetafactory(MethodHandles.Lookup caller,
                                           String invokedName,
                                           MethodType invokedType,
                                           Object... args)
-            throws ReflectiveOperationException, LambdaConversionException {
+            throws LambdaConversionException {
         MethodType samMethodType = (MethodType)args[0];
         MethodHandle implMethod = (MethodHandle)args[1];
         MethodType instantiatedMethodType = (MethodType)args[2];
@@ -294,15 +451,15 @@
         else
             bridges = EMPTY_MT_ARRAY;
 
-        boolean foundSerializableSupertype = Serializable.class.isAssignableFrom(invokedType.returnType());
-        for (Class<?> c : markerInterfaces)
-            foundSerializableSupertype |= Serializable.class.isAssignableFrom(c);
-        boolean isSerializable = ((flags & LambdaMetafactory.FLAG_SERIALIZABLE) != 0)
-                                 || foundSerializableSupertype;
-
-        if (isSerializable && !foundSerializableSupertype) {
-            markerInterfaces = Arrays.copyOf(markerInterfaces, markerInterfaces.length + 1);
-            markerInterfaces[markerInterfaces.length-1] = Serializable.class;
+        boolean isSerializable = ((flags & FLAG_SERIALIZABLE) != 0);
+        if (isSerializable) {
+            boolean foundSerializableSupertype = Serializable.class.isAssignableFrom(invokedType.returnType());
+            for (Class<?> c : markerInterfaces)
+                foundSerializableSupertype |= Serializable.class.isAssignableFrom(c);
+            if (!foundSerializableSupertype) {
+                markerInterfaces = Arrays.copyOf(markerInterfaces, markerInterfaces.length + 1);
+                markerInterfaces[markerInterfaces.length-1] = Serializable.class;
+            }
         }
 
         AbstractValidatingLambdaMetafactory mf
--- a/src/share/classes/java/lang/invoke/MagicLambdaImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +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.  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.lang.invoke;
-
-/** <P> MagicLambdaImpl (named for similarity to MagicAccessorImpl and
- others, not because it actually implements an interface) is a
- marker class in the hierarchy. All subclasses of this class are
- "magically" granted access by the VM to otherwise inaccessible
- fields and methods of other classes. It is distinct from MagicAccessorImpl
- because, while we want to bypass accessibility checks, we do not want to
- bypass verification.</P>
-
- <P> Do not change the name of this class without also changing the
- VM's code. </P> */
-
-class MagicLambdaImpl {
-}
--- a/src/share/classes/java/lang/invoke/MethodHandle.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/MethodHandle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -251,7 +251,7 @@
  *
  * <h1>Usage examples</h1>
  * Here are some examples of usage:
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
 Object x, y; String s; int i;
 MethodType mt; MethodHandle mh;
 MethodHandles.Lookup lookup = MethodHandles.lookup();
@@ -608,7 +608,7 @@
      * or forced to null if the return type is void.
      * <p>
      * This call is equivalent to the following code:
-     * <p><blockquote><pre>{@code
+     * <blockquote><pre>{@code
      * MethodHandle invoker = MethodHandles.spreadInvoker(this.type(), 0);
      * Object result = invoker.invokeExact(this, arguments);
      * }</pre></blockquote>
@@ -643,9 +643,9 @@
      * of the argument array.
      * <p>
      * This method is also equivalent to the following code:
-     * <p><blockquote><pre>
-     * {@link #invokeWithArguments(Object...) invokeWithArguments}{@code(arguments.toArray())}
-     * </pre></blockquote>
+     * <blockquote><pre>{@code
+     *   invokeWithArguments(arguments.toArray()
+     * }</pre></blockquote>
      *
      * @param arguments the arguments to pass to the target
      * @return the result returned by the target
@@ -1183,7 +1183,7 @@
 
     /**
      * Makes a <em>fixed arity</em> method handle which is otherwise
-     * equivalent to the the current method handle.
+     * equivalent to the current method handle.
      * <p>
      * If the current method handle is not of
      * {@linkplain #asVarargsCollector variable arity},
--- a/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Wed Oct 30 18:38:20 2013 +0000
@@ -441,8 +441,13 @@
             assert(refKindIsValid(refKind));
             return lookup.linkMethodHandleConstant((byte) refKind, defc, name, type);
         } catch (IllegalAccessException ex) {
-            Error err = new IllegalAccessError(ex.getMessage());
-            throw initCauseFrom(err, ex);
+            Throwable cause = ex.getCause();
+            if (cause instanceof AbstractMethodError) {
+                throw (AbstractMethodError) cause;
+            } else {
+                Error err = new IllegalAccessError(ex.getMessage());
+                throw initCauseFrom(err, ex);
+            }
         } catch (NoSuchMethodException ex) {
             Error err = new NoSuchMethodError(ex.getMessage());
             throw initCauseFrom(err, ex);
--- a/src/share/classes/java/lang/invoke/MethodHandles.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/MethodHandles.java	Wed Oct 30 18:38:20 2013 +0000
@@ -597,7 +597,7 @@
         Lookup(Class<?> lookupClass) {
             this(lookupClass, ALL_MODES);
             // make sure we haven't accidentally picked up a privileged class:
-            checkUnprivilegedlookupClass(lookupClass);
+            checkUnprivilegedlookupClass(lookupClass, ALL_MODES);
         }
 
         private Lookup(Class<?> lookupClass, int allowedModes) {
@@ -651,7 +651,7 @@
                 // No permissions.
                 newModes = 0;
             }
-            checkUnprivilegedlookupClass(requestedLookupClass);
+            checkUnprivilegedlookupClass(requestedLookupClass, newModes);
             return new Lookup(requestedLookupClass, newModes);
         }
 
@@ -667,10 +667,19 @@
         /** Package-private version of lookup which is trusted. */
         static final Lookup IMPL_LOOKUP = new Lookup(Object.class, TRUSTED);
 
-        private static void checkUnprivilegedlookupClass(Class<?> lookupClass) {
+        private static void checkUnprivilegedlookupClass(Class<?> lookupClass, int allowedModes) {
             String name = lookupClass.getName();
             if (name.startsWith("java.lang.invoke."))
                 throw newIllegalArgumentException("illegal lookupClass: "+lookupClass);
+
+            // For caller-sensitive MethodHandles.lookup()
+            // disallow lookup more restricted packages
+            if (allowedModes == ALL_MODES && lookupClass.getClassLoader() == null) {
+                if (name.startsWith("java.") ||
+                        (name.startsWith("sun.") && !name.startsWith("sun.invoke."))) {
+                    throw newIllegalArgumentException("illegal lookupClass: " + lookupClass);
+                }
+            }
         }
 
         /**
@@ -739,7 +748,7 @@
          * If the returned method handle is invoked, the method's class will
          * be initialized, if it has not already been initialized.
          * <p><b>Example:</b>
-         * <p><blockquote><pre>{@code
+         * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -797,7 +806,7 @@
          * with the same {@code type} argument.
          *
          * <b>Example:</b>
-         * <p><blockquote><pre>{@code
+         * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -873,7 +882,7 @@
          * If the returned method handle is invoked, the constructor's class will
          * be initialized, if it has not already been initialized.
          * <p><b>Example:</b>
-         * <p><blockquote><pre>{@code
+         * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -933,7 +942,7 @@
          * in special circumstances.  Use {@link #findConstructor findConstructor}
          * to access instance initialization methods in a safe manner.)</em>
          * <p><b>Example:</b>
-         * <p><blockquote><pre>{@code
+         * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -1707,6 +1716,13 @@
                 checkSymbolicClass(defc);
                 return mh;
             }
+            // Treat MethodHandle.invoke and invokeExact specially.
+            if (defc == MethodHandle.class && refKind == REF_invokeVirtual) {
+                mh = findVirtualForMH(member.getName(), member.getMethodType());
+                if (mh != null) {
+                    return mh;
+                }
+            }
             MemberName resolved = resolveOrFail(refKind, member);
             mh = getDirectMethodForConstant(refKind, defc, resolved);
             if (mh instanceof DirectMethodHandle
@@ -2208,7 +2224,7 @@
      * they will come after.
      * <p>
      * <b>Example:</b>
-     * <p><blockquote><pre>{@code
+     * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -2222,7 +2238,7 @@
      * }</pre></blockquote>
      * <p>
      * This method is also equivalent to the following code:
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      * {@link #dropArguments(MethodHandle,int,Class...) dropArguments}{@code (target, pos, valueTypes.toArray(new Class[0]))}
      * </pre></blockquote>
      * @param target the method handle to invoke after the arguments are dropped
@@ -2266,7 +2282,7 @@
      * they will come after.
      * <p>
      * <b>Example:</b>
-     * <p><blockquote><pre>{@code
+     * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -2284,7 +2300,7 @@
      * }</pre></blockquote>
      * <p>
      * This method is also equivalent to the following code:
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      * {@link #dropArguments(MethodHandle,int,List) dropArguments}{@code (target, pos, Arrays.asList(valueTypes))}
      * </pre></blockquote>
      * @param target the method handle to invoke after the arguments are dropped
@@ -2332,7 +2348,7 @@
      * (null or not)
      * which do not correspond to argument positions in the target.
      * <p><b>Example:</b>
-     * <p><blockquote><pre>{@code
+     * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -2425,7 +2441,7 @@
      * In all cases, {@code pos} must be greater than or equal to zero, and
      * {@code pos} must also be less than or equal to the target's arity.
      * <p><b>Example:</b>
-     * <p><blockquote><pre>{@code
+     * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -2530,7 +2546,7 @@
      * The argument type of the filter (if any) must be identical to the
      * return type of the target.
      * <p><b>Example:</b>
-     * <p><blockquote><pre>{@code
+     * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -2621,7 +2637,7 @@
      * arguments will not need to be live on the stack on entry to the
      * target.)
      * <p><b>Example:</b>
-     * <p><blockquote><pre>{@code
+     * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
--- a/src/share/classes/java/lang/invoke/MethodType.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/MethodType.java	Wed Oct 30 18:38:20 2013 +0000
@@ -137,7 +137,7 @@
 
     /** This number is the maximum arity of a method handle invoker, 253.
      *  It is derived from the absolute JVM-imposed arity by subtracting two,
-     *  which are the slots occupied by invoke method handle, and the the
+     *  which are the slots occupied by invoke method handle, and the
      *  target method handle, which are both at the beginning of the argument
      *  list used to invoke the target method handle.
      *  The longest possible invocation will look like
--- a/src/share/classes/java/lang/invoke/SerializedLambda.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/invoke/SerializedLambda.java	Wed Oct 30 18:38:20 2013 +0000
@@ -32,9 +32,26 @@
 import java.util.Objects;
 
 /**
- * Serialized form of a lambda expression.  The properties of this class represent the information that is present
- * at the lambda factory site, including the identity of the primary functional interface method, the identity of the
- * implementation method, and any variables captured from the local environment at the time of lambda capture.
+ * Serialized form of a lambda expression.  The properties of this class
+ * represent the information that is present at the lambda factory site, including
+ * static metafactory arguments such as the identity of the primary functional
+ * interface method and the identity of the implementation method, as well as
+ * dynamic metafactory arguments such as values captured from the lexical scope
+ * at the time of lambda capture.
+ *
+ * <p>Implementors of serializable lambdas, such as compilers or language
+ * runtime libraries, are expected to ensure that instances deserialize properly.
+ * One means to do so is to ensure that the {@code writeReplace} method returns
+ * an instance of {@code SerializedLambda}, rather than allowing default
+ * serialization to proceed.
+ *
+ * <p>{@code SerializedLambda} has a {@code readResolve} method that looks for
+ * a (possibly private) static method called
+ * {@code $deserializeLambda$(SerializedLambda)} in the capturing class, invokes
+ * that with itself as the first argument, and returns the result.  Lambda classes
+ * implementing {@code $deserializeLambda$} are responsible for validating
+ * that the properties of the {@code SerializedLambda} are consistent with a
+ * lambda actually captured by that class.
  *
  * @see LambdaMetafactory
  */
--- a/src/share/classes/java/lang/management/ManagementFactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/management/ManagementFactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -60,7 +60,7 @@
  * one or more <i>platform MXBeans</i> representing
  * the management interface of a component of the Java virtual
  * machine.
- * <p>
+ *
  * <h3><a name="MXBean">Platform MXBeans</a></h3>
  * <p>
  * A platform MXBean is a <i>managed bean</i> that
--- a/src/share/classes/java/lang/management/ManagementPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/management/ManagementPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -33,10 +33,8 @@
  * The following table
  * provides a summary description of what the permission allows,
  * and discusses the risks of granting code the permission.
- * <P>
  *
- * <table border=1 cellpadding=5 summary="Table shows permission target name, wh
-at the permission allows, and associated risks">
+ * <table border=1 cellpadding=5 summary="Table shows permission target name, what the permission allows, and associated risks">
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
--- a/src/share/classes/java/lang/management/MemoryUsage.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/management/MemoryUsage.java	Wed Oct 30 18:38:20 2013 +0000
@@ -79,7 +79,7 @@
  * </table>
  *
  * Below is a picture showing an example of a memory pool:
- * <p>
+ *
  * <pre>
  *        +----------------------------------------------+
  *        +////////////////           |                  +
@@ -250,7 +250,7 @@
      * Returns a <tt>MemoryUsage</tt> object represented by the
      * given <tt>CompositeData</tt>. The given <tt>CompositeData</tt>
      * must contain the following attributes:
-     * <p>
+     *
      * <blockquote>
      * <table border summary="The attributes and the types the given CompositeData contains">
      * <tr>
--- a/src/share/classes/java/lang/management/package.html	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/management/package.html	Wed Oct 30 18:38:20 2013 +0000
@@ -82,7 +82,7 @@
 <b>1. Direct access to an MXBean interface</b>
 <p>
 <ul>
-<li>Get an MXBean instance locally in the running Java virtual machine:<p>
+<li>Get an MXBean instance locally in the running Java virtual machine:
 <pre>
    RuntimeMXBean mxbean = ManagementFactory.getRuntimeMXBean();
 
@@ -103,7 +103,7 @@
 <p>
 </li>
 <li>Construct an MXBean proxy instance that forwards the
-    method calls to a given MBeanServer:<p>
+    method calls to a given MBeanServer:
 <pre>
    MBeanServerConnection mbs;
 
--- a/src/share/classes/java/lang/reflect/Constructor.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/reflect/Constructor.java	Wed Oct 30 18:38:20 2013 +0000
@@ -28,6 +28,8 @@
 import sun.reflect.CallerSensitive;
 import sun.reflect.ConstructorAccessor;
 import sun.reflect.Reflection;
+import sun.reflect.annotation.TypeAnnotation;
+import sun.reflect.annotation.TypeAnnotationParser;
 import sun.reflect.generics.repository.ConstructorRepository;
 import sun.reflect.generics.factory.CoreReflectionFactory;
 import sun.reflect.generics.factory.GenericsFactory;
@@ -534,4 +536,22 @@
     public AnnotatedType getAnnotatedReturnType() {
         return getAnnotatedReturnType0(getDeclaringClass());
     }
+
+    /**
+     * {@inheritDoc}
+     * @since 1.8
+     */
+    @Override
+    public AnnotatedType getAnnotatedReceiverType() {
+        if (getDeclaringClass().getEnclosingClass() == null)
+            return super.getAnnotatedReceiverType();
+
+        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
+                sun.misc.SharedSecrets.getJavaLangAccess().
+                        getConstantPool(getDeclaringClass()),
+                this,
+                getDeclaringClass(),
+                getDeclaringClass().getEnclosingClass(),
+                TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
+    }
 }
--- a/src/share/classes/java/lang/reflect/Executable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/reflect/Executable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -383,7 +383,7 @@
     private transient volatile Parameter[] parameters;
 
     private native Parameter[] getParameters0();
-    private native byte[] getTypeAnnotationBytes0();
+    native byte[] getTypeAnnotationBytes0();
 
     // Needed by reflectaccess
     byte[] getTypeAnnotationBytes() {
@@ -527,7 +527,7 @@
     public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) {
         Objects.requireNonNull(annotationClass);
 
-        return AnnotationSupport.getMultipleAnnotations(declaredAnnotations(), annotationClass);
+        return AnnotationSupport.getDirectlyAndIndirectlyPresent(declaredAnnotations(), annotationClass);
     }
 
     /**
--- a/src/share/classes/java/lang/reflect/Field.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/reflect/Field.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1123,7 +1123,7 @@
     public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) {
         Objects.requireNonNull(annotationClass);
 
-        return AnnotationSupport.getMultipleAnnotations(declaredAnnotations(), annotationClass);
+        return AnnotationSupport.getDirectlyAndIndirectlyPresent(declaredAnnotations(), annotationClass);
     }
 
     /**
--- a/src/share/classes/java/lang/reflect/Parameter.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/reflect/Parameter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -295,7 +295,7 @@
     public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) {
         Objects.requireNonNull(annotationClass);
 
-        return AnnotationSupport.getMultipleAnnotations(declaredAnnotations(), annotationClass);
+        return AnnotationSupport.getDirectlyAndIndirectlyPresent(declaredAnnotations(), annotationClass);
     }
 
     /**
--- a/src/share/classes/java/lang/reflect/Proxy.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/reflect/Proxy.java	Wed Oct 30 18:38:20 2013 +0000
@@ -347,11 +347,11 @@
      *             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
+     *             <li> for each proxy interface, {@code intf},
+     *             the caller's class loader is not the same as or an
+     *             ancestor of the class loader for {@code intf} and
      *             invocation of {@link SecurityManager#checkPackageAccess
-     *             s.checkPackageAccess()} denies access to any one of the
-     *             given proxy interfaces.</li>
+     *             s.checkPackageAccess()} denies access to {@code intf}.</li>
      *          </ul>
 
      * @throws  NullPointerException if the {@code interfaces} array
@@ -680,11 +680,11 @@
      *               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
+     *          <li> for each proxy interface, {@code intf},
+     *               the caller's class loader is not the same as or an
+     *               ancestor of the class loader for {@code intf} and
      *               invocation of {@link SecurityManager#checkPackageAccess
-     *               s.checkPackageAccess()} denies access to any one of the
-     *               given proxy interfaces.</li>
+     *               s.checkPackageAccess()} denies access to {@code intf};</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
@@ -795,7 +795,14 @@
      * @return  the invocation handler for the proxy instance
      * @throws  IllegalArgumentException if the argument is not a
      *          proxy instance
+     * @throws  SecurityException if a security manager, <em>s</em>, is present
+     *          and the caller's class loader is not the same as or an
+     *          ancestor of the class loader for the invocation handler
+     *          and invocation of {@link SecurityManager#checkPackageAccess
+     *          s.checkPackageAccess()} denies access to the invocation
+     *          handler's class.
      */
+    @CallerSensitive
     public static InvocationHandler getInvocationHandler(Object proxy)
         throws IllegalArgumentException
     {
@@ -806,8 +813,19 @@
             throw new IllegalArgumentException("not a proxy instance");
         }
 
-        Proxy p = (Proxy) proxy;
-        return p.h;
+        final Proxy p = (Proxy) proxy;
+        final InvocationHandler ih = p.h;
+        if (System.getSecurityManager() != null) {
+            Class<?> ihClass = ih.getClass();
+            Class<?> caller = Reflection.getCallerClass();
+            if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(),
+                                                    ihClass.getClassLoader()))
+            {
+                ReflectUtil.checkPackageAccess(ihClass);
+            }
+        }
+
+        return ih;
     }
 
     private static native Class<?> defineClass0(ClassLoader loader, String name,
--- a/src/share/classes/java/lang/reflect/ReflectPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/lang/reflect/ReflectPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -31,7 +31,6 @@
  * The following table
  * provides a summary description of what the permission allows,
  * and discusses the risks of granting code the permission.
- * <P>
  *
  * <table border=1 cellpadding=5 summary="Table shows permission target name, what the permission allows, and associated risks">
  * <tr>
--- a/src/share/classes/java/math/BigDecimal.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/math/BigDecimal.java	Wed Oct 30 18:38:20 2013 +0000
@@ -727,36 +727,27 @@
      * <dl>
      * <dt><i>BigDecimalString:</i>
      * <dd><i>Sign<sub>opt</sub> Significand Exponent<sub>opt</sub></i>
-     * <p>
      * <dt><i>Sign:</i>
      * <dd>{@code +}
      * <dd>{@code -}
-     * <p>
      * <dt><i>Significand:</i>
      * <dd><i>IntegerPart</i> {@code .} <i>FractionPart<sub>opt</sub></i>
      * <dd>{@code .} <i>FractionPart</i>
      * <dd><i>IntegerPart</i>
-     * <p>
      * <dt><i>IntegerPart:</i>
      * <dd><i>Digits</i>
-     * <p>
      * <dt><i>FractionPart:</i>
      * <dd><i>Digits</i>
-     * <p>
      * <dt><i>Exponent:</i>
      * <dd><i>ExponentIndicator SignedInteger</i>
-     * <p>
      * <dt><i>ExponentIndicator:</i>
      * <dd>{@code e}
      * <dd>{@code E}
-     * <p>
      * <dt><i>SignedInteger:</i>
      * <dd><i>Sign<sub>opt</sub> Digits</i>
-     * <p>
      * <dt><i>Digits:</i>
      * <dd><i>Digit</i>
      * <dd><i>Digits Digit</i>
-     * <p>
      * <dt><i>Digit:</i>
      * <dd>any character for which {@link Character#isDigit}
      * returns {@code true}, including 0, 1, 2 ...
--- a/src/share/classes/java/math/RoundingMode.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/math/RoundingMode.java	Wed Oct 30 18:38:20 2013 +0000
@@ -51,7 +51,6 @@
  * proper {@code MathContext}.  A summary table showing the results
  * of these rounding operations for all rounding modes appears below.
  *
- *<p>
  *<table border>
  * <caption><b>Summary of Rounding Operations Under Different Rounding Modes</b></caption>
  * <tr><th></th><th colspan=8>Result of rounding input to one digit with the given
--- a/src/share/classes/java/net/DatagramSocket.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/DatagramSocket.java	Wed Oct 30 18:38:20 2013 +0000
@@ -196,7 +196,7 @@
      * socket address.
      * <p>
      * If, if the address is {@code null}, creates an unbound socket.
-     * <p>
+     *
      * <p>If there is a security manager,
      * its {@code checkListen} method is first called
      * with the port from the socket address
@@ -1109,7 +1109,7 @@
      * represent the value of the TOS octet in IP packets sent by
      * the socket.
      * RFC 1349 defines the TOS values as follows:
-     * <p>
+     *
      * <UL>
      * <LI><CODE>IPTOS_LOWCOST (0x02)</CODE></LI>
      * <LI><CODE>IPTOS_RELIABILITY (0x04)</CODE></LI>
--- a/src/share/classes/java/net/HttpCookie.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/HttpCookie.java	Wed Oct 30 18:38:20 2013 +0000
@@ -761,7 +761,7 @@
     // from RFC 2068, token special case characters
     //
     // private static final String tspecials = "()<>@,;:\\\"/[]?={} \t";
-    private static final String tspecials = ",;";
+    private static final String tspecials = ",; ";  // deliberately includes space
 
     /*
      * Tests a string and returns true if the string counts as a token.
--- a/src/share/classes/java/net/Inet6Address.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/Inet6Address.java	Wed Oct 30 18:38:20 2013 +0000
@@ -28,7 +28,10 @@
 import java.io.IOException;
 import java.io.InvalidObjectException;
 import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamField;
 import java.util.Enumeration;
+import java.util.Arrays;
 
 /**
  * This class represents an Internet Protocol version 6 (IPv6) address.
@@ -130,7 +133,7 @@
  *         representation. However, it will be converted into an IPv4
  *         address.</td></tr>
  * </table></blockquote>
- * <p>
+ *
  * <h4><A NAME="scoped">Textual representation of IPv6 scoped addresses</a></h4>
  *
  * <p> The textual representation of IPv6 addresses as described above can be
@@ -147,11 +150,11 @@
  *
  * <p> The general format for specifying the <i>scope_id</i> is the following:
  *
- * <p><blockquote><i>IPv6-address</i>%<i>scope_id</i></blockquote>
+ * <blockquote><i>IPv6-address</i>%<i>scope_id</i></blockquote>
  * <p> The IPv6-address is a literal IPv6 address as described above.
  * The <i>scope_id</i> refers to an interface on the local system, and it can be
  * specified in two ways.
- * <p><ol><li><i>As a numeric identifier.</i> This must be a positive integer
+ * <ol><li><i>As a numeric identifier.</i> This must be a positive integer
  * that identifies the particular interface and scope as understood by the
  * system. Usually, the numeric values can be determined through administration
  * tools on the system. Each interface may have multiple values, one for each
@@ -177,37 +180,192 @@
      */
     private transient int cached_scope_id;  // 0
 
-    /**
-     * Holds a 128-bit (16 bytes) IPv6 address.
-     *
-     * @serial
-     */
-    byte[] ipaddress;
+    private class Inet6AddressHolder {
+
+        private Inet6AddressHolder() {
+            ipaddress = new byte[INADDRSZ];
+        }
+
+        private Inet6AddressHolder(
+            byte[] ipaddress, int scope_id, boolean scope_id_set,
+            NetworkInterface ifname, boolean scope_ifname_set)
+        {
+            this.ipaddress = ipaddress;
+            this.scope_id = scope_id;
+            this.scope_id_set = scope_id_set;
+            this.scope_ifname_set = scope_ifname_set;
+            this.scope_ifname = ifname;
+        }
+
+        /**
+         * Holds a 128-bit (16 bytes) IPv6 address.
+         */
+        byte[] ipaddress;
+
+        /**
+         * scope_id. The scope specified when the object is created. If the object
+         * is created with an interface name, then the scope_id is not determined
+         * until the time it is needed.
+         */
+        int scope_id;  // 0
+
+        /**
+         * This will be set to true when the scope_id field contains a valid
+         * integer scope_id.
+         */
+        boolean scope_id_set;  // false
+
+        /**
+         * scoped interface. scope_id is derived from this as the scope_id of the first
+         * address whose scope is the same as this address for the named interface.
+         */
+        NetworkInterface scope_ifname;  // null
 
-    /**
-     * scope_id. The scope specified when the object is created. If the object
-     * is created with an interface name, then the scope_id is not determined
-     * until the time it is needed.
-     */
-    private int scope_id;  // 0
+        /**
+         * set if the object is constructed with a scoped
+         * interface instead of a numeric scope id.
+         */
+        boolean scope_ifname_set; // false;
+
+        void setAddr(byte addr[]) {
+            if (addr.length == INADDRSZ) { // normal IPv6 address
+                System.arraycopy(addr, 0, ipaddress, 0, INADDRSZ);
+            }
+        }
+
+        void init(byte addr[], int scope_id) {
+            setAddr(addr);
+
+            if (scope_id >= 0) {
+                this.scope_id = scope_id;
+                this.scope_id_set = true;
+            }
+        }
+
+        void init(byte addr[], NetworkInterface nif)
+            throws UnknownHostException
+        {
+            setAddr(addr);
+
+            if (nif != null) {
+                this.scope_id = deriveNumericScope(ipaddress, nif);
+                this.scope_id_set = true;
+                this.scope_ifname = nif;
+                this.scope_ifname_set = true;
+            }
+        }
+
+        String getHostAddress() {
+            String s = numericToTextFormat(ipaddress);
+            if (scope_ifname != null) { /* must check this first */
+                s = s + "%" + scope_ifname.getName();
+            } else if (scope_id_set) {
+                s = s + "%" + scope_id;
+            }
+            return s;
+        }
+
+        public boolean equals(Object o) {
+            if (! (o instanceof Inet6AddressHolder)) {
+                return false;
+            }
+            Inet6AddressHolder that = (Inet6AddressHolder)o;
 
-    /**
-     * This will be set to true when the scope_id field contains a valid
-     * integer scope_id.
-     */
-    private boolean scope_id_set;  // false
+            return Arrays.equals(this.ipaddress, that.ipaddress);
+        }
+
+        public int hashCode() {
+            if (ipaddress != null) {
+
+                int hash = 0;
+                int i=0;
+                while (i<INADDRSZ) {
+                    int j=0;
+                    int component=0;
+                    while (j<4 && i<INADDRSZ) {
+                        component = (component << 8) + ipaddress[i];
+                        j++;
+                        i++;
+                    }
+                    hash += component;
+                }
+                return hash;
+
+            } else {
+                return 0;
+            }
+        }
+
+        boolean isIPv4CompatibleAddress() {
+            if ((ipaddress[0] == 0x00) && (ipaddress[1] == 0x00) &&
+                (ipaddress[2] == 0x00) && (ipaddress[3] == 0x00) &&
+                (ipaddress[4] == 0x00) && (ipaddress[5] == 0x00) &&
+                (ipaddress[6] == 0x00) && (ipaddress[7] == 0x00) &&
+                (ipaddress[8] == 0x00) && (ipaddress[9] == 0x00) &&
+                (ipaddress[10] == 0x00) && (ipaddress[11] == 0x00))  {
+                return true;
+            }
+            return false;
+        }
+
+        boolean isMulticastAddress() {
+            return ((ipaddress[0] & 0xff) == 0xff);
+        }
 
-    /**
-     * scoped interface. scope_id is derived from this as the scope_id of the first
-     * address whose scope is the same as this address for the named interface.
-     */
-    private transient NetworkInterface scope_ifname;  // null
+        boolean isAnyLocalAddress() {
+            byte test = 0x00;
+            for (int i = 0; i < INADDRSZ; i++) {
+                test |= ipaddress[i];
+            }
+            return (test == 0x00);
+        }
+
+        boolean isLoopbackAddress() {
+            byte test = 0x00;
+            for (int i = 0; i < 15; i++) {
+                test |= ipaddress[i];
+            }
+            return (test == 0x00) && (ipaddress[15] == 0x01);
+        }
+
+        boolean isLinkLocalAddress() {
+            return ((ipaddress[0] & 0xff) == 0xfe
+                    && (ipaddress[1] & 0xc0) == 0x80);
+        }
+
+
+        boolean isSiteLocalAddress() {
+            return ((ipaddress[0] & 0xff) == 0xfe
+                    && (ipaddress[1] & 0xc0) == 0xc0);
+        }
 
-    /**
-     * set if the object is constructed with a scoped
-     * interface instead of a numeric scope id.
-     */
-    private boolean scope_ifname_set; // false;
+        boolean isMCGlobal() {
+            return ((ipaddress[0] & 0xff) == 0xff
+                    && (ipaddress[1] & 0x0f) == 0x0e);
+        }
+
+        boolean isMCNodeLocal() {
+            return ((ipaddress[0] & 0xff) == 0xff
+                    && (ipaddress[1] & 0x0f) == 0x01);
+        }
+
+        boolean isMCLinkLocal() {
+            return ((ipaddress[0] & 0xff) == 0xff
+                    && (ipaddress[1] & 0x0f) == 0x02);
+        }
+
+        boolean isMCSiteLocal() {
+            return ((ipaddress[0] & 0xff) == 0xff
+                    && (ipaddress[1] & 0x0f) == 0x05);
+        }
+
+        boolean isMCOrgLocal() {
+            return ((ipaddress[0] & 0xff) == 0xff
+                    && (ipaddress[1] & 0x0f) == 0x08);
+        }
+    }
+
+    private final transient Inet6AddressHolder holder6;
 
     private static final long serialVersionUID = 6880410070516793377L;
 
@@ -216,27 +374,21 @@
 
     Inet6Address() {
         super();
-        holder().hostName = null;
-        ipaddress = new byte[INADDRSZ];
-        holder().family = IPv6;
+        holder.init(null, IPv6);
+        holder6 = new Inet6AddressHolder();
     }
 
     /* 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) {
-        holder().hostName = hostName;
-        if (addr.length == INADDRSZ) { // normal IPv6 address
-            holder().family = IPv6;
-            ipaddress = addr.clone();
-        }
-        if (scope_id >= 0) {
-            this.scope_id = scope_id;
-            scope_id_set = true;
-        }
+        holder.init(hostName, IPv6);
+        holder6 = new Inet6AddressHolder();
+        holder6.init(addr, scope_id);
     }
 
     Inet6Address(String hostName, byte addr[]) {
+        holder6 = new Inet6AddressHolder();
         try {
             initif (hostName, addr, null);
         } catch (UnknownHostException e) {} /* cant happen if ifname is null */
@@ -245,12 +397,14 @@
     Inet6Address (String hostName, byte addr[], NetworkInterface nif)
         throws UnknownHostException
     {
+        holder6 = new Inet6AddressHolder();
         initif (hostName, addr, nif);
     }
 
     Inet6Address (String hostName, byte addr[], String ifname)
         throws UnknownHostException
     {
+        holder6 = new Inet6AddressHolder();
         initstr (hostName, addr, ifname);
     }
 
@@ -341,17 +495,13 @@
     private void initif(String hostName, byte addr[], NetworkInterface nif)
         throws UnknownHostException
     {
-        holder().hostName = hostName;
+        int family = -1;
+        holder6.init(addr, nif);
+
         if (addr.length == INADDRSZ) { // normal IPv6 address
-            holder().family = IPv6;
-            ipaddress = addr.clone();
+            family = IPv6;
         }
-        if (nif != null) {
-            scope_ifname = nif;
-            scope_id = deriveNumericScope(nif);
-            scope_id_set = true;
-            scope_ifname_set = true;  // for consistency
-        }
+        holder.init(hostName, family);
     }
 
     /* check the two Ipv6 addresses and return false if they are both
@@ -359,17 +509,22 @@
      * (ie. one is sitelocal and the other linklocal)
      * return true otherwise.
      */
-    private boolean differentLocalAddressTypes(Inet6Address other) {
-        if (isLinkLocalAddress() && !other.isLinkLocalAddress())
+
+    private static boolean isDifferentLocalAddressType(
+        byte[] thisAddr, byte[] otherAddr) {
+
+        if (Inet6Address.isLinkLocalAddress(thisAddr) &&
+                !Inet6Address.isLinkLocalAddress(otherAddr)) {
             return false;
-        if (isSiteLocalAddress() && !other.isSiteLocalAddress())
+        }
+        if (Inet6Address.isSiteLocalAddress(thisAddr) &&
+                !Inet6Address.isSiteLocalAddress(otherAddr)) {
             return false;
+        }
         return true;
     }
 
-    private int deriveNumericScope(NetworkInterface ifc)
-        throws UnknownHostException
-    {
+    private static int deriveNumericScope (byte[] thisAddr, NetworkInterface ifc) throws UnknownHostException {
         Enumeration<InetAddress> addresses = ifc.getInetAddresses();
         while (addresses.hasMoreElements()) {
             InetAddress addr = addresses.nextElement();
@@ -378,46 +533,60 @@
             }
             Inet6Address ia6_addr = (Inet6Address)addr;
             /* check if site or link local prefixes match */
-            if (!differentLocalAddressTypes(ia6_addr)){
+            if (!isDifferentLocalAddressType(thisAddr, ia6_addr.getAddress())){
                 /* type not the same, so carry on searching */
                 continue;
             }
             /* found a matching address - return its scope_id */
-            return ia6_addr.scope_id;
+            return ia6_addr.getScopeId();
         }
         throw new UnknownHostException ("no scope_id found");
     }
 
-    private int deriveNumericScope(String ifname) throws UnknownHostException {
+    private int deriveNumericScope (String ifname) throws UnknownHostException {
         Enumeration<NetworkInterface> en;
         try {
             en = NetworkInterface.getNetworkInterfaces();
         } catch (SocketException e) {
-            throw new UnknownHostException(
-                    "could not enumerate local network interfaces");
+            throw new UnknownHostException ("could not enumerate local network interfaces");
         }
         while (en.hasMoreElements()) {
             NetworkInterface ifc = en.nextElement();
-            if (ifc.getName().equals(ifname)) {
-                Enumeration<InetAddress> addresses = ifc.getInetAddresses();
-                while (addresses.hasMoreElements()) {
-                    InetAddress addr = addresses.nextElement();
-                    if (!(addr instanceof Inet6Address)) {
-                        continue;
-                    }
-                    Inet6Address ia6_addr = (Inet6Address)addr;
-                    /* check if site or link local prefixes match */
-                    if (!differentLocalAddressTypes(ia6_addr)){
-                        /* type not the same, so carry on searching */
-                        continue;
-                    }
-                    /* found a matching address - return its scope_id */
-                    return ia6_addr.scope_id;
-                }
+            if (ifc.getName().equals (ifname)) {
+                return deriveNumericScope(holder6.ipaddress, ifc);
             }
         }
-        throw new UnknownHostException(
-                "No matching address found for interface : " +ifname);
+        throw new UnknownHostException ("No matching address found for interface : " +ifname);
+    }
+
+    /**
+     * @serialField ipaddress byte[]
+     * @serialField scope_id int
+     * @serialField scope_id_set boolean
+     * @serialField scope_ifname_set boolean
+     * @serialField ifname String
+     */
+
+    private static final ObjectStreamField[] serialPersistentFields = {
+         new ObjectStreamField("ipaddress", byte[].class),
+         new ObjectStreamField("scope_id", int.class),
+         new ObjectStreamField("scope_id_set", boolean.class),
+         new ObjectStreamField("scope_ifname_set", boolean.class),
+         new ObjectStreamField("ifname", String.class)
+    };
+
+    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(
+                    Inet6Address.class.getDeclaredField("holder6"));
+            UNSAFE = unsafe;
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     /**
@@ -427,35 +596,41 @@
      */
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
+        NetworkInterface scope_ifname = null;
 
         if (getClass().getClassLoader() != null) {
             throw new SecurityException ("invalid address type");
         }
 
-        s.defaultReadObject();
+        ObjectInputStream.GetField gf = s.readFields();
+        byte[] ipaddress = (byte[])gf.get("ipaddress", null);
+        int scope_id = (int)gf.get("scope_id", -1);
+        boolean scope_id_set = (boolean)gf.get("scope_id_set", false);
+        boolean scope_ifname_set = (boolean)gf.get("scope_ifname_set", false);
+        String ifname = (String)gf.get("ifname", null);
 
-        if (ifname != null && !ifname.equals("")) {
+        if (ifname != null && !"".equals (ifname)) {
             try {
                 scope_ifname = NetworkInterface.getByName(ifname);
-                if (scope_ifname != null) {
+                if (scope_ifname == null) {
+                    /* the interface does not exist on this system, so we clear
+                     * the scope information completely */
+                    scope_id_set = false;
+                    scope_ifname_set = false;
+                    scope_id = 0;
+                } else {
                     scope_ifname_set = true;
                     try {
-                        scope_id = deriveNumericScope(scope_ifname);
+                        scope_id = deriveNumericScope (ipaddress, scope_ifname);
                     } catch (UnknownHostException e) {
                         // typically should not happen, but it may be that
                         // the machine being used for deserialization has
                         // the same interface name but without IPv6 configured.
                     }
-                } else {
-                    /* the interface does not exist on this system, so we clear
-                     * the scope information completely */
-                    scope_id_set = false;
-                    scope_ifname_set = false;
-                    scope_id = 0;
                 }
             } catch (SocketException e) {}
+        }
 
-        }
         /* if ifname was not supplied, then the numeric info is used */
 
         ipaddress = ipaddress.clone();
@@ -466,9 +641,38 @@
                                              ipaddress.length);
         }
 
-        if (holder().getFamily() != IPv6) {
+        if (holder.getFamily() != IPv6) {
             throw new InvalidObjectException("invalid address family type");
         }
+
+        Inet6AddressHolder h = new Inet6AddressHolder(
+            ipaddress, scope_id, scope_id_set, scope_ifname, scope_ifname_set
+        );
+
+        UNSAFE.putObject(this, FIELDS_OFFSET, h);
+    }
+
+    /**
+     * default behavior is overridden in order to write the
+     * scope_ifname field as a String, rather than a NetworkInterface
+     * which is not serializable
+     */
+    private synchronized void writeObject(ObjectOutputStream s)
+        throws IOException
+    {
+            String ifname = null;
+
+        if (holder6.scope_ifname != null) {
+            ifname = holder6.scope_ifname.getName();
+            holder6.scope_ifname_set = true;
+        }
+        ObjectOutputStream.PutField pfields = s.putFields();
+        pfields.put("ipaddress", holder6.ipaddress);
+        pfields.put("scope_id", holder6.scope_id);
+        pfields.put("scope_id_set", holder6.scope_id_set);
+        pfields.put("scope_ifname_set", holder6.scope_ifname_set);
+        pfields.put("ifname", ifname);
+        s.writeFields();
     }
 
     /**
@@ -483,7 +687,7 @@
      */
     @Override
     public boolean isMulticastAddress() {
-        return ((ipaddress[0] & 0xff) == 0xff);
+        return holder6.isMulticastAddress();
     }
 
     /**
@@ -496,11 +700,7 @@
      */
     @Override
     public boolean isAnyLocalAddress() {
-        byte test = 0x00;
-        for (int i = 0; i < INADDRSZ; i++) {
-            test |= ipaddress[i];
-        }
-        return (test == 0x00);
+        return holder6.isAnyLocalAddress();
     }
 
     /**
@@ -513,11 +713,7 @@
      */
     @Override
     public boolean isLoopbackAddress() {
-        byte test = 0x00;
-        for (int i = 0; i < 15; i++) {
-            test |= ipaddress[i];
-        }
-        return (test == 0x00) && (ipaddress[15] == 0x01);
+        return holder6.isLoopbackAddress();
     }
 
     /**
@@ -530,6 +726,11 @@
      */
     @Override
     public boolean isLinkLocalAddress() {
+        return holder6.isLinkLocalAddress();
+    }
+
+    /* static version of above */
+    static boolean isLinkLocalAddress(byte[] ipaddress) {
         return ((ipaddress[0] & 0xff) == 0xfe
                 && (ipaddress[1] & 0xc0) == 0x80);
     }
@@ -544,6 +745,11 @@
      */
     @Override
     public boolean isSiteLocalAddress() {
+        return holder6.isSiteLocalAddress();
+    }
+
+    /* static version of above */
+    static boolean isSiteLocalAddress(byte[] ipaddress) {
         return ((ipaddress[0] & 0xff) == 0xfe
                 && (ipaddress[1] & 0xc0) == 0xc0);
     }
@@ -559,8 +765,7 @@
      */
     @Override
     public boolean isMCGlobal() {
-        return ((ipaddress[0] & 0xff) == 0xff
-                && (ipaddress[1] & 0x0f) == 0x0e);
+        return holder6.isMCGlobal();
     }
 
     /**
@@ -574,8 +779,7 @@
      */
     @Override
     public boolean isMCNodeLocal() {
-        return ((ipaddress[0] & 0xff) == 0xff
-                && (ipaddress[1] & 0x0f) == 0x01);
+        return holder6.isMCNodeLocal();
     }
 
     /**
@@ -589,8 +793,7 @@
      */
     @Override
     public boolean isMCLinkLocal() {
-        return ((ipaddress[0] & 0xff) == 0xff
-                && (ipaddress[1] & 0x0f) == 0x02);
+        return holder6.isMCLinkLocal();
     }
 
     /**
@@ -604,8 +807,7 @@
      */
     @Override
     public boolean isMCSiteLocal() {
-        return ((ipaddress[0] & 0xff) == 0xff
-                && (ipaddress[1] & 0x0f) == 0x05);
+        return holder6.isMCSiteLocal();
     }
 
     /**
@@ -619,10 +821,8 @@
      */
     @Override
     public boolean isMCOrgLocal() {
-        return ((ipaddress[0] & 0xff) == 0xff
-                && (ipaddress[1] & 0x0f) == 0x08);
+        return holder6.isMCOrgLocal();
     }
-
     /**
      * Returns the raw IP address of this {@code InetAddress} object. The result
      * is in network byte order: the highest order byte of the address is in
@@ -632,7 +832,7 @@
      */
     @Override
     public byte[] getAddress() {
-        return ipaddress.clone();
+        return holder6.ipaddress.clone();
     }
 
     /**
@@ -644,7 +844,7 @@
      * @since 1.5
      */
      public int getScopeId() {
-        return scope_id;
+        return holder6.scope_id;
      }
 
     /**
@@ -655,7 +855,7 @@
      * @since 1.5
      */
      public NetworkInterface getScopedInterface() {
-        return scope_ifname;
+        return holder6.scope_ifname;
      }
 
     /**
@@ -669,13 +869,7 @@
      */
     @Override
     public String getHostAddress() {
-        String s = numericToTextFormat(ipaddress);
-        if (scope_ifname != null) { /* must check this first */
-            s = s + "%" + scope_ifname.getName();
-        } else if (scope_id_set) {
-            s = s + "%" + scope_id;
-        }
-        return s;
+        return holder6.getHostAddress();
     }
 
     /**
@@ -685,25 +879,7 @@
      */
     @Override
     public int hashCode() {
-        if (ipaddress != null) {
-
-            int hash = 0;
-            int i=0;
-            while (i<INADDRSZ) {
-                int j=0;
-                int component=0;
-                while (j<4 && i<INADDRSZ) {
-                    component = (component << 8) + ipaddress[i];
-                    j++;
-                    i++;
-                }
-                hash += component;
-            }
-            return hash;
-
-        } else {
-            return 0;
-        }
+        return holder6.hashCode();
     }
 
     /**
@@ -728,12 +904,8 @@
             return false;
 
         Inet6Address inetAddr = (Inet6Address)obj;
-        for (int i = 0; i < INADDRSZ; i++) {
-            if (ipaddress[i] != inetAddr.ipaddress[i])
-                return false;
-        }
 
-        return true;
+        return holder6.equals(inetAddr.holder6);
     }
 
     /**
@@ -746,15 +918,7 @@
      * @since 1.4
      */
     public boolean isIPv4CompatibleAddress() {
-        if ((ipaddress[0] == 0x00) && (ipaddress[1] == 0x00) &&
-            (ipaddress[2] == 0x00) && (ipaddress[3] == 0x00) &&
-            (ipaddress[4] == 0x00) && (ipaddress[5] == 0x00) &&
-            (ipaddress[6] == 0x00) && (ipaddress[7] == 0x00) &&
-            (ipaddress[8] == 0x00) && (ipaddress[9] == 0x00) &&
-            (ipaddress[10] == 0x00) && (ipaddress[11] == 0x00))  {
-            return true;
-        }
-        return false;
+        return holder6.isIPv4CompatibleAddress();
     }
 
     // Utilities
@@ -784,24 +948,4 @@
      * Perform class load-time initializations.
      */
     private static native void init();
-
-    /**
-     * Following field is only used during (de)/serialization
-     */
-    private String ifname;
-
-    /**
-     * default behavior is overridden in order to write the
-     * scope_ifname field as a String, rather than a NetworkInterface
-     * which is not serializable
-     */
-    private synchronized void writeObject(java.io.ObjectOutputStream s)
-        throws IOException
-    {
-        if (scope_ifname != null) {
-            ifname = scope_ifname.getName();
-            scope_ifname_set = true;
-        }
-        s.defaultWriteObject();
-    }
 }
--- a/src/share/classes/java/net/InetAddress.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/InetAddress.java	Wed Oct 30 18:38:20 2013 +0000
@@ -212,6 +212,13 @@
             this.family = family;
         }
 
+        void init(String hostName, int family) {
+            this.hostName = hostName;
+            if (family != -1) {
+                this.family = family;
+            }
+        }
+
         String hostName;
 
         String getHostName() {
@@ -239,7 +246,7 @@
     }
 
     /* Used to store the serializable fields of InetAddress */
-    private final transient InetAddressHolder holder;
+    final transient InetAddressHolder holder;
 
     InetAddressHolder holder() {
         return holder;
--- a/src/share/classes/java/net/MulticastSocket.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/MulticastSocket.java	Wed Oct 30 18:38:20 2013 +0000
@@ -140,7 +140,7 @@
      * Create a MulticastSocket bound to the specified socket address.
      * <p>
      * Or, if the address is {@code null}, create an unbound socket.
-     * <p>
+     *
      * <p>If there is a security manager,
      * its {@code checkListen} method is first called
      * with the SocketAddress port as its argument to ensure the operation is allowed.
--- a/src/share/classes/java/net/NetPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/NetPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -46,7 +46,6 @@
  * The following table lists all the possible NetPermission target names,
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
- * <P>
  *
  * <table border=1 cellpadding=5 summary="Permission target name, what the permission allows, and associated risks">
  * <tr>
--- a/src/share/classes/java/net/Proxy.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/Proxy.java	Wed Oct 30 18:38:20 2013 +0000
@@ -66,8 +66,8 @@
      * Used, for instance, to create sockets bypassing any other global
      * proxy settings (like SOCKS):
      * <P>
-     * {@code Socket s = new Socket(Proxy.NO_PROXY);}<br>
-     * <P>
+     * {@code Socket s = new Socket(Proxy.NO_PROXY);}
+     *
      */
     public final static Proxy NO_PROXY = new Proxy();
 
--- a/src/share/classes/java/net/Socket.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/Socket.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1230,13 +1230,13 @@
      * Generally, the window size can be modified at any time when a socket is
      * connected. However, if a receive window larger than 64K is required then
      * this must be requested <B>before</B> the socket is connected to the
-     * remote peer. There are two cases to be aware of:<p>
+     * remote peer. There are two cases to be aware of:
      * <ol>
      * <li>For sockets accepted from a ServerSocket, this must be done by calling
      * {@link ServerSocket#setReceiveBufferSize(int)} before the ServerSocket
      * is bound to a local address.<p></li>
      * <li>For client sockets, setReceiveBufferSize() must be called before
-     * connecting the socket to its remote peer.<p></li></ol>
+     * connecting the socket to its remote peer.</li></ol>
      * @param size the size to which to set the receive buffer
      * size. This value must be greater than 0.
      *
@@ -1329,7 +1329,7 @@
      * represent the value of the TOS octet in IP packets sent by
      * the socket.
      * RFC 1349 defines the TOS values as follows:
-     * <p>
+     *
      * <UL>
      * <LI><CODE>IPTOS_LOWCOST (0x02)</CODE></LI>
      * <LI><CODE>IPTOS_RELIABILITY (0x04)</CODE></LI>
--- a/src/share/classes/java/net/SocketOptions.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/SocketOptions.java	Wed Oct 30 18:38:20 2013 +0000
@@ -134,7 +134,7 @@
      * previously written data.
      *<P>
      * Valid for TCP only: SocketImpl.
-     * <P>
+     *
      * @see Socket#setTcpNoDelay
      * @see Socket#getTcpNoDelay
      */
@@ -155,7 +155,7 @@
      * This option <B>must</B> be specified in the constructor.
      * <P>
      * Valid for: SocketImpl, DatagramSocketImpl
-     * <P>
+     *
      * @see Socket#getLocalAddress
      * @see DatagramSocket#getLocalAddress
      */
@@ -186,7 +186,7 @@
      * want to use other than the system default.  Takes/returns an InetAddress.
      * <P>
      * Valid for Multicast: DatagramSocketImpl
-     * <P>
+     *
      * @see MulticastSocket#setInterface(InetAddress)
      * @see MulticastSocket#getInterface()
      */
--- a/src/share/classes/java/net/SocketPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/SocketPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -779,27 +779,27 @@
      * specified permission.
      * <P>
      * More specifically, this method first ensures that all of the following
-     * are true (and returns false if any of them are not):<p>
+     * are true (and returns false if any of them are not):
      * <ul>
-     * <li> <i>p</i> is an instanceof SocketPermission,<p>
+     * <li> <i>p</i> is an instanceof SocketPermission,
      * <li> <i>p</i>'s actions are a proper subset of this
-     * object's actions, and<p>
+     * object's actions, and
      * <li> <i>p</i>'s port range is included in this port range. Note:
-     * port range is ignored when p only contains the action, 'resolve'.<p>
+     * port range is ignored when p only contains the action, 'resolve'.
      * </ul>
      *
      * Then {@code implies} checks each of the following, in order,
-     * and for each returns true if the stated condition is true:<p>
+     * and for each returns true if the stated condition is true:
      * <ul>
      * <li> If this object was initialized with a single IP address and one of <i>p</i>'s
-     * IP addresses is equal to this object's IP address.<p>
+     * IP addresses is equal to this object's IP address.
      * <li>If this object is a wildcard domain (such as *.sun.com), and
      * <i>p</i>'s canonical name (the name without any preceding *)
      * ends with this object's canonical host name. For example, *.sun.com
-     * implies *.eng.sun.com..<p>
+     * implies *.eng.sun.com.
      * <li>If this object was not initialized with a single IP address, and one of this
-     * object's IP addresses equals one of <i>p</i>'s IP addresses.<p>
-     * <li>If this canonical name equals <i>p</i>'s canonical name.<p>
+     * object's IP addresses equals one of <i>p</i>'s IP addresses.
+     * <li>If this canonical name equals <i>p</i>'s canonical name.
      * </ul>
      *
      * If none of the above are true, {@code implies} returns false.
--- a/src/share/classes/java/net/URI.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/URI.java	Wed Oct 30 18:38:20 2013 +0000
@@ -389,20 +389,20 @@
  * colon following a host name but no port (as in
  * {@code http://java.sun.com:}&nbsp;), and that does not encode characters
  * except those that must be quoted, the following identities also hold:
- * <p><pre>
+ * <pre>
  *     new URI(<i>u</i>.getScheme(),
  *             <i>u</i>.getSchemeSpecificPart(),
  *             <i>u</i>.getFragment())
  *     .equals(<i>u</i>)</pre>
  * in all cases,
- * <p><pre>
+ * <pre>
  *     new URI(<i>u</i>.getScheme(),
  *             <i>u</i>.getUserInfo(), <i>u</i>.getAuthority(),
  *             <i>u</i>.getPath(), <i>u</i>.getQuery(),
  *             <i>u</i>.getFragment())
  *     .equals(<i>u</i>)</pre>
  * if <i>u</i> is hierarchical, and
- * <p><pre>
+ * <pre>
  *     new URI(<i>u</i>.getScheme(),
  *             <i>u</i>.getUserInfo(), <i>u</i>.getHost(), <i>u</i>.getPort(),
  *             <i>u</i>.getPath(), <i>u</i>.getQuery(),
--- a/src/share/classes/java/net/URLClassLoader.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/URLClassLoader.java	Wed Oct 30 18:38:20 2013 +0000
@@ -25,21 +25,30 @@
 
 package java.net;
 
-import java.io.*;
-import java.util.*;
-import java.util.jar.Manifest;
-import java.util.jar.JarFile;
-import java.util.jar.Attributes;
-import java.util.jar.Attributes.Name;
+import java.io.Closeable;
+import java.io.File;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.AccessControlContext;
+import java.security.AccessController;
 import java.security.CodeSigner;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedExceptionAction;
-import java.security.AccessController;
-import java.security.AccessControlContext;
-import java.security.SecureClassLoader;
 import java.security.CodeSource;
 import java.security.Permission;
 import java.security.PermissionCollection;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedExceptionAction;
+import java.security.SecureClassLoader;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import java.util.WeakHashMap;
+import java.util.jar.Attributes;
+import java.util.jar.Attributes.Name;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
 import sun.misc.Resource;
 import sun.misc.URLClassPath;
 import sun.net.www.ParseUtil;
@@ -84,6 +93,7 @@
      * @exception  SecurityException  if a security manager exists and its
      *             {@code checkCreateClassLoader} method doesn't allow
      *             creation of a class loader.
+     * @exception  NullPointerException if {@code urls} is {@code null}.
      * @see SecurityManager#checkCreateClassLoader
      */
     public URLClassLoader(URL[] urls, ClassLoader parent) {
@@ -127,6 +137,7 @@
      * @exception  SecurityException  if a security manager exists and its
      *             {@code checkCreateClassLoader} method doesn't allow
      *             creation of a class loader.
+     * @exception  NullPointerException if {@code urls} is {@code null}.
      * @see SecurityManager#checkCreateClassLoader
      */
     public URLClassLoader(URL[] urls) {
@@ -169,6 +180,7 @@
      * @exception  SecurityException  if a security manager exists and its
      *             {@code checkCreateClassLoader} method doesn't allow
      *             creation of a class loader.
+     * @exception  NullPointerException if {@code urls} is {@code null}.
      * @see SecurityManager#checkCreateClassLoader
      */
     public URLClassLoader(URL[] urls, ClassLoader parent,
@@ -260,13 +272,13 @@
     * and errors are not caught. Calling close on an already closed
     * loader has no effect.
     * <p>
-    * @throws IOException if closing any file opened by this class loader
+    * @exception IOException if closing any file opened by this class loader
     * resulted in an IOException. Any such exceptions are caught internally.
     * If only one is caught, then it is re-thrown. If more than one exception
     * is caught, then the second and following exceptions are added
     * as suppressed exceptions of the first one caught, which is then re-thrown.
     *
-    * @throws SecurityException if a security manager is set, and it denies
+    * @exception SecurityException if a security manager is set, and it denies
     *   {@link RuntimePermission}{@code ("closeClassLoader")}
     *
     * @since 1.7
@@ -339,6 +351,7 @@
      * @return the resulting class
      * @exception ClassNotFoundException if the class could not be found,
      *            or if the loader is closed.
+     * @exception NullPointerException if {@code name} is {@code null}.
      */
     protected Class<?> findClass(final String name)
          throws ClassNotFoundException
@@ -621,6 +634,7 @@
      * If the protocol is not "file", then permission
      * to connect to and accept connections from the URL's host is granted.
      * @param codesource the codesource
+     * @exception NullPointerException if {@code codesource} is {@code null}.
      * @return the permissions granted to the codesource
      */
     protected PermissionCollection getPermissions(CodeSource codesource)
@@ -700,6 +714,7 @@
      *
      * @param urls the URLs to search for classes and resources
      * @param parent the parent class loader for delegation
+     * @exception  NullPointerException if {@code urls} is {@code null}.
      * @return the resulting class loader
      */
     public static URLClassLoader newInstance(final URL[] urls,
@@ -725,6 +740,7 @@
      * loading the class.
      *
      * @param urls the URLs to search for classes and resources
+     * @exception  NullPointerException if {@code urls} is {@code null}.
      * @return the resulting class loader
      */
     public static URLClassLoader newInstance(final URL[] urls) {
--- a/src/share/classes/java/net/URLConnection.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/URLConnection.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,7 +45,7 @@
  * application and a URL. Instances of this class can be used both to
  * read from and to write to the resource referenced by the URL. In
  * general, creating a connection to a URL is a multistep process:
- * <p>
+ *
  * <center><table border=2 summary="Describes the process of creating a connection to a URL: openConnection() and connect() over time.">
  * <tr><th>{@code openConnection()}</th>
  *     <th>{@code connect()}</th></tr>
--- a/src/share/classes/java/net/URLDecoder.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/URLDecoder.java	Wed Oct 30 18:38:20 2013 +0000
@@ -43,7 +43,7 @@
  * as the start of a special escaped sequence.
  * <p>
  * The following rules are applied in the conversion:
- * <p>
+ *
  * <ul>
  * <li>The alphanumeric characters &quot;{@code a}&quot; through
  *     &quot;{@code z}&quot;, &quot;{@code A}&quot; through
--- a/src/share/classes/java/net/URLEncoder.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/URLEncoder.java	Wed Oct 30 18:38:20 2013 +0000
@@ -49,7 +49,6 @@
  * <p>
  * When encoding a String, the following rules apply:
  *
- * <p>
  * <ul>
  * <li>The alphanumeric characters &quot;{@code a}&quot; through
  *     &quot;{@code z}&quot;, &quot;{@code A}&quot; through
--- a/src/share/classes/java/net/URLPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/URLPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,7 +45,7 @@
  * </pre>
  * <i>scheme</i> will typically be http or https, but is not restricted by this
  * class.
- * <i>authority</i> is specified as:<p>
+ * <i>authority</i> is specified as:
  * <pre>
  *     authority = hostrange [ : portrange ]
  *     portrange = portnumber | -portnumber | portnumber-[portnumber] | *
@@ -223,7 +223,7 @@
      * Checks if this URLPermission implies the given permission.
      * Specifically, the following checks are done as if in the
      * following sequence:
-     * <p><ul>
+     * <ul>
      * <li>if 'p' is not an instance of URLPermission return false</li>
      * <li>if any of p's methods are not in this's method list, and if
      *     this's method list is not equal to "*", then return false.</li>
@@ -242,7 +242,7 @@
      * <li>otherwise, return false</li>
      * </ul>
      * <p>Some examples of how paths are matched are shown below:
-     * <p><table border>
+     * <table border>
      * <caption>Examples of Path Matching</caption>
      * <tr><th>this's path</th><th>p's path</th><th>match</th></tr>
      * <tr><td>/a/b</td><td>/a/b</td><td>yes</td></tr>
--- a/src/share/classes/java/net/package-info.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/net/package-info.java	Wed Oct 30 18:38:20 2013 +0000
@@ -127,9 +127,9 @@
  *    resources, then convert it into a {@link java.net.URL} when it is time to
  *    access the resource. From that URL, you can either get the
  *    {@link java.net.URLConnection} for fine control, or get directly the
- *    InputStream.<p>
+ *    InputStream.
  * <p>Here is an example:</p>
- * <p><pre>
+ * <pre>
  * URI uri = new URI("http://java.sun.com/");
  * URL url = uri.toURL();
  * InputStream in = url.openStream();
@@ -147,7 +147,7 @@
  *    the {@code java.protocol.handler.pkgs} system property. For instance if
  *    it is set to {@code myapp.protocols}, then the URL code will try, in the
  *    case of http, first to load {@code myapp.protocols.http.Handler}, then,
- *    if this fails, {@code http.Handler} from the default location.<p>
+ *    if this fails, {@code http.Handler} from the default location.
  * <p>Note that the Handler class <b>has to</b> be a subclass of the abstract
  *    class {@link java.net.URLStreamHandler}.</p>
  * <h2>Additional Specification</h2>
--- a/src/share/classes/java/nio/X-Buffer.java.template	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/nio/X-Buffer.java.template	Wed Oct 30 18:38:20 2013 +0000
@@ -1129,7 +1129,7 @@
      *
      * <p> Two $type$ buffers are equal if, and only if,
      *
-     * <p><ol>
+     * <ol>
      *
      *   <li><p> They have the same element type,  </p></li>
      *
--- a/src/share/classes/java/nio/file/FileSystem.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/nio/file/FileSystem.java	Wed Oct 30 18:38:20 2013 +0000
@@ -355,7 +355,7 @@
      *
      * <p> The following rules are used to interpret glob patterns:
      *
-     * <p> <ul>
+     * <ul>
      *   <li><p> The {@code *} character matches zero or more {@link Character
      *   characters} of a {@link Path#getName(int) name} component without
      *   crossing directory boundaries. </p></li>
--- a/src/share/classes/java/rmi/RMISecurityManager.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/rmi/RMISecurityManager.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,35 +28,38 @@
 import java.security.*;
 
 /**
- * A subclass of {@link SecurityManager} used by RMI applications that use
- * downloaded code.  RMI's class loader will not download any classes from
- * remote locations if no security manager has been set.
- * <code>RMISecurityManager</code> does not apply to applets, which run
- * under the protection of their browser's security manager.
+ * {@code RMISecurityManager} implements a policy identical to the policy
+ * implemented by {@link SecurityManager}. RMI applications
+ * should use the {@code SecurityManager} class or another appropriate
+ * {@code SecurityManager} implementation instead of this class. RMI's class
+ * loader will download classes from remote locations only if a security
+ * manager has been set.
  *
- * <code>RMISecurityManager</code> implements a policy that
- * is no different than the policy implemented by {@link SecurityManager}.
- * Therefore an RMI application should use the <code>SecurityManager</code>
- * class or another application-specific <code>SecurityManager</code>
- * implementation instead of this class.
+ * @implNote
+ * <p>Applets typically run in a container that already has a security
+ * manager, so there is generally no need for applets to set a security
+ * manager. If you have a standalone application, you might need to set a
+ * {@code SecurityManager} in order to enable class downloading. This can be
+ * done by adding the following to your code. (It needs to be executed before
+ * RMI can download code from remote hosts, so it most likely needs to appear
+ * in the {@code main} method of your application.)
  *
- * <p>To use a <code>SecurityManager</code> in your application, add
- * the following statement to your code (it needs to be executed before RMI
- * can download code from remote hosts, so it most likely needs to appear
- * in the <code>main</code> method of your application):
- *
- * <pre>
- * System.setSecurityManager(new SecurityManager());
- * </pre>
+ * <pre>{@code
+ *    if (System.getSecurityManager() == null) {
+ *        System.setSecurityManager(new SecurityManager());
+ *    }
+ * }</pre>
  *
  * @author  Roger Riggs
  * @author  Peter Jones
  * @since JDK1.1
- **/
+ * @deprecated Use {@link SecurityManager} instead.
+ */
+@Deprecated
 public class RMISecurityManager extends SecurityManager {
 
     /**
-     * Constructs a new <code>RMISecurityManager</code>.
+     * Constructs a new {@code RMISecurityManager}.
      * @since JDK1.1
      */
     public RMISecurityManager() {
--- a/src/share/classes/java/rmi/activation/ActivationGroup.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/rmi/activation/ActivationGroup.java	Wed Oct 30 18:38:20 2013 +0000
@@ -74,7 +74,7 @@
  * <code>ActivationGroup</code> will override the system properties
  * with the properties requested when its
  * <code>ActivationGroupDesc</code> was created, and will set a
- * <code>java.rmi.RMISecurityManager</code> as the default system
+ * {@link SecurityManager} as the default system
  * security manager.  If your application requires specific properties
  * to be set when objects are activated in the group, the application
  * should create a special <code>Properties</code> object containing
@@ -84,7 +84,7 @@
  * <code>ActivationDesc</code>s (before the default
  * <code>ActivationGroupDesc</code> is created).  If your application
  * requires the use of a security manager other than
- * <code>java.rmi.RMISecurityManager</code>, in the
+ * {@link SecurityManager}, in the
  * ActivativationGroupDescriptor properties list you can set
  * <code>java.security.manager</code> property to the name of the security
  * manager you would like to install.
@@ -154,21 +154,21 @@
      * active). If the object does not call
      * <code>Activatable.inactive</code> when it deactivates, the
      * object will never be garbage collected since the group keeps
-     * strong references to the objects it creates. <p>
+     * strong references to the objects it creates.
      *
      * <p>The group's <code>inactiveObject</code> method unexports the
      * remote object from the RMI runtime so that the object can no
      * longer receive incoming RMI calls. An object will only be unexported
      * if the object has no pending or executing calls.
      * The subclass of <code>ActivationGroup</code> must override this
-     * method and unexport the object. <p>
+     * method and unexport the object.
      *
      * <p>After removing the object from the RMI runtime, the group
      * must inform its <code>ActivationMonitor</code> (via the monitor's
      * <code>inactiveObject</code> method) that the remote object is
      * not currently active so that the remote object will be
      * re-activated by the activator upon a subsequent activation
-     * request.<p>
+     * request.
      *
      * <p>This method simply informs the group's monitor that the object
      * is inactive.  It is up to the concrete subclass of ActivationGroup
@@ -235,7 +235,7 @@
      * <p>Note that if your application creates its own custom
      * activation group, a security manager must be set for that
      * group.  Otherwise objects cannot be activated in the group.
-     * <code>java.rmi.RMISecurityManager</code> is set by default.
+     * {@link SecurityManager} is set by default.
      *
      * <p>If a security manager is already set in the group VM, this
      * method first calls the security manager's
--- a/src/share/classes/java/rmi/dgc/VMID.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/rmi/dgc/VMID.java	Wed Oct 30 18:38:20 2013 +0000
@@ -67,7 +67,7 @@
      * conditions: a) the conditions for uniqueness for objects of
      * the class <code>java.rmi.server.UID</code> are satisfied, and b) an
      * address can be obtained for this host that is unique and constant
-     * for the lifetime of this object.  <p>
+     * for the lifetime of this object.
      */
     public VMID() {
         addr = randomBytes;
--- a/src/share/classes/java/rmi/server/RMISocketFactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/rmi/server/RMISocketFactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -41,7 +41,15 @@
  * (due to a firewall), the runtime uses HTTP with the explicit port
  * number of the server.  If the firewall does not allow this type of
  * communication, then HTTP to a cgi-bin script on the server is used
- * to POST the RMI call.
+ * to POST the RMI call. The HTTP tunneling mechanisms are disabled by
+ * default. This behavior is controlled by the {@code java.rmi.server.disableHttp}
+ * property, whose default value is {@code true}. Setting this property's
+ * value to {@code false} will enable the HTTP tunneling mechanisms.
+ *
+ * <p><strong>Deprecated: HTTP Tunneling.</strong> <em>The HTTP tunneling mechanisms
+ * described above, specifically HTTP with an explicit port and HTTP to a
+ * cgi-bin script, are deprecated. These HTTP tunneling mechanisms are
+ * subject to removal in a future release of the platform.</em>
  *
  * <p>The default socket factory implementation creates server sockets that
  * are bound to the wildcard address, which accepts requests from all network
--- a/src/share/classes/java/rmi/server/ServerRef.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/rmi/server/ServerRef.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
  *
  * @author  Ann Wollrath
  * @since   JDK1.1
+ * @deprecated No replacement. This interface is unused and is obsolete.
  */
+@Deprecated
 public interface ServerRef extends RemoteRef {
 
     /** indicate compatibility with JDK 1.1.x version of class. */
--- a/src/share/classes/java/rmi/server/SocketSecurityException.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/rmi/server/SocketSecurityException.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,9 @@
  *
  * @author  Ann Wollrath
  * @since   JDK1.1
- **/
+ * @deprecated This class is obsolete. Use {@link ExportException} instead.
+ */
+@Deprecated
 public class SocketSecurityException extends ExportException {
 
     /* indicate compatibility with JDK 1.1.x version of class */
--- a/src/share/classes/java/rmi/server/UnicastRemoteObject.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/rmi/server/UnicastRemoteObject.java	Wed Oct 30 18:38:20 2013 +0000
@@ -36,7 +36,7 @@
  * below, the stub for a remote object being exported is obtained as
  * follows:
  *
- * <p><ul>
+ * <ul>
  *
  * <li>If the remote object is exported using the {@link
  * #exportObject(Remote) UnicastRemoteObject.exportObject(Remote)} method,
@@ -66,9 +66,8 @@
  * could not be loaded, or a problem occurs creating the stub instance, a
  * {@link StubNotFoundException} is thrown.
  *
- * <p>
  * <li>For all other means of exporting:
- * <p><ul>
+ * <ul>
  *
  * <li>If the remote object's stub class (as defined above) could not be
  * loaded or the system property
@@ -93,7 +92,6 @@
  * will be thrown.
  * </ul>
  *
- * <p>
  * <li>Otherwise, an instance of the remote object's stub class (as
  * described above) is used as the stub.
  *
--- a/src/share/classes/java/rmi/server/package.html	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/rmi/server/package.html	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 <!--
- Copyright (c) 1998, 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
@@ -32,6 +32,10 @@
 generated by the rmic stub compiler.  Another group of classes
 implements the RMI Transport protocol and HTTP tunneling.
 
+<p><strong>Deprecated: HTTP Tunneling.</strong> <em>The HTTP tunneling
+mechanism has been deprecated. See {@link java.rmi.server.RMISocketFactory} for
+further information.</em>
+
 <!--
 <h2>Package Specification</h2>
 
--- a/src/share/classes/java/security/AccessControlContext.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/AccessControlContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -350,6 +350,10 @@
         return combiner;
     }
 
+    boolean isAuthorized() {
+        return isAuthorized;
+    }
+
     /**
      * Determines whether the access request indicated by the
      * specified permission should be allowed or denied, based on
--- a/src/share/classes/java/security/AccessController.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/AccessController.java	Wed Oct 30 18:38:20 2013 +0000
@@ -39,9 +39,9 @@
  * <ul>
  * <li> to decide whether an access to a critical system
  * resource is to be allowed or denied, based on the security policy
- * currently in effect,<p>
+ * currently in effect,
  * <li>to mark code as being "privileged", thus affecting subsequent
- * access determinations, and<p>
+ * access determinations, and
  * <li>to obtain a "snapshot" of the current calling context so
  * access-control decisions from a different context can be made with
  * respect to the saved context. </ul>
@@ -344,9 +344,10 @@
      * If the action's {@code run} method throws an (unchecked) exception,
      * it will propagate through this method.
      * <p>
-     * If a security manager is installed and the {@code AccessControlContext}
-     * was not created by system code and the caller's {@code ProtectionDomain}
-     * has not been granted the {@literal "createAccessControlContext"}
+     * If a security manager is installed and the specified
+     * {@code AccessControlContext} was not created by system code and the
+     * caller's {@code ProtectionDomain} has not been granted the
+     * {@literal "createAccessControlContext"}
      * {@link java.security.SecurityPermission}, then the action is performed
      * with no permissions.
      *
@@ -384,6 +385,13 @@
      * <p>
      * If the action's {@code run} method throws an (unchecked) exception,
      * it will propagate through this method.
+     * <p>
+     * If a security manager is installed and the specified
+     * {@code AccessControlContext} was not created by system code and the
+     * caller's {@code ProtectionDomain} has not been granted the
+     * {@literal "createAccessControlContext"}
+     * {@link java.security.SecurityPermission}, then the action is performed
+     * with no permissions.
      *
      * @param <T> the type of the value returned by the PrivilegedAction's
      *                  {@code run} method.
@@ -438,6 +446,13 @@
      *
      * <p> This method preserves the current AccessControlContext's
      * DomainCombiner (which may be null) while the action is performed.
+     * <p>
+     * If a security manager is installed and the specified
+     * {@code AccessControlContext} was not created by system code and the
+     * caller's {@code ProtectionDomain} has not been granted the
+     * {@literal "createAccessControlContext"}
+     * {@link java.security.SecurityPermission}, then the action is performed
+     * with no permissions.
      *
      * @param <T> the type of the value returned by the PrivilegedAction's
      *                  {@code run} method.
@@ -571,8 +586,18 @@
                       AccessControlContext parent, AccessControlContext context,
                       Permission[] perms)
     {
-        return new AccessControlContext(getCallerPD(caller), combiner, parent,
-                                        context, perms);
+        ProtectionDomain callerPD = getCallerPD(caller);
+        // check if caller is authorized to create context
+        if (context != null && !context.isAuthorized() &&
+            System.getSecurityManager() != null &&
+            !callerPD.impliesCreateAccessControlContext())
+        {
+            ProtectionDomain nullPD = new ProtectionDomain(null, null);
+            return new AccessControlContext(new ProtectionDomain[] { nullPD });
+        } else {
+            return new AccessControlContext(callerPD, combiner, parent,
+                                            context, perms);
+        }
     }
 
     private static ProtectionDomain getCallerPD(final Class <?> caller) {
@@ -597,9 +622,10 @@
      * If the action's {@code run} method throws an <i>unchecked</i>
      * exception, it will propagate through this method.
      * <p>
-     * If a security manager is installed and the {@code AccessControlContext}
-     * was not created by system code and the caller's {@code ProtectionDomain}
-     * has not been granted the {@literal "createAccessControlContext"}
+     * If a security manager is installed and the specified
+     * {@code AccessControlContext} was not created by system code and the
+     * caller's {@code ProtectionDomain} has not been granted the
+     * {@literal "createAccessControlContext"}
      * {@link java.security.SecurityPermission}, then the action is performed
      * with no permissions.
      *
@@ -641,6 +667,13 @@
      * <p>
      * If the action's {@code run} method throws an (unchecked) exception,
      * it will propagate through this method.
+     * <p>
+     * If a security manager is installed and the specified
+     * {@code AccessControlContext} was not created by system code and the
+     * caller's {@code ProtectionDomain} has not been granted the
+     * {@literal "createAccessControlContext"}
+     * {@link java.security.SecurityPermission}, then the action is performed
+     * with no permissions.
      *
      * @param <T> the type of the value returned by the
      *                  PrivilegedExceptionAction's {@code run} method.
@@ -697,6 +730,13 @@
      *
      * <p> This method preserves the current AccessControlContext's
      * DomainCombiner (which may be null) while the action is performed.
+     * <p>
+     * If a security manager is installed and the specified
+     * {@code AccessControlContext} was not created by system code and the
+     * caller's {@code ProtectionDomain} has not been granted the
+     * {@literal "createAccessControlContext"}
+     * {@link java.security.SecurityPermission}, then the action is performed
+     * with no permissions.
      *
      * @param <T> the type of the value returned by the
      *                  PrivilegedExceptionAction's {@code run} method.
--- a/src/share/classes/java/security/AlgorithmParameterGenerator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/AlgorithmParameterGenerator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -48,7 +48,7 @@
  * of the prime modulus (in bits).
  * When using this approach, algorithm-specific parameter generation
  * values - if any - default to some standard values, unless they can be
- * derived from the specified size.<P>
+ * derived from the specified size.
  *
  * <li>The other approach initializes a parameter generator object
  * using algorithm-specific semantics, which are represented by a set of
--- a/src/share/classes/java/security/BasicPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/BasicPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -57,7 +57,6 @@
  * Subclasses may implement actions on top of BasicPermission,
  * if desired.
  * <p>
- * <P>
  * @see java.security.Permission
  * @see java.security.Permissions
  * @see java.security.PermissionCollection
@@ -153,9 +152,9 @@
      * Checks if the specified permission is "implied" by
      * this object.
      * <P>
-     * More specifically, this method returns true if:<p>
+     * More specifically, this method returns true if:
      * <ul>
-     * <li> <i>p</i>'s class is the same as this object's class, and<p>
+     * <li> <i>p</i>'s class is the same as this object's class, and
      * <li> <i>p</i>'s name equals or (in the case of wildcards)
      *      is implied by this object's
      *      name. For example, "a.b.*" implies "a.b.c".
--- a/src/share/classes/java/security/CodeSource.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/CodeSource.java	Wed Oct 30 18:38:20 2013 +0000
@@ -234,7 +234,7 @@
      * Returns true if this CodeSource object "implies" the specified CodeSource.
      * <p>
      * More specifically, this method makes the following checks.
-     * If any fail, it returns false. If they all succeed, it returns true.<p>
+     * If any fail, it returns false. If they all succeed, it returns true.
      * <ul>
      * <li> <i>codesource</i> must not be null.
      * <li> If this object's certificates are not null, then all
@@ -242,7 +242,7 @@
      * certificates.
      * <li> If this object's location (getLocation()) is not null, then the
      * following checks are made against this object's location and
-     * <i>codesource</i>'s:<p>
+     * <i>codesource</i>'s:
      *   <ul>
      *     <li>  <i>codesource</i>'s location must not be null.
      *
--- a/src/share/classes/java/security/Key.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/Key.java	Wed Oct 30 18:38:20 2013 +0000
@@ -39,7 +39,7 @@
  * RSA), which will work with those algorithms and with related
  * algorithms (such as MD5 with RSA, SHA-1 with RSA, Raw DSA, etc.)
  * The name of the algorithm of a key is obtained using the
- * {@link #getAlgorithm() getAlgorithm} method.<P>
+ * {@link #getAlgorithm() getAlgorithm} method.
  *
  * <LI>An Encoded Form
  *
@@ -65,12 +65,11 @@
  * For more information, see
  * <a href="http://www.ietf.org/rfc/rfc3280.txt">RFC 3280:
  * Internet X.509 Public Key Infrastructure Certificate and CRL Profile</a>.
- * <P>
  *
  * <LI>A Format
  *
  * <P>This is the name of the format of the encoded key. It is returned
- * by the {@link #getFormat() getFormat} method.<P>
+ * by the {@link #getFormat() getFormat} method.
  *
  * </UL>
  *
--- a/src/share/classes/java/security/KeyPairGenerator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/KeyPairGenerator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -77,7 +77,6 @@
  * providers might have precomputed parameter sets for more than just the
  * three modulus sizes mentioned above. Still others might not have a list of
  * precomputed parameters at all and instead always create new parameter sets.
- * <p>
  *
  * <li><b>Algorithm-Specific Initialization</b>
  * <p>For situations where a set of algorithm-specific parameters already
--- a/src/share/classes/java/security/KeyStore.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/KeyStore.java	Wed Oct 30 18:38:20 2013 +0000
@@ -98,7 +98,6 @@
  *    KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
  * </pre>
  * The system will return a keystore implementation for the default type.
- * <p>
  *
  * <li>To provide a specific keystore type:
  * <pre>
--- a/src/share/classes/java/security/MessageDigest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/MessageDigest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -54,21 +54,21 @@
  *
  * <p>Implementations are free to implement the Cloneable interface.
  * Client applications can test cloneability by attempting cloning
- * and catching the CloneNotSupportedException: <p>
+ * and catching the CloneNotSupportedException:
+ *
+ * <pre>{@code
+ * MessageDigest md = MessageDigest.getInstance("SHA");
  *
-* <pre>
-* MessageDigest md = MessageDigest.getInstance("SHA");
-*
-* try {
-*     md.update(toChapter1);
-*     MessageDigest tc1 = md.clone();
-*     byte[] toChapter1Digest = tc1.digest();
-*     md.update(toChapter2);
-*     ...etc.
-* } catch (CloneNotSupportedException cnse) {
-*     throw new DigestException("couldn't make digest of partial content");
-* }
-* </pre>
+ * try {
+ *     md.update(toChapter1);
+ *     MessageDigest tc1 = md.clone();
+ *     byte[] toChapter1Digest = tc1.digest();
+ *     md.update(toChapter2);
+ *     ...etc.
+ * } catch (CloneNotSupportedException cnse) {
+ *     throw new DigestException("couldn't make digest of partial content");
+ * }
+ * }</pre>
  *
  * <p>Note that if a given implementation is not cloneable, it is
  * still possible to compute intermediate digests by instantiating
--- a/src/share/classes/java/security/Permission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/Permission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -138,14 +138,14 @@
      * Returns the hash code value for this Permission object.
      * <P>
      * The required {@code hashCode} behavior for Permission Objects is
-     * the following: <p>
+     * the following:
      * <ul>
      * <li>Whenever it is invoked on the same Permission object more than
      *     once during an execution of a Java application, the
      *     {@code hashCode} method
      *     must consistently return the same integer. This integer need not
      *     remain consistent from one execution of an application to another
-     *     execution of the same application. <p>
+     *     execution of the same application.
      * <li>If two Permission objects are equal according to the
      *     {@code equals}
      *     method, then calling the {@code hashCode} method on each of the
--- a/src/share/classes/java/security/PermissionCollection.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/PermissionCollection.java	Wed Oct 30 18:38:20 2013 +0000
@@ -37,7 +37,6 @@
  *      collection, using the {@code implies} method.
  * <LI> enumerate all the permissions, using the {@code elements} method.
  * </UL>
- * <P>
  *
  * <p>When it is desirable to group together a number of Permission objects
  * of the same type, the {@code newPermissionCollection} method on that
--- a/src/share/classes/java/security/Provider.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/Provider.java	Wed Oct 30 18:38:20 2013 +0000
@@ -30,6 +30,9 @@
 import static java.util.Locale.ENGLISH;
 import java.lang.ref.*;
 import java.lang.reflect.*;
+import java.util.function.BiConsumer;
+import java.util.function.BiFunction;
+import java.util.function.Function;
 
 /**
  * This class represents a "provider" for the
@@ -185,15 +188,10 @@
      * Clears this provider so that it no longer contains the properties
      * used to look up facilities implemented by the provider.
      *
-     * <p>First, if there is a security manager, its
-     * {@code checkSecurityAccess} method is called with the string
-     * {@code "clearProviderProperties."+name} (where {@code name}
-     * is the provider name) to see if it's ok to clear this provider.
-     * If the default implementation of {@code checkSecurityAccess}
-     * is used (that is, that method is not overriden), then this results in
-     * a call to the security manager's {@code checkPermission} method
-     * with a {@code SecurityPermission("clearProviderProperties."+name)}
-     * permission.
+     * <p>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the string {@code "clearProviderProperties."+name}
+     * (where {@code name} is the provider name) to see if it's ok to clear
+     * this provider.
      *
      * @throws  SecurityException
      *          if a security manager exists and its {@link
@@ -202,6 +200,7 @@
      *
      * @since 1.2
      */
+    @Override
     public synchronized void clear() {
         check("clearProviderProperties."+name);
         if (debug != null) {
@@ -218,6 +217,7 @@
      *               input stream.
      * @see java.util.Properties#load
      */
+    @Override
     public synchronized void load(InputStream inStream) throws IOException {
         check("putProviderProperty."+name);
         if (debug != null) {
@@ -235,6 +235,7 @@
      *
      * @since 1.2
      */
+    @Override
     public synchronized void putAll(Map<?,?> t) {
         check("putProviderProperty."+name);
         if (debug != null) {
@@ -250,6 +251,7 @@
      * @see   java.util.Map.Entry
      * @since 1.2
      */
+    @Override
     public synchronized Set<Map.Entry<Object,Object>> entrySet() {
         checkInitialized();
         if (entrySet == null) {
@@ -276,6 +278,7 @@
      *
      * @since 1.2
      */
+    @Override
     public Set<Object> keySet() {
         checkInitialized();
         return Collections.unmodifiableSet(super.keySet());
@@ -287,6 +290,7 @@
      *
      * @since 1.2
      */
+    @Override
     public Collection<Object> values() {
         checkInitialized();
         return Collections.unmodifiableCollection(super.values());
@@ -296,22 +300,10 @@
      * Sets the {@code key} property to have the specified
      * {@code value}.
      *
-     * <p>First, if there is a security manager, its
-     * {@code checkSecurityAccess} method is called with the string
-     * {@code "putProviderProperty."+name}, where {@code name} is the
-     * provider name, to see if it's ok to set this provider's property values.
-     * If the default implementation of {@code checkSecurityAccess}
-     * is used (that is, that method is not overriden), then this results in
-     * a call to the security manager's {@code checkPermission} method
-     * with a {@code SecurityPermission("putProviderProperty."+name)}
-     * permission.
-     *
-     * @param key the property key.
-     *
-     * @param value the property value.
-     *
-     * @return the previous value of the specified property
-     * ({@code key}), or null if it did not have one.
+     * <p>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the string {@code "putProviderProperty."+name},
+     * where {@code name} is the provider name, to see if it's ok to set this
+     * provider's property values.
      *
      * @throws  SecurityException
      *          if a security manager exists and its {@link
@@ -320,6 +312,7 @@
      *
      * @since 1.2
      */
+    @Override
     public synchronized Object put(Object key, Object value) {
         check("putProviderProperty."+name);
         if (debug != null) {
@@ -330,24 +323,38 @@
     }
 
     /**
+     * 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>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the string {@code "putProviderProperty."+name},
+     * where {@code name} is the provider name, to see if it's ok to set this
+     * provider's property values.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to set property values.
+     */
+    @Override
+    public synchronized Object putIfAbsent(Object key, Object value) {
+        check("putProviderProperty."+name);
+        if (debug != null) {
+            debug.println("Set " + name + " provider property [" +
+                          key + "/" + value +"]");
+        }
+        return implPutIfAbsent(key, value);
+    }
+
+    /**
      * Removes the {@code key} property (and its corresponding
      * {@code value}).
      *
-     * <p>First, if there is a security manager, its
-     * {@code checkSecurityAccess} method is called with the string
-     * {@code "removeProviderProperty."+name}, where {@code name} is
-     * the provider name, to see if it's ok to remove this provider's
-     * properties. If the default implementation of
-     * {@code checkSecurityAccess} is used (that is, that method is not
-     * overriden), then this results in a call to the security manager's
-     * {@code checkPermission} method with a
-     * {@code SecurityPermission("removeProviderProperty."+name)}
-     * permission.
-     *
-     * @param key the key for the property to be removed.
-     *
-     * @return the value to which the key had been mapped,
-     * or null if the key did not have a mapping.
+     * <p>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the string {@code "removeProviderProperty."+name},
+     * where {@code name} is the provider name, to see if it's ok to remove this
+     * provider's properties.
      *
      * @throws  SecurityException
      *          if a security manager exists and its {@link
@@ -356,6 +363,7 @@
      *
      * @since 1.2
      */
+    @Override
     public synchronized Object remove(Object key) {
         check("removeProviderProperty."+name);
         if (debug != null) {
@@ -364,19 +372,245 @@
         return implRemove(key);
     }
 
+    /**
+     * Removes the entry for the specified key only if it is currently
+     * mapped to the specified value.
+     *
+     * <p>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the string {@code "removeProviderProperty."+name},
+     * where {@code name} is the provider name, to see if it's ok to remove this
+     * provider's properties.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to remove this provider's properties.
+     */
+    @Override
+    public synchronized boolean remove(Object key, Object value) {
+        check("removeProviderProperty."+name);
+        if (debug != null) {
+            debug.println("Remove " + name + " provider property " + key);
+        }
+        return implRemove(key, value);
+    }
+
+    /**
+     * Replaces the entry for the specified key only if currently
+     * mapped to the specified value.
+     *
+     * <p>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the string {@code "putProviderProperty."+name},
+     * where {@code name} is the provider name, to see if it's ok to set this
+     * provider's property values.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to set property values.
+     */
+    @Override
+    public synchronized boolean replace(Object key, Object oldValue,
+            Object newValue) {
+        check("putProviderProperty." + name);
+
+        if (debug != null) {
+            debug.println("Replace " + name + " provider property " + key);
+        }
+        return implReplace(key, oldValue, newValue);
+    }
+
+    /**
+     * Replaces the entry for the specified key only if it is
+     * currently mapped to some value.
+     *
+     * <p>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the string {@code "putProviderProperty."+name},
+     * where {@code name} is the provider name, to see if it's ok to set this
+     * provider's property values.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to set property values.
+     */
+    @Override
+    public synchronized Object replace(Object key, Object value) {
+        check("putProviderProperty." + name);
+
+        if (debug != null) {
+            debug.println("Replace " + name + " provider property " + key);
+        }
+        return implReplace(key, value);
+    }
+
+    /**
+     * 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>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the string {@code "putProviderProperty."+name},
+     * where {@code name} is the provider name, to see if it's ok to set this
+     * provider's property values.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to set property values.
+     */
+    @Override
+    public synchronized void replaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
+        check("putProviderProperty." + name);
+
+        if (debug != null) {
+            debug.println("ReplaceAll " + name + " provider property ");
+        }
+        implReplaceAll(function);
+    }
+
+    /**
+     * Attempts to compute a mapping for the specified key and its
+     * current mapped value (or {@code null} if there is no current
+     * mapping).
+     *
+     * <p>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the strings {@code "putProviderProperty."+name}
+     * and {@code "removeProviderProperty."+name}, where {@code name} is the
+     * provider name, to see if it's ok to set this provider's property values
+     * and remove this provider's properties.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to set property values or remove properties.
+     */
+    @Override
+    public synchronized Object compute(Object key,
+        BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
+        check("putProviderProperty." + name);
+        check("removeProviderProperty" + name);
+
+        if (debug != null) {
+            debug.println("Compute " + name + " provider property " + key);
+        }
+        return implCompute(key, remappingFunction);
+    }
+
+    /**
+     * 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 a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the strings {@code "putProviderProperty."+name}
+     * and {@code "removeProviderProperty."+name}, where {@code name} is the
+     * provider name, to see if it's ok to set this provider's property values
+     * and remove this provider's properties.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to set property values and remove properties.
+     */
+    @Override
+    public synchronized Object computeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) {
+        check("putProviderProperty." + name);
+        check("removeProviderProperty" + name);
+
+        if (debug != null) {
+            debug.println("ComputeIfAbsent " + name + " provider property " +
+                    key);
+        }
+        return implComputeIfAbsent(key, mappingFunction);
+    }
+
+    /**
+     * 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 a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the strings {@code "putProviderProperty."+name}
+     * and {@code "removeProviderProperty."+name}, where {@code name} is the
+     * provider name, to see if it's ok to set this provider's property values
+     * and remove this provider's properties.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to set property values or remove properties.
+     */
+    @Override
+    public synchronized Object computeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
+        check("putProviderProperty." + name);
+        check("removeProviderProperty" + name);
+
+        if (debug != null) {
+            debug.println("ComputeIfPresent " + name + " provider property " +
+                    key);
+        }
+        return implComputeIfPresent(key, remappingFunction);
+    }
+
+    /**
+     * 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 null. This method may be of use when
+     * combining multiple mapped values for a key.
+     *
+     * <p>If a security manager is enabled, its {@code checkSecurityAccess}
+     * method is called with the strings {@code "putProviderProperty."+name}
+     * and {@code "removeProviderProperty."+name}, where {@code name} is the
+     * provider name, to see if it's ok to set this provider's property values
+     * and remove this provider's properties.
+     *
+     * @throws  SecurityException
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkSecurityAccess} method
+     *          denies access to set property values or remove properties.
+     */
+    @Override
+    public synchronized Object merge(Object key, Object value,  BiFunction<? super Object, ? super Object, ? extends Object>  remappingFunction) {
+        check("putProviderProperty." + name);
+        check("removeProviderProperty" + name);
+
+        if (debug != null) {
+            debug.println("Merge " + name + " provider property " + key);
+        }
+        return implMerge(key, value, remappingFunction);
+    }
+
     // let javadoc show doc from superclass
+    @Override
     public Object get(Object key) {
         checkInitialized();
         return super.get(key);
     }
 
+    @Override
+    public synchronized Object getOrDefault(Object key, Object defaultValue) {
+        checkInitialized();
+        return super.getOrDefault(key, defaultValue);
+    }
+
+    @Override
+    public synchronized void forEach(BiConsumer<? super Object, ? super Object> action) {
+        checkInitialized();
+        super.forEach(action);
+    }
+
     // let javadoc show doc from superclass
+    @Override
     public Enumeration<Object> keys() {
         checkInitialized();
         return super.keys();
     }
 
     // let javadoc show doc from superclass
+    @Override
     public Enumeration<Object> elements() {
         checkInitialized();
         return super.elements();
@@ -446,6 +680,19 @@
         putAll(copy);
     }
 
+    private boolean checkLegacy(Object key) {
+        String keyString = (String)key;
+        if (keyString.startsWith("Provider.")) {
+            return false;
+        }
+
+        legacyChanged = true;
+        if (legacyStrings == null) {
+            legacyStrings = new LinkedHashMap<String,String>();
+        }
+        return true;
+    }
+
     /**
      * Copies all of the mappings from the specified Map to this provider.
      * Internal method to be called AFTER the security check has been
@@ -459,34 +706,121 @@
 
     private Object implRemove(Object key) {
         if (key instanceof String) {
-            String keyString = (String)key;
-            if (keyString.startsWith("Provider.")) {
+            if (!checkLegacy(key)) {
                 return null;
             }
-            legacyChanged = true;
-            if (legacyStrings == null) {
-                legacyStrings = new LinkedHashMap<String,String>();
-            }
-            legacyStrings.remove(keyString);
+            legacyStrings.remove((String)key);
         }
         return super.remove(key);
     }
 
-    private Object implPut(Object key, Object value) {
+    private boolean implRemove(Object key, Object value) {
+        if (key instanceof String && value instanceof String) {
+            if (!checkLegacy(key)) {
+                return false;
+            }
+            legacyStrings.remove((String)key, value);
+        }
+        return super.remove(key, value);
+    }
+
+    private boolean implReplace(Object key, Object oldValue, Object newValue) {
+        if ((key instanceof String) && (oldValue instanceof String) &&
+                (newValue instanceof String)) {
+            if (!checkLegacy(key)) {
+                return false;
+            }
+            legacyStrings.replace((String)key, (String)oldValue,
+                    (String)newValue);
+        }
+        return super.replace(key, oldValue, newValue);
+    }
+
+    private Object implReplace(Object key, Object value) {
         if ((key instanceof String) && (value instanceof String)) {
-            String keyString = (String)key;
-            if (keyString.startsWith("Provider.")) {
+            if (!checkLegacy(key)) {
+                return null;
+            }
+            legacyStrings.replace((String)key, (String)value);
+        }
+        return super.replace(key, value);
+    }
+
+    private void implReplaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
+        legacyChanged = true;
+        if (legacyStrings == null) {
+            legacyStrings = new LinkedHashMap<String,String>();
+        } else {
+            legacyStrings.replaceAll((BiFunction<? super String, ? super String, ? extends String>) function);
+        }
+        super.replaceAll(function);
+    }
+
+
+    private Object implMerge(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
+        if ((key instanceof String) && (value instanceof String)) {
+            if (!checkLegacy(key)) {
                 return null;
             }
-            legacyChanged = true;
-            if (legacyStrings == null) {
-                legacyStrings = new LinkedHashMap<String,String>();
+            legacyStrings.merge((String)key, (String)value,
+                    (BiFunction<? super String, ? super String, ? extends String>) remappingFunction);
+        }
+        return super.merge(key, value, remappingFunction);
+    }
+
+    private Object implCompute(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
+        if (key instanceof String) {
+            if (!checkLegacy(key)) {
+                return null;
+            }
+            legacyStrings.computeIfAbsent((String) key,
+                    (Function<? super String, ? extends String>) remappingFunction);
+        }
+        return super.compute(key, remappingFunction);
+    }
+
+    private Object implComputeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) {
+        if (key instanceof String) {
+            if (!checkLegacy(key)) {
+                return null;
             }
-            legacyStrings.put(keyString, (String)value);
+            legacyStrings.computeIfAbsent((String) key,
+                    (Function<? super String, ? extends String>) mappingFunction);
+        }
+        return super.computeIfAbsent(key, mappingFunction);
+    }
+
+    private Object implComputeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
+        if (key instanceof String) {
+            if (!checkLegacy(key)) {
+                return null;
+            }
+            legacyStrings.computeIfPresent((String) key,
+                    (BiFunction<? super String, ? super String, ? extends String>) remappingFunction);
+        }
+        return super.computeIfPresent(key, remappingFunction);
+    }
+
+    private Object implPut(Object key, Object value) {
+        if ((key instanceof String) && (value instanceof String)) {
+            if (!checkLegacy(key)) {
+                return null;
+            }
+            legacyStrings.put((String)key, (String)value);
         }
         return super.put(key, value);
     }
 
+    private Object implPutIfAbsent(Object key, Object value) {
+        if ((key instanceof String) && (value instanceof String)) {
+            if (!checkLegacy(key)) {
+                return null;
+            }
+            legacyStrings.putIfAbsent((String)key, (String)value);
+        }
+        return super.putIfAbsent(key, value);
+    }
+
     private void implClear() {
         if (legacyStrings != null) {
             legacyStrings.clear();
--- a/src/share/classes/java/security/SecurityPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/SecurityPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -44,7 +44,6 @@
  * The following table lists all the possible SecurityPermission target names,
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
- * <P>
  *
  * <table border=1 cellpadding=5 summary="target name,what the permission allows, and associated risks">
  * <tr>
@@ -193,7 +192,6 @@
  * associated with classes that have been deprecated: {@link Identity},
  * {@link IdentityScope}, {@link Signer}. Use of them is discouraged. See the
  * applicable classes for more information.
- * <P>
  *
  * <table border=1 cellpadding=5 summary="target name,what the permission allows, and associated risks">
  * <tr>
--- a/src/share/classes/java/security/Signature.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/Signature.java	Wed Oct 30 18:38:20 2013 +0000
@@ -77,13 +77,13 @@
  *     (see {@link #initSign(PrivateKey)}
  *     and {@link #initSign(PrivateKey, SecureRandom)}).
  *
- *     </ul><p>
+ *     </ul>
  *
- * <li>Updating<p>
+ * <li>Updating
  *
  * <p>Depending on the type of initialization, this will update the
  * bytes to be signed or verified. See the
- * {@link #update(byte) update} methods.<p>
+ * {@link #update(byte) update} methods.
  *
  * <li>Signing or Verifying a signature on all updated bytes. See the
  * {@link #sign() sign} methods and the {@link #verify(byte[]) verify}
--- a/src/share/classes/java/security/SignedObject.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/SignedObject.java	Wed Oct 30 18:38:20 2013 +0000
@@ -43,7 +43,7 @@
  * object passed to the constructor and the {@code verify} method.
  * A typical usage for signing is the following:
  *
- * <p> <pre>{@code
+ * <pre>{@code
  * Signature signingEngine = Signature.getInstance(algorithm,
  *                                                 provider);
  * SignedObject so = new SignedObject(myobject, signingKey,
@@ -53,7 +53,7 @@
  * <p> A typical usage for verification is the following (having
  * received SignedObject {@code so}):
  *
- * <p> <pre>{@code
+ * <pre>{@code
  * Signature verificationEngine =
  *     Signature.getInstance(algorithm, provider);
  * if (so.verify(publickey, verificationEngine))
--- a/src/share/classes/java/security/acl/Acl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/acl/Acl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -42,27 +42,27 @@
  * granted to the associated principal. If negative, the permissions
  * are to be denied.<p>
  *
- * The ACL Entries in each ACL observe the following rules:<p>
+ * The ACL Entries in each ACL observe the following rules:
  *
  * <ul> <li>Each principal can have at most one positive ACL entry and
  * one negative entry; that is, multiple positive or negative ACL
  * entries are not allowed for any principal.  Each entry specifies
  * the set of permissions that are to be granted (if positive) or
- * denied (if negative). <p>
+ * denied (if negative).
  *
  * <li>If there is no entry for a particular principal, then the
- * principal is considered to have a null (empty) permission set.<p>
+ * principal is considered to have a null (empty) permission set.
  *
  * <li>If there is a positive entry that grants a principal a
  * particular permission, and a negative entry that denies the
  * principal the same permission, the result is as though the
- * permission was never granted or denied. <p>
+ * permission was never granted or denied.
  *
  * <li>Individual permissions always override permissions of the
  * group(s) to which the individual belongs. That is, individual
  * negative permissions (specific denial of permissions) override the
  * groups' positive permissions. And individual positive permissions
- * override the groups' negative permissions.<p>
+ * override the groups' negative permissions.
  *
  * </ul>
  *
@@ -159,12 +159,12 @@
      * Returns an enumeration for the set of allowed permissions for the
      * specified principal (representing an entity such as an individual or
      * a group). This set of allowed permissions is calculated as
-     * follows:<p>
+     * follows:
      *
      * <ul>
      *
      * <li>If there is no entry in this Access Control List for the
-     * specified principal, an empty permission set is returned.<p>
+     * specified principal, an empty permission set is returned.
      *
      * <li>Otherwise, the principal's group permission sets are determined.
      * (A principal can belong to one or more groups, where a group is a
--- a/src/share/classes/java/security/cert/CertificateFactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/cert/CertificateFactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -63,7 +63,7 @@
  * supports those methods), so that each call to
  * {@code generateCertificate} consumes only one certificate, and the
  * read position of the input stream is positioned to the next certificate in
- * the file:<p>
+ * the file:
  *
  * <pre>{@code
  * FileInputStream fis = new FileInputStream(filename);
@@ -78,7 +78,7 @@
  * }</pre>
  *
  * <p>The following example parses a PKCS#7-formatted certificate reply stored
- * in a file and extracts all the certificates from it:<p>
+ * in a file and extracts all the certificates from it:
  *
  * <pre>
  * FileInputStream fis = new FileInputStream(filename);
--- a/src/share/classes/java/security/cert/PKIXRevocationChecker.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/cert/PKIXRevocationChecker.java	Wed Oct 30 18:38:20 2013 +0000
@@ -299,7 +299,7 @@
         /**
          * Allow revocation check to succeed if the revocation status cannot be
          * determined for one of the following reasons:
-         * <p><ul>
+         * <ul>
          *  <li>The CRL or OCSP response cannot be obtained because of a
          *      network error.
          *  <li>The OCSP responder returns one of the following errors
--- a/src/share/classes/java/security/cert/PolicyQualifierInfo.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/cert/PolicyQualifierInfo.java	Wed Oct 30 18:38:20 2013 +0000
@@ -35,7 +35,7 @@
  * structure.
  *
  * <p>The ASN.1 definition is as follows:
- * <p><pre>
+ * <pre>
  *   PolicyQualifierInfo ::= SEQUENCE {
  *        policyQualifierId       PolicyQualifierId,
  *        qualifier               ANY DEFINED BY policyQualifierId }
--- a/src/share/classes/java/security/cert/TrustAnchor.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/cert/TrustAnchor.java	Wed Oct 30 18:38:20 2013 +0000
@@ -44,7 +44,6 @@
  * individual parameters.
  * <p>
  * <b>Concurrent Access</b>
- * <p>
  * <p>All {@code TrustAnchor} objects must be immutable and
  * thread-safe. That is, multiple threads may concurrently invoke the
  * methods defined in this class on a single {@code TrustAnchor}
--- a/src/share/classes/java/security/cert/X509CertSelector.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/cert/X509CertSelector.java	Wed Oct 30 18:38:20 2013 +0000
@@ -359,7 +359,7 @@
      * criticality setting, and encapsulating OCTET STRING)
      * for a SubjectKeyIdentifier extension.
      * The ASN.1 notation for this structure follows.
-     * <p>
+     *
      * <pre>{@code
      * SubjectKeyIdentifier ::= KeyIdentifier
      *
@@ -399,7 +399,7 @@
      * criticality setting, and encapsulating OCTET STRING)
      * for an AuthorityKeyIdentifier extension.
      * The ASN.1 notation for this structure follows.
-     * <p>
+     *
      * <pre>{@code
      * AuthorityKeyIdentifier ::= SEQUENCE {
      *    keyIdentifier             [0] KeyIdentifier           OPTIONAL,
--- a/src/share/classes/java/security/interfaces/DSAKeyPairGenerator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/security/interfaces/DSAKeyPairGenerator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -43,11 +43,11 @@
  *
  * <li>Get a key pair generator for the DSA algorithm by calling the
  * KeyPairGenerator {@code getInstance} method with "DSA"
- * as its argument.<p>
+ * as its argument.
  *
  * <li>Initialize the generator by casting the result to a DSAKeyPairGenerator
  * and calling one of the
- * {@code initialize} methods from this DSAKeyPairGenerator interface.<p>
+ * {@code initialize} methods from this DSAKeyPairGenerator interface.
  *
  * <li>Generate a key pair by calling the {@code generateKeyPair}
  * method from the KeyPairGenerator class.
--- a/src/share/classes/java/sql/CallableStatement.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/CallableStatement.java	Wed Oct 30 18:38:20 2013 +0000
@@ -56,7 +56,7 @@
  * For maximum portability, a call's <code>ResultSet</code> objects and
  * update counts should be processed prior to getting the values of output
  * parameters.
- * <P>
+ *
  *
  * @see Connection#prepareCall
  * @see ResultSet
--- a/src/share/classes/java/sql/Connection.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/Connection.java	Wed Oct 30 18:38:20 2013 +0000
@@ -611,7 +611,7 @@
      * <code>Map</code> object returned from
      *  <code>getTypeMap</code> as a JDBC driver may create an internal
      * copy of the <code>Map</code> object passed to <code>setTypeMap</code>:
-     * <p>
+     *
      * <pre>
      *      Map&lt;String,Class&lt;?&gt;&gt; myMap = con.getTypeMap();
      *      myMap.put("mySchemaName.ATHLETES", Athletes.class);
@@ -636,7 +636,7 @@
      * You must set the the values for the <code>TypeMap</code> prior to
      * callng <code>setMap</code> as a JDBC driver may create an internal copy
      * of the <code>TypeMap</code>:
-     * <p>
+     *
      * <pre>
      *      Map myMap&lt;String,Class&lt;?&gt;&gt; = new HashMap&lt;String,Class&lt;?&gt;&gt;();
      *      myMap.put("mySchemaName.ATHLETES", Athletes.class);
@@ -1119,7 +1119,7 @@
          * @exception SQLException if the value supplied for <code>timeout</code>
          * is less then 0
          * @since 1.6
-         * <p>
+         *
          * @see java.sql.DatabaseMetaData#getClientInfoProperties
          */
          boolean isValid(int timeout) throws SQLException;
@@ -1154,7 +1154,7 @@
          * required to support these properties however if the driver supports a
          * client info property that can be described by one of the standard
          * properties, the standard property name should be used.
-         * <p>
+         *
          * <ul>
          * <li>ApplicationName  -       The name of the application currently utilizing
          *                                                      the connection</li>
@@ -1208,7 +1208,7 @@
      * @throws SQLClientInfoException if the database server returns an error while
      *                  setting the clientInfo values on the database server or this method
      * is called on a closed connection
-     * <p>
+     *
      */
          void setClientInfo(Properties properties)
                 throws SQLClientInfoException;
@@ -1232,7 +1232,7 @@
          *or this method is called on a closed connection
          * <p>
          * @since 1.6
-         * <p>
+         *
          * @see java.sql.DatabaseMetaData#getClientInfoProperties
          */
          String getClientInfo(String name)
--- a/src/share/classes/java/sql/DatabaseMetaData.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/DatabaseMetaData.java	Wed Oct 30 18:38:20 2013 +0000
@@ -67,7 +67,7 @@
  * entries matching the search pattern are returned. If a search pattern
  * argument is set to <code>null</code>, that argument's criterion will
  * be dropped from the search.
- * <P>
+ *
  */
 public interface DatabaseMetaData extends Wrapper {
 
@@ -3271,7 +3271,7 @@
         /**
          * Retrieves a list of the client info properties
          * that the driver supports.  The result set contains the following columns
-         * <p>
+         *
          * <ol>
          * <li><b>NAME</b> String{@code =>} The name of the client info property<br>
          * <li><b>MAX_LEN</b> int{@code =>} The maximum length of the value for the property<br>
--- a/src/share/classes/java/sql/ResultSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/ResultSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -76,7 +76,7 @@
  * getter method and returns a suitable Java value.  The JDBC specification
  * has a table showing the allowable mappings from SQL types to Java types
  * that can be used by the <code>ResultSet</code> getter methods.
- * <P>
+ *
  * <P>Column names used as input to getter methods are case
  * insensitive.  When a getter method is called  with
  * a column name and several columns have the same name,
@@ -199,8 +199,7 @@
      *<p>
      * Calling the method <code>close</code> on a <code>ResultSet</code>
      * object that is already closed is a no-op.
-     * <P>
-     * <p>
+     *
      *
      * @exception SQLException if a database access error occurs
      */
--- a/src/share/classes/java/sql/SQLException.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/SQLException.java	Wed Oct 30 18:38:20 2013 +0000
@@ -134,7 +134,7 @@
      * The <code>cause</code> is not initialized, and may subsequently be
      * initialized by a call to the
      * {@link Throwable#initCause(java.lang.Throwable)} method.
-     * <p>
+     *
      */
     public SQLException() {
         super();
--- a/src/share/classes/java/sql/SQLFeatureNotSupportedException.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/SQLFeatureNotSupportedException.java	Wed Oct 30 18:38:20 2013 +0000
@@ -30,7 +30,7 @@
  * ( the value is 'zero' A).
  * This indicates that the JDBC driver does not support an optional JDBC feature.
  * Optional JDBC features can fall into the fallowing categories:
- *<p>
+ *
  *<UL>
  *<LI>no support for an optional feature
  *<LI>no support for an optional overloaded method
--- a/src/share/classes/java/sql/SQLPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/SQLPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -56,7 +56,7 @@
  * The following table lists all the possible <code>SQLPermission</code> target names.
  * The table gives a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
- * <P>
+ *
  *
  * <table border=1 cellpadding=5 summary="permission target name, what the permission allows, and associated risks">
  * <tr>
--- a/src/share/classes/java/sql/SQLWarning.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/SQLWarning.java	Wed Oct 30 18:38:20 2013 +0000
@@ -108,7 +108,7 @@
      * The <code>cause</code> is not initialized, and may subsequently be
      * initialized by a call to the
      * {@link Throwable#initCause(java.lang.Throwable)} method.
-     * <p>
+     *
      */
     public SQLWarning() {
         super();
--- a/src/share/classes/java/sql/SQLXML.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/SQLXML.java	Wed Oct 30 18:38:20 2013 +0000
@@ -177,8 +177,8 @@
  * The state moves from writable to not writeable once free() or any of the
  * writing APIs are called: setBinaryStream(), setCharacterStream(), setResult(), and setString().
  * Implementations may also change the state to not readable when this occurs.
+ *
  * <p>
-  * <p>
  * All methods on the <code>SQLXML</code> interface must be fully implemented if the
  * JDBC driver supports the data type.
  *
--- a/src/share/classes/java/sql/Statement.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/sql/Statement.java	Wed Oct 30 18:38:20 2013 +0000
@@ -559,7 +559,7 @@
      * <code>BatchUpdateException.getUpdateCounts</code>
      * will contain as many elements as there are commands in the batch, and
      * at least one of the elements will be the following:
-     * <P>
+     *
      * <LI>A value of <code>EXECUTE_FAILED</code> -- indicates that the command failed
      * to execute successfully and occurs only if a driver continues to
      * process commands after a command fails
@@ -1165,7 +1165,7 @@
      * <code>BatchUpdateException.getLargeUpdateCounts</code>
      * will contain as many elements as there are commands in the batch, and
      * at least one of the elements will be the following:
-     * <P>
+     *
      * <LI>A value of <code>EXECUTE_FAILED</code> -- indicates that the command failed
      * to execute successfully and occurs only if a driver continues to
      * process commands after a command fails
--- a/src/share/classes/java/text/MessageFormat.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/text/MessageFormat.java	Wed Oct 30 18:38:20 2013 +0000
@@ -125,7 +125,6 @@
  * valid patterns, but <code>"ab {0'}' de"</code>, <code>"ab } de"</code>
  * and <code>"''{''"</code> are not.
  *
- * <p>
  * <dl><dt><b>Warning:</b><dd>The rules for using quotes within message
  * format patterns unfortunately have shown to be somewhat confusing.
  * In particular, it isn't always obvious to localizers whether single
@@ -146,7 +145,7 @@
  * table shows how the values map to {@code Format} instances. Combinations not
  * shown in the table are illegal. A <i>SubformatPattern</i> must
  * be a valid pattern string for the {@code Format} subclass used.
- * <p>
+ *
  * <table border=1 summary="Shows how FormatType and FormatStyle values map to Format instances">
  *    <tr>
  *       <th id="ft" class="TableHeadingColor">FormatType
@@ -215,7 +214,6 @@
  *       <td headers="fs"><i>SubformatPattern</i>
  *       <td headers="sc">{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
  * </table>
- * <p>
  *
  * <h4>Usage Information</h4>
  *
@@ -761,7 +759,7 @@
      * as indicated by the first matching line of the following table. An
      * argument is <i>unavailable</i> if <code>arguments</code> is
      * <code>null</code> or has fewer than argumentIndex+1 elements.
-     * <p>
+     *
      * <table border=1 summary="Examples of subformat,argument,and formatted text">
      *    <tr>
      *       <th>Subformat
--- a/src/share/classes/java/text/Normalizer.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/text/Normalizer.java	Wed Oct 30 18:38:20 2013 +0000
@@ -53,12 +53,12 @@
  * several different ways in Unicode.  For example, take the character A-acute.
  * In Unicode, this can be encoded as a single character (the "composed" form):
  *
- * <p><pre>
+ * <pre>
  *      U+00C1    LATIN CAPITAL LETTER A WITH ACUTE</pre>
  *
  * or as two separate characters (the "decomposed" form):
  *
- * <p><pre>
+ * <pre>
  *      U+0041    LATIN CAPITAL LETTER A
  *      U+0301    COMBINING ACUTE ACCENT</pre>
  *
@@ -72,14 +72,14 @@
  * <p>
  * Similarly, the string "ffi" can be encoded as three separate letters:
  *
- * <p><pre>
+ * <pre>
  *      U+0066    LATIN SMALL LETTER F
  *      U+0066    LATIN SMALL LETTER F
  *      U+0069    LATIN SMALL LETTER I</pre>
  *
  * or as the single character
  *
- * <p><pre>
+ * <pre>
  *      U+FB03    LATIN SMALL LIGATURE FFI</pre>
  *
  * The ffi ligature is not a distinct semantic character, and strictly speaking
--- a/src/share/classes/java/text/SimpleDateFormat.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/text/SimpleDateFormat.java	Wed Oct 30 18:38:20 2013 +0000
@@ -356,7 +356,6 @@
  * may be replaced with other, locale dependent, pattern letters.
  * <code>SimpleDateFormat</code> does not deal with the localization of text
  * other than the pattern letters; that's up to the client of the class.
- * <p>
  *
  * <h4>Examples</h4>
  *
--- a/src/share/classes/java/time/DayOfWeek.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/DayOfWeek.java	Wed Oct 30 18:38:20 2013 +0000
@@ -71,6 +71,7 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
@@ -403,7 +404,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.precision()) {
+        if (query == TemporalQueries.precision()) {
             return (R) DAYS;
         }
         return TemporalAccessor.super.query(query);
--- a/src/share/classes/java/time/Duration.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/Duration.java	Wed Oct 30 18:38:20 2013 +0000
@@ -141,7 +141,7 @@
     /**
      * The pattern for parsing.
      */
-    private final static Pattern PATTERN =
+    private static final Pattern PATTERN =
             Pattern.compile("([-+]?)P(?:([-+]?[0-9]+)D)?" +
                     "(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)?",
                     Pattern.CASE_INSENSITIVE);
@@ -554,7 +554,7 @@
      * the simple initialization in Duration.
      */
     private static class DurationUnits {
-        final static List<TemporalUnit> UNITS =
+        static final List<TemporalUnit> UNITS =
                 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(SECONDS, NANOS));
     }
 
--- a/src/share/classes/java/time/Instant.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/Instant.java	Wed Oct 30 18:38:20 2013 +0000
@@ -76,7 +76,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
-import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
@@ -87,6 +86,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -156,14 +156,14 @@
  * internationally-agreed time scale is modified or replaced, a new
  * segment of the Java Time-Scale must be defined for it.  Each segment
  * must meet these requirements:
- * <p><ul>
+ * <ul>
  * <li>the Java Time-Scale shall closely match the underlying international
  *  civil time scale;</li>
  * <li>the Java Time-Scale shall exactly match the international civil
  *  time scale at noon each day;</li>
  * <li>the Java Time-Scale shall have a precisely-defined relationship to
  *  the international civil time scale.</li>
- * </ul><p>
+ * </ul>
  * There are currently, as of 2013, two segments in the Java time-scale.
  * <p>
  * For the segment from 1972-11-03 (exact boundary discussed below) until
@@ -1050,12 +1050,12 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.precision()) {
+        if (query == TemporalQueries.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
-        if (query == TemporalQuery.chronology() || query == TemporalQuery.zoneId() ||
-                query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
+        if (query == TemporalQueries.chronology() || query == TemporalQueries.zoneId() ||
+                query == TemporalQueries.zone() || query == TemporalQueries.offset()) {
             return null;
         }
         return query.queryFrom(this);
--- a/src/share/classes/java/time/LocalDate.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/LocalDate.java	Wed Oct 30 18:38:20 2013 +0000
@@ -78,7 +78,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
-import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Era;
@@ -92,6 +91,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -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 TemporalQuery#localDate()} query, which relies
+     * The conversion uses the {@link TemporalQueries#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}
@@ -354,7 +354,7 @@
      */
     public static LocalDate from(TemporalAccessor temporal) {
         Objects.requireNonNull(temporal, "temporal");
-        LocalDate date = temporal.query(TemporalQuery.localDate());
+        LocalDate date = temporal.query(TemporalQueries.localDate());
         if (date == null) {
             throw new DateTimeException("Unable to obtain LocalDate from TemporalAccessor: " +
                     temporal + " of type " + temporal.getClass().getName());
@@ -1501,7 +1501,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.localDate()) {
+        if (query == TemporalQueries.localDate()) {
             return (R) this;
         }
         return ChronoLocalDate.super.query(query);
--- a/src/share/classes/java/time/LocalDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/LocalDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -76,7 +76,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
-import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.chrono.ChronoLocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -88,6 +87,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -1579,7 +1579,7 @@
     @SuppressWarnings("unchecked")
     @Override  // override for Javadoc
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.localDate()) {
+        if (query == TemporalQueries.localDate()) {
             return (R) date;
         }
         return ChronoLocalDateTime.super.query(query);
@@ -1941,13 +1941,13 @@
      * Outputs this date-time as a {@code String}, such as {@code 2007-12-03T10:15:30}.
      * <p>
      * The output will be one of the following ISO-8601 formats:
-     * <p><ul>
+     * <ul>
      * <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>
+     * </ul>
      * The format used will be the shortest that outputs the full value of
      * the time where the omitted parts are implied to be zero.
      *
--- a/src/share/classes/java/time/LocalTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/LocalTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -74,7 +74,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
-import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
@@ -85,6 +84,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -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 TemporalQuery#localTime()} query, which relies
+     * The conversion uses the {@link TemporalQueries#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}
@@ -395,7 +395,7 @@
      */
     public static LocalTime from(TemporalAccessor temporal) {
         Objects.requireNonNull(temporal, "temporal");
-        LocalTime time = temporal.query(TemporalQuery.localTime());
+        LocalTime time = temporal.query(TemporalQueries.localTime());
         if (time == null) {
             throw new DateTimeException("Unable to obtain LocalTime from TemporalAccessor: " +
                     temporal + " of type " + temporal.getClass().getName());
@@ -1281,14 +1281,14 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.chronology() || query == TemporalQuery.zoneId() ||
-                query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
+        if (query == TemporalQueries.chronology() || query == TemporalQueries.zoneId() ||
+                query == TemporalQueries.zone() || query == TemporalQueries.offset()) {
             return null;
-        } else if (query == TemporalQuery.localTime()) {
+        } else if (query == TemporalQueries.localTime()) {
             return (R) this;
-        } else if (query == TemporalQuery.localDate()) {
+        } else if (query == TemporalQueries.localDate()) {
             return null;
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -1554,13 +1554,13 @@
      * Outputs this time as a {@code String}, such as {@code 10:15}.
      * <p>
      * The output will be one of the following ISO-8601 formats:
-     * <p><ul>
+     * <ul>
      * <li>{@code HH:mm}</li>
      * <li>{@code HH:mm:ss}</li>
      * <li>{@code HH:mm:ss.SSS}</li>
      * <li>{@code HH:mm:ss.SSSSSS}</li>
      * <li>{@code HH:mm:ss.SSSSSSSSS}</li>
-     * </ul><p>
+     * </ul>
      * The format used will be the shortest that outputs the full value of
      * the time where the omitted parts are implied to be zero.
      *
--- a/src/share/classes/java/time/Month.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/Month.java	Wed Oct 30 18:38:20 2013 +0000
@@ -73,6 +73,7 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
@@ -560,9 +561,9 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.chronology()) {
+        if (query == TemporalQueries.chronology()) {
             return (R) IsoChronology.INSTANCE;
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) MONTHS;
         }
         return TemporalAccessor.super.query(query);
--- a/src/share/classes/java/time/MonthDay.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/MonthDay.java	Wed Oct 30 18:38:20 2013 +0000
@@ -68,7 +68,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
-import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.chrono.Chronology;
 import java.time.chrono.IsoChronology;
@@ -80,6 +79,7 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
@@ -582,7 +582,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.chronology()) {
+        if (query == TemporalQueries.chronology()) {
             return (R) IsoChronology.INSTANCE;
         }
         return TemporalAccessor.super.query(query);
--- a/src/share/classes/java/time/OffsetDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/OffsetDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -69,7 +69,6 @@
 import static java.time.temporal.ChronoUnit.NANOS;
 
 import java.io.IOException;
-import java.io.InvalidObjectException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.io.InvalidObjectException;
@@ -84,6 +83,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -1527,17 +1527,17 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.offset() || query == TemporalQuery.zone()) {
+        if (query == TemporalQueries.offset() || query == TemporalQueries.zone()) {
             return (R) getOffset();
-        } else if (query == TemporalQuery.zoneId()) {
+        } else if (query == TemporalQueries.zoneId()) {
             return null;
-        } else if (query == TemporalQuery.localDate()) {
+        } else if (query == TemporalQueries.localDate()) {
             return (R) toLocalDate();
-        } else if (query == TemporalQuery.localTime()) {
+        } else if (query == TemporalQueries.localTime()) {
             return (R) toLocalTime();
-        } else if (query == TemporalQuery.chronology()) {
+        } else if (query == TemporalQueries.chronology()) {
             return (R) IsoChronology.INSTANCE;
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -1880,13 +1880,13 @@
      * Outputs this date-time as a {@code String}, such as {@code 2007-12-03T10:15:30+01:00}.
      * <p>
      * The output will be one of the following ISO-8601 formats:
-     * <p><ul>
+     * <ul>
      * <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>
+     * </ul>
      * The format used will be the shortest that outputs the full value of
      * the time where the omitted parts are implied to be zero.
      *
@@ -1903,9 +1903,9 @@
      * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>.
      * @serialData
      * <pre>
-     *  out.writeByte(10);  // identifies a OffsetDateTime
-     *  out.writeObject(dateTime);
-     *  out.writeObject(offset);
+     *  out.writeByte(10);  // identifies an OffsetDateTime
+     *  // the <a href="../../serialized-form.html#java.time.LocalDateTime">datetime</a> excluding the one byte header
+     *  // the <a href="../../serialized-form.html#java.time.ZoneOffset">offset</a> excluding the one byte header
      * </pre>
      *
      * @return the instance of {@code Ser}, not null
@@ -1924,13 +1924,13 @@
     }
 
     void writeExternal(ObjectOutput out) throws IOException {
-        out.writeObject(dateTime);
-        out.writeObject(offset);
+        dateTime.writeExternal(out);
+        offset.writeExternal(out);
     }
 
     static OffsetDateTime readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        LocalDateTime dateTime = (LocalDateTime) in.readObject();
-        ZoneOffset offset = (ZoneOffset) in.readObject();
+        LocalDateTime dateTime = LocalDateTime.readExternal(in);
+        ZoneOffset offset = ZoneOffset.readExternal(in);
         return OffsetDateTime.of(dateTime, offset);
     }
 
--- a/src/share/classes/java/time/OffsetTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/OffsetTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -70,7 +70,6 @@
 import static java.time.temporal.ChronoUnit.NANOS;
 
 import java.io.IOException;
-import java.io.InvalidObjectException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.io.InvalidObjectException;
@@ -84,6 +83,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -1068,13 +1068,13 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.offset() || query == TemporalQuery.zone()) {
+        if (query == TemporalQueries.offset() || query == TemporalQueries.zone()) {
             return (R) offset;
-        } else if (query == TemporalQuery.zoneId() | query == TemporalQuery.chronology() || query == TemporalQuery.localDate()) {
+        } else if (query == TemporalQueries.zoneId() | query == TemporalQueries.chronology() || query == TemporalQueries.localDate()) {
             return null;
-        } else if (query == TemporalQuery.localTime()) {
+        } else if (query == TemporalQueries.localTime()) {
             return (R) time;
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -1351,13 +1351,13 @@
      * Outputs this time as a {@code String}, such as {@code 10:15:30+01:00}.
      * <p>
      * The output will be one of the following ISO-8601 formats:
-     * <p><ul>
+     * <ul>
      * <li>{@code HH:mmXXXXX}</li>
      * <li>{@code HH:mm:ssXXXXX}</li>
      * <li>{@code HH:mm:ss.SSSXXXXX}</li>
      * <li>{@code HH:mm:ss.SSSSSSXXXXX}</li>
      * <li>{@code HH:mm:ss.SSSSSSSSSXXXXX}</li>
-     * </ul><p>
+     * </ul>
      * The format used will be the shortest that outputs the full value of
      * the time where the omitted parts are implied to be zero.
      *
@@ -1374,9 +1374,9 @@
      * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>.
      * @serialData
      * <pre>
-     *  out.writeByte(9);  // identifies a OffsetTime
-     *  out.writeObject(time);
-     *  out.writeObject(offset);
+     *  out.writeByte(9);  // identifies an OffsetTime
+     *  // the <a href="../../serialized-form.html#java.time.LocalTime">time</a> excluding the one byte header
+     *  // the <a href="../../serialized-form.html#java.time.ZoneOffset">offset</a> excluding the one byte header
      * </pre>
      *
      * @return the instance of {@code Ser}, not null
@@ -1395,13 +1395,13 @@
     }
 
     void writeExternal(ObjectOutput out) throws IOException {
-        out.writeObject(time);
-        out.writeObject(offset);
+        time.writeExternal(out);
+        offset.writeExternal(out);
     }
 
     static OffsetTime readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        LocalTime time = (LocalTime) in.readObject();
-        ZoneOffset offset = (ZoneOffset) in.readObject();
+        LocalTime time = LocalTime.readExternal(in);
+        ZoneOffset offset = ZoneOffset.readExternal(in);
         return OffsetTime.of(time, offset);
     }
 
--- a/src/share/classes/java/time/Period.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/Period.java	Wed Oct 30 18:38:20 2013 +0000
@@ -79,7 +79,7 @@
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.Arrays;
@@ -138,13 +138,13 @@
     /**
      * The pattern for parsing.
      */
-    private final static Pattern PATTERN =
+    private static final Pattern PATTERN =
             Pattern.compile("([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?", Pattern.CASE_INSENSITIVE);
 
     /**
      * The set of supported units.
      */
-    private final static List<TemporalUnit> SUPPORTED_UNITS =
+    private static final List<TemporalUnit> SUPPORTED_UNITS =
             Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS));
 
     /**
@@ -958,7 +958,7 @@
      */
     private void validateChrono(TemporalAccessor temporal) {
         Objects.requireNonNull(temporal, "temporal");
-        Chronology temporalChrono = temporal.query(TemporalQuery.chronology());
+        Chronology temporalChrono = temporal.query(TemporalQueries.chronology());
         if (temporalChrono != null && IsoChronology.INSTANCE.equals(temporalChrono) == false) {
             throw new DateTimeException("Chronology mismatch, expected: ISO, actual: " + temporalChrono.getId());
         }
--- a/src/share/classes/java/time/Year.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/Year.java	Wed Oct 30 18:38:20 2013 +0000
@@ -74,7 +74,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
-import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.chrono.Chronology;
 import java.time.chrono.IsoChronology;
@@ -89,6 +88,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -812,9 +812,9 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.chronology()) {
+        if (query == TemporalQueries.chronology()) {
             return (R) IsoChronology.INSTANCE;
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) YEARS;
         }
         return Temporal.super.query(query);
--- a/src/share/classes/java/time/YearMonth.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/YearMonth.java	Wed Oct 30 18:38:20 2013 +0000
@@ -77,7 +77,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
-import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.chrono.Chronology;
 import java.time.chrono.IsoChronology;
@@ -92,6 +91,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -945,9 +945,9 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.chronology()) {
+        if (query == TemporalQueries.chronology()) {
             return (R) IsoChronology.INSTANCE;
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) MONTHS;
         }
         return Temporal.super.query(query);
--- a/src/share/classes/java/time/ZoneId.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/ZoneId.java	Wed Oct 30 18:38:20 2013 +0000
@@ -69,6 +69,7 @@
 import java.time.format.TextStyle;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.zone.ZoneRules;
@@ -88,12 +89,12 @@
  * A {@code ZoneId} is used to identify the rules used to convert between
  * an {@link Instant} and a {@link LocalDateTime}.
  * There are two distinct types of ID:
- * <p><ul>
+ * <ul>
  * <li>Fixed offsets - a fully resolved offset from UTC/Greenwich, that uses
  *  the same offset for all local date-times
  * <li>Geographical regions - an area where a specific set of rules for finding
  *  the offset from UTC/Greenwich apply
- * </ul><p>
+ * </ul>
  * 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}.
@@ -168,63 +169,18 @@
 public abstract class ZoneId implements Serializable {
 
     /**
-     * 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>
-     * <li>EST - America/New_York</li>
-     * <li>MST - America/Denver</li>
-     * <li>HST - Pacific/Honolulu</li>
-     * <li>ACT - Australia/Darwin</li>
-     * <li>AET - Australia/Sydney</li>
-     * <li>AGT - America/Argentina/Buenos_Aires</li>
-     * <li>ART - Africa/Cairo</li>
-     * <li>AST - America/Anchorage</li>
-     * <li>BET - America/Sao_Paulo</li>
-     * <li>BST - Asia/Dhaka</li>
-     * <li>CAT - Africa/Harare</li>
-     * <li>CNT - America/St_Johns</li>
-     * <li>CST - America/Chicago</li>
-     * <li>CTT - Asia/Shanghai</li>
-     * <li>EAT - Africa/Addis_Ababa</li>
-     * <li>ECT - Europe/Paris</li>
-     * <li>IET - America/Indiana/Indianapolis</li>
-     * <li>IST - Asia/Kolkata</li>
-     * <li>JST - Asia/Tokyo</li>
-     * <li>MIT - Pacific/Apia</li>
-     * <li>NET - Asia/Yerevan</li>
-     * <li>NST - Pacific/Auckland</li>
-     * <li>PLT - Asia/Karachi</li>
-     * <li>PNT - America/Phoenix</li>
-     * <li>PRT - America/Puerto_Rico</li>
-     * <li>PST - America/Los_Angeles</li>
-     * <li>SST - Pacific/Guadalcanal</li>
-     * <li>VST - Asia/Ho_Chi_Minh</li>
-     * </ul><p>
-     * The map is unmodifiable.
-     */
-    public static final Map<String, String> OLD_SHORT_IDS;
-    /**
      * 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.
+     * This map contains a mapping of the IDs that is in line with TZDB 2005r and
+     * later, where 'EST', 'MST' and 'HST' map to IDs which do not include daylight
+     * savings.
      * <p>
      * This maps as follows:
-     * <p><ul>
+     * <ul>
      * <li>EST - -05:00</li>
      * <li>HST - -10:00</li>
      * <li>MST - -07:00</li>
@@ -253,47 +209,41 @@
      * <li>PST - America/Los_Angeles</li>
      * <li>SST - Pacific/Guadalcanal</li>
      * <li>VST - Asia/Ho_Chi_Minh</li>
-     * </ul><p>
+     * </ul>
      * The map is unmodifiable.
      */
     public static final Map<String, String> SHORT_IDS;
     static {
-        Map<String, String> base = new HashMap<>();
-        base.put("ACT", "Australia/Darwin");
-        base.put("AET", "Australia/Sydney");
-        base.put("AGT", "America/Argentina/Buenos_Aires");
-        base.put("ART", "Africa/Cairo");
-        base.put("AST", "America/Anchorage");
-        base.put("BET", "America/Sao_Paulo");
-        base.put("BST", "Asia/Dhaka");
-        base.put("CAT", "Africa/Harare");
-        base.put("CNT", "America/St_Johns");
-        base.put("CST", "America/Chicago");
-        base.put("CTT", "Asia/Shanghai");
-        base.put("EAT", "Africa/Addis_Ababa");
-        base.put("ECT", "Europe/Paris");
-        base.put("IET", "America/Indiana/Indianapolis");
-        base.put("IST", "Asia/Kolkata");
-        base.put("JST", "Asia/Tokyo");
-        base.put("MIT", "Pacific/Apia");
-        base.put("NET", "Asia/Yerevan");
-        base.put("NST", "Pacific/Auckland");
-        base.put("PLT", "Asia/Karachi");
-        base.put("PNT", "America/Phoenix");
-        base.put("PRT", "America/Puerto_Rico");
-        base.put("PST", "America/Los_Angeles");
-        base.put("SST", "Pacific/Guadalcanal");
-        base.put("VST", "Asia/Ho_Chi_Minh");
-        Map<String, String> pre = new HashMap<>(base);
-        pre.put("EST", "America/New_York");
-        pre.put("MST", "America/Denver");
-        pre.put("HST", "Pacific/Honolulu");
-        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");
-        SHORT_IDS = Collections.unmodifiableMap(post);
+        Map<String, String> map = new HashMap<>(64);
+        map.put("ACT", "Australia/Darwin");
+        map.put("AET", "Australia/Sydney");
+        map.put("AGT", "America/Argentina/Buenos_Aires");
+        map.put("ART", "Africa/Cairo");
+        map.put("AST", "America/Anchorage");
+        map.put("BET", "America/Sao_Paulo");
+        map.put("BST", "Asia/Dhaka");
+        map.put("CAT", "Africa/Harare");
+        map.put("CNT", "America/St_Johns");
+        map.put("CST", "America/Chicago");
+        map.put("CTT", "Asia/Shanghai");
+        map.put("EAT", "Africa/Addis_Ababa");
+        map.put("ECT", "Europe/Paris");
+        map.put("IET", "America/Indiana/Indianapolis");
+        map.put("IST", "Asia/Kolkata");
+        map.put("JST", "Asia/Tokyo");
+        map.put("MIT", "Pacific/Apia");
+        map.put("NET", "Asia/Yerevan");
+        map.put("NST", "Pacific/Auckland");
+        map.put("PLT", "Asia/Karachi");
+        map.put("PNT", "America/Phoenix");
+        map.put("PRT", "America/Puerto_Rico");
+        map.put("PST", "America/Los_Angeles");
+        map.put("SST", "Pacific/Guadalcanal");
+        map.put("VST", "Asia/Ho_Chi_Minh");
+        map.put("EST", "-05:00");
+        map.put("MST", "-07:00");
+        map.put("HST", "-10:00");
+        SHORT_IDS = Collections.unmodifiableMap(map);
     }
     /**
      * Serialization version.
@@ -313,7 +263,7 @@
      * @throws ZoneRulesException if the converted zone region ID cannot be found
      */
     public static ZoneId systemDefault() {
-        return ZoneId.of(TimeZone.getDefault().getID(), SHORT_IDS);
+        return TimeZone.getDefault().toZoneId();
     }
 
     /**
@@ -492,7 +442,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 TemporalQuery#zone()}.
+     * zones over offset-based zones using {@link TemporalQueries#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}.
@@ -502,7 +452,7 @@
      * @throws DateTimeException if unable to convert to a {@code ZoneId}
      */
     public static ZoneId from(TemporalAccessor temporal) {
-        ZoneId obj = temporal.query(TemporalQuery.zone());
+        ZoneId obj = temporal.query(TemporalQueries.zone());
         if (obj == null) {
             throw new DateTimeException("Unable to obtain ZoneId from TemporalAccessor: " +
                     temporal + " of type " + temporal.getClass().getName());
@@ -558,7 +508,7 @@
      * 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()}.
+     * supporting the return of the zone using {@link TemporalQueries#zoneId()}.
      *
      * @return a temporal equivalent to this zone, not null
      */
@@ -575,7 +525,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.zoneId()) {
+                if (query == TemporalQueries.zoneId()) {
                     return (R) ZoneId.this;
                 }
                 return TemporalAccessor.super.query(query);
--- a/src/share/classes/java/time/ZoneOffset.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/ZoneOffset.java	Wed Oct 30 18:38:20 2013 +0000
@@ -70,13 +70,13 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
-import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.temporal.ChronoField;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
@@ -166,7 +166,7 @@
      * This method parses the string ID of a {@code ZoneOffset} to
      * return an instance. The parsing accepts all the formats generated by
      * {@link #getId()}, plus some additional formats:
-     * <p><ul>
+     * <ul>
      * <li>{@code Z} - for UTC
      * <li>{@code +h}
      * <li>{@code +hh}
@@ -178,7 +178,7 @@
      * <li>{@code -hh:mm:ss}
      * <li>{@code +hhmmss}
      * <li>{@code -hhmmss}
-     * </ul><p>
+     * </ul>
      * Note that &plusmn; means either the plus or minus symbol.
      * <p>
      * The ID of the returned offset will be normalized to one of the formats
@@ -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 TemporalQuery#offset()} query, which relies
+     * The conversion uses the {@link TemporalQueries#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}
@@ -334,7 +334,7 @@
      */
     public static ZoneOffset from(TemporalAccessor temporal) {
         Objects.requireNonNull(temporal, "temporal");
-        ZoneOffset offset = temporal.query(TemporalQuery.offset());
+        ZoneOffset offset = temporal.query(TemporalQueries.offset());
         if (offset == null) {
             throw new DateTimeException("Unable to obtain ZoneOffset from TemporalAccessor: " +
                     temporal + " of type " + temporal.getClass().getName());
@@ -471,11 +471,11 @@
      * <p>
      * The ID is minor variation to the standard ISO-8601 formatted string
      * for the offset. There are three formats:
-     * <p><ul>
+     * <ul>
      * <li>{@code Z} - for UTC (ISO-8601)
      * <li>{@code +hh:mm} or {@code -hh:mm} - if the seconds are zero (ISO-8601)
      * <li>{@code +hh:mm:ss} or {@code -hh:mm:ss} - if the seconds are non-zero (not ISO-8601)
-     * </ul><p>
+     * </ul>
      *
      * @return the zone offset ID, not null
      */
@@ -642,7 +642,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.offset() || query == TemporalQuery.zone()) {
+        if (query == TemporalQueries.offset() || query == TemporalQueries.zone()) {
             return (R) this;
         }
         return TemporalAccessor.super.query(query);
--- a/src/share/classes/java/time/ZonedDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/ZonedDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -111,7 +111,7 @@
  * Obtaining the offset for an instant is simple, as there is exactly one valid
  * offset for each instant. By contrast, obtaining the offset for a local date-time
  * is not straightforward. There are three cases:
- * <p><ul>
+ * <ul>
  * <li>Normal, with one valid offset. For the vast majority of the year, the normal
  *  case applies, where there is a single valid offset for the local date-time.</li>
  * <li>Gap, with zero valid offsets. This is when clocks jump forward typically
@@ -120,7 +120,7 @@
  * <li>Overlap, with two valid offsets. This is when clocks are set back typically
  *  due to the autumn daylight savings change from "summer" to "winter".
  *  In an overlap there are local date-time values with two valid offsets.</li>
- * </ul><p>
+ * </ul>
  * <p>
  * Any method that converts directly or implicitly from a local date-time to an
  * instant by obtaining the offset has the potential to be complicated.
@@ -1699,12 +1699,12 @@
      * <p>
      * For example, consider a time-zone where the spring DST cutover means that the
      * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00.
-     * <p><ul>
+     * <ul>
      * <li>Adding one hour to 00:30+02:00 will result in 01:30+02:00
      * <li>Adding one hour to 01:30+02:00 will result in 01:30+01:00
      * <li>Adding one hour to 01:30+01:00 will result in 02:30+01:00
      * <li>Adding three hours to 00:30+02:00 will result in 02:30+01:00
-     * </ul><p>
+     * </ul>
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1940,12 +1940,12 @@
      * <p>
      * For example, consider a time-zone where the spring DST cutover means that the
      * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00.
-     * <p><ul>
+     * <ul>
      * <li>Subtracting one hour from 02:30+01:00 will result in 01:30+02:00
      * <li>Subtracting one hour from 01:30+01:00 will result in 01:30+02:00
      * <li>Subtracting one hour from 01:30+02:00 will result in 00:30+01:00
      * <li>Subtracting three hours from 02:30+01:00 will result in 00:30+02:00
-     * </ul><p>
+     * </ul>
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/time/chrono/AbstractChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,783 @@
+/*
+ * 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.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.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.MONTHS;
+import static java.time.temporal.ChronoUnit.WEEKS;
+import static java.time.temporal.TemporalAdjusters.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.DateTimeException;
+import java.time.DayOfWeek;
+import java.time.format.ResolverStyle;
+import java.time.temporal.ChronoField;
+import java.time.temporal.TemporalAdjusters;
+import java.time.temporal.TemporalField;
+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;
+
+/**
+ * An abstract implementation of a calendar system, used to organize and identify dates.
+ * <p>
+ * The main date and time API is built on the ISO calendar system.
+ * The chronology operates behind the scenes to represent the general concept of a calendar system.
+ * <p>
+ * See {@link Chronology} for more details.
+ *
+ * @implSpec
+ * This class is separated from the {@code Chronology} interface so that the static methods
+ * are not inherited. While {@code Chronology} can be implemented directly, it is strongly
+ * recommended to extend this abstract class instead.
+ * <p>
+ * This class must be implemented with care to ensure other classes operate correctly.
+ * All implementations that can be instantiated must be final, immutable and thread-safe.
+ * Subclasses should be Serializable wherever possible.
+ *
+ * @since 1.8
+ */
+public abstract class AbstractChronology implements 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<? extends ChronoLocalDate>> DATE_TIME_ORDER =
+        (Comparator<ChronoLocalDateTime<? extends ChronoLocalDate>> & 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<>();
+    /**
+     * Map of available calendars by calendar type.
+     */
+    private static final ConcurrentHashMap<String, Chronology> CHRONOS_BY_TYPE = new ConcurrentHashMap<>();
+
+    /**
+     * Register a Chronology by its ID and type for lookup by {@link #of(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(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
+     */
+    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;
+    }
+
+    /**
+     * Initialization of the maps from id and type to Chronology.
+     * The ServiceLoader is used to find and register any implementations
+     * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader.
+     * The built-in chronologies are registered explicitly.
+     * Calendars configured via the Thread's context classloader are local
+     * to that thread and are ignored.
+     * <p>
+     * The initialization is done only once using the registration
+     * of the IsoChronology as the test and the final step.
+     * Multiple threads may perform the initialization concurrently.
+     * Only the first registration of each Chronology is retained by the
+     * ConcurrentHashMap.
+     * @return true if the cache was initialized
+     */
+    private static boolean initCache() {
+        if (CHRONOS_BY_ID.get("ISO") == null) {
+            // Initialization is incomplete
+
+            // Register built-in Chronologies
+            registerChrono(HijrahChronology.INSTANCE);
+            registerChrono(JapaneseChronology.INSTANCE);
+            registerChrono(MinguoChronology.INSTANCE);
+            registerChrono(ThaiBuddhistChronology.INSTANCE);
+
+            // Register Chronologies from the ServiceLoader
+            @SuppressWarnings("rawtypes")
+            ServiceLoader<AbstractChronology> loader =  ServiceLoader.load(AbstractChronology.class, null);
+            for (AbstractChronology 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;
+        }
+        return false;
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Obtains an instance of {@code Chronology} from a locale.
+     * <p>
+     * See {@link Chronology#ofLocale(Locale)}.
+     *
+     * @param locale  the locale to use to obtain the calendar system, not null
+     * @return the calendar system associated with the locale, not null
+     * @throws java.time.DateTimeException if the locale-specified calendar cannot be found
+     */
+    static Chronology ofLocale(Locale locale) {
+        Objects.requireNonNull(locale, "locale");
+        String type = locale.getUnicodeLocaleType("ca");
+        if (type == null || "iso".equals(type) || "iso8601".equals(type)) {
+            return IsoChronology.INSTANCE;
+        }
+        // Not pre-defined; lookup by the type
+        do {
+            Chronology chrono = CHRONOS_BY_TYPE.get(type);
+            if (chrono != null) {
+                return chrono;
+            }
+            // 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);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Obtains an instance of {@code Chronology} from a chronology ID or
+     * calendar system type.
+     * <p>
+     * See {@link Chronology#of(String)}.
+     *
+     * @param id  the chronology ID or calendar system type, not null
+     * @return the chronology with the identifier requested, not null
+     * @throws java.time.DateTimeException if the chronology cannot be found
+     */
+    static Chronology of(String id) {
+        Objects.requireNonNull(id, "id");
+        do {
+            Chronology chrono = of0(id);
+            if (chrono != null) {
+                return chrono;
+            }
+            // 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 (id.equals(chrono.getId()) || id.equals(chrono.getCalendarType())) {
+                return chrono;
+            }
+        }
+        throw new DateTimeException("Unknown chronology: " + id);
+    }
+
+    /**
+     * Obtains an instance of {@code Chronology} from a chronology ID or
+     * calendar system type.
+     *
+     * @param id  the chronology ID or calendar system type, not null
+     * @return the chronology with the identifier requested, or {@code null} if not found
+     */
+    private static Chronology of0(String id) {
+        Chronology chrono = CHRONOS_BY_ID.get(id);
+        if (chrono == null) {
+            chrono = CHRONOS_BY_TYPE.get(id);
+        }
+        return chrono;
+    }
+
+    /**
+     * Returns the available chronologies.
+     * <p>
+     * Each returned {@code Chronology} is available for use in the system.
+     * The set of chronologies includes the system chronologies and
+     * any chronologies provided by the application via ServiceLoader
+     * configuration.
+     *
+     * @return the independent, modifiable set of the available chronology IDs, not null
+     */
+    static Set<Chronology> getAvailableChronologies() {
+        initCache();       // force initialization
+        HashSet<Chronology> chronos = new HashSet<>(CHRONOS_BY_ID.values());
+
+        /// Add in Chronologies from the ServiceLoader configuration
+        @SuppressWarnings("rawtypes")
+        ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class);
+        for (Chronology chrono : loader) {
+            chronos.add(chrono);
+        }
+        return chronos;
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Creates an instance.
+     */
+    protected AbstractChronology() {
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * 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 are resolved by this method, which may
+     * be overridden in subclasses.
+     * <ul>
+     * <li>{@code EPOCH_DAY} - If present, this is converted to a date and
+     *  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 last available era
+     *  is assumed. In strict mode, no era 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 date.
+     *  In all three modes, the {@code YEAR} is validated.
+     *  If the mode is smart or strict, then the month and day are validated.
+     *  If the mode is lenient, then the date is combined in a manner equivalent to
+     *  creating a date on the first day of the first month 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 date.
+     *  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 day of 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 date.
+     *  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 day of the first month 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 date. 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 date.
+     *  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 day of 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 date.
+     *  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>
+     * <p>
+     * The default implementation is suitable for most calendar systems.
+     * If {@link java.time.temporal.ChronoField#YEAR_OF_ERA} is found without an {@link java.time.temporal.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, that first day-of-year has the value 1, and that the
+     * first of the month and year always exists.
+     *
+     * @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 java.time.DateTimeException if the date cannot be resolved, typically
+     *  because of a conflict in the input data
+     */
+    @Override
+    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
+        resolveProlepticMonth(fieldValues, resolverStyle);
+
+        // invent era if necessary to resolve year-of-era
+        ChronoLocalDate resolved = resolveYearOfEra(fieldValues, resolverStyle);
+        if (resolved != null) {
+            return resolved;
+        }
+
+        // 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;
+    }
+
+    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);
+            }
+            // 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));
+        }
+    }
+
+    ChronoLocalDate resolveYearOfEra(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        Long yoeLong = fieldValues.remove(YEAR_OF_ERA);
+        if (yoeLong != null) {
+            Long eraLong = fieldValues.remove(ERA);
+            int yoe;
+            if (resolverStyle != ResolverStyle.LENIENT) {
+                yoe = range(YEAR_OF_ERA).checkValidIntValue(yoeLong, YEAR_OF_ERA);
+            } else {
+                yoe = Math.toIntExact(yoeLong);
+            }
+            if (eraLong != null) {
+                Era eraObj = eraOf(range(ERA).checkValidIntValue(eraLong, ERA));
+                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 if (resolverStyle == ResolverStyle.STRICT) {
+                    // do not invent era if strict
+                    // reinstate the field removed earlier, no cross-check issues
+                    fieldValues.put(YEAR_OF_ERA, yoeLong);
+                } 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));
+                    }
+                }
+            }
+        } else if (fieldValues.containsKey(ERA)) {
+            range(ERA).checkValidValue(fieldValues.get(ERA), ERA);  // always validated
+        }
+        return null;
+    }
+
+    ChronoLocalDate resolveYMD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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 date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS);
+        }
+        int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), MONTH_OF_YEAR);
+        ValueRange domRange = range(DAY_OF_MONTH);
+        int dom = domRange.checkValidIntValue(fieldValues.remove(DAY_OF_MONTH), DAY_OF_MONTH);
+        if (resolverStyle == ResolverStyle.SMART) {  // previous valid
+            try {
+                return date(y, moy, dom);
+            } catch (DateTimeException ex) {
+                return date(y, moy, 1).with(TemporalAdjusters.lastDayOfMonth());
+            }
+        }
+        return date(y, moy, dom);
+    }
+
+    ChronoLocalDate resolveYD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
+        if (resolverStyle == ResolverStyle.LENIENT) {
+            long days = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1);
+            return dateYearDay(y, 1).plus(days, DAYS);
+        }
+        int doy = range(DAY_OF_YEAR).checkValidIntValue(fieldValues.remove(DAY_OF_YEAR), DAY_OF_YEAR);
+        return dateYearDay(y, doy);  // smart is same as strict
+    }
+
+    ChronoLocalDate resolveYMAA(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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 date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS);
+        }
+        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 date = date(y, moy, 1).plus((aw - 1) * 7 + (ad - 1), DAYS);
+        if (resolverStyle == ResolverStyle.STRICT && date.get(MONTH_OF_YEAR) != moy) {
+            throw new DateTimeException("Strict mode rejected resolved date as it is in a different month");
+        }
+        return date;
+    }
+
+    ChronoLocalDate resolveYMAD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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(date(y, 1, 1), months, weeks, dow);
+        }
+        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 date = date(y, moy, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow)));
+        if (resolverStyle == ResolverStyle.STRICT && date.get(MONTH_OF_YEAR) != moy) {
+            throw new DateTimeException("Strict mode rejected resolved date as it is in a different month");
+        }
+        return date;
+    }
+
+    ChronoLocalDate resolveYAA(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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 dateYearDay(y, 1).plus(weeks, WEEKS).plus(days, DAYS);
+        }
+        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 date = dateYearDay(y, 1).plus((aw - 1) * 7 + (ad - 1), DAYS);
+        if (resolverStyle == ResolverStyle.STRICT && date.get(YEAR) != y) {
+            throw new DateTimeException("Strict mode rejected resolved date as it is in a different year");
+        }
+        return date;
+    }
+
+    ChronoLocalDate resolveYAD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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(dateYearDay(y, 1), 0, weeks, dow);
+        }
+        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 date = dateYearDay(y, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow)));
+        if (resolverStyle == ResolverStyle.STRICT && date.get(YEAR) != y) {
+            throw new DateTimeException("Strict mode rejected resolved date as it is in a different year");
+        }
+        return date;
+    }
+
+    ChronoLocalDate resolveAligned(ChronoLocalDate base, long months, long weeks, long dow) {
+        ChronoLocalDate date = base.plus(months, MONTHS).plus(weeks, WEEKS);
+        if (dow > 7) {
+            date = date.plus((dow - 1) / 7, WEEKS);
+            dow = ((dow - 1) % 7) + 1;
+        } else if (dow < 1) {
+            date = date.plus(Math.subtractExact(dow,  7) / 7, WEEKS);
+            dow = ((dow + 6) % 7) + 1;
+        }
+        return date.with(nextOrSame(DayOfWeek.of((int) dow)));
+    }
+
+    /**
+     * 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 java.time.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);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Compares this chronology to another chronology.
+     * <p>
+     * The comparison order first by the chronology ID string, then by any
+     * additional information specific to the subclass.
+     * It is "consistent with equals", as defined by {@link Comparable}.
+     *
+     * @implSpec
+     * This implementation compares the chronology ID.
+     * Subclasses must compare any additional state that they store.
+     *
+     * @param other  the other chronology to compare to, not null
+     * @return the comparator value, negative if less, positive if greater
+     */
+    @Override
+    public int compareTo(Chronology other) {
+        return getId().compareTo(other.getId());
+    }
+
+    /**
+     * Checks if this chronology is equal to another chronology.
+     * <p>
+     * The comparison is based on the entire state of the object.
+     *
+     * @implSpec
+     * This implementation checks the type and calls
+     * {@link #compareTo(java.time.chrono.Chronology)}.
+     *
+     * @param obj  the object to check, null returns false
+     * @return true if this is equal to the other chronology
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+           return true;
+        }
+        if (obj instanceof AbstractChronology) {
+            return compareTo((AbstractChronology) obj) == 0;
+        }
+        return false;
+    }
+
+    /**
+     * A hash code for this chronology.
+     * <p>
+     * The hash code should be based on the entire state of the object.
+     *
+     * @implSpec
+     * This implementation is based on the chronology ID and class.
+     * Subclasses should add any additional state that they store.
+     *
+     * @return a suitable hash code
+     */
+    @Override
+    public int hashCode() {
+        return getClass().hashCode() ^ getId().hashCode();
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Outputs this chronology as a {@code String}, using the chronology ID.
+     *
+     * @return a string representation of this chronology, not null
+     */
+    @Override
+    public String toString() {
+        return getId();
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Writes the Chronology using a
+     * <a href="../../../serialized-form.html#java.time.chrono.Ser">dedicated serialized form</a>.
+     * <pre>
+     *  out.writeByte(1);  // identifies this as a Chronology
+     *  out.writeUTF(getId());
+     * </pre>
+     *
+     * @return the instance of {@code Ser}, not null
+     */
+    Object writeReplace() {
+        return new Ser(Ser.CHRONO_TYPE, this);
+    }
+
+    /**
+     * Defend against malicious streams.
+     * @return never
+     * @throws java.io.InvalidObjectException always
+     */
+    private Object readResolve() throws ObjectStreamException {
+        throw new InvalidObjectException("Deserialization via serialization delegate");
+    }
+
+    void writeExternal(DataOutput out) throws IOException {
+        out.writeUTF(getId());
+    }
+
+    static Chronology readExternal(DataInput in) throws IOException {
+        String id = in.readUTF();
+        return Chronology.of(id);
+    }
+
+}
--- a/src/share/classes/java/time/chrono/ChronoLocalDate.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/ChronoLocalDate.java	Wed Oct 30 18:38:20 2013 +0000
@@ -77,6 +77,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -194,13 +195,13 @@
  *
  * <h3>Using LocalDate instead</h3>
  * The primary alternative to using this interface throughout your application is as follows.
- * <p><ul>
+ * <ul>
  * <li>Declare all method signatures referring to dates in terms of {@code LocalDate}.
  * <li>Either store the chronology (calendar system) in the user profile or lookup
  *  the chronology from the user locale
  * <li>Convert the ISO {@code LocalDate} to and from the user's preferred calendar system during
  *  printing and parsing
- * </ul><p>
+ * </ul>
  * This approach treats the problem of globalized calendar systems as a localization issue
  * and confines it to the UI layer. This approach is in keeping with other localization
  * issues in the java platform.
@@ -221,13 +222,13 @@
  * For example, an application may need to calculate the next Islamic or Hebrew holiday
  * which may require manipulating the date.
  * This kind of use case can be handled as follows:
- * <p><ul>
+ * <ul>
  * <li>start from the ISO {@code LocalDate} being passed to the method
  * <li>convert the date to the alternate calendar system, which for this use case is known
  *  rather than arbitrary
  * <li>perform the calculation
  * <li>convert back to {@code LocalDate}
- * </ul><p>
+ * </ul>
  * Developers writing low-level frameworks or libraries should also avoid this interface.
  * Instead, one of the two general purpose access interfaces should be used.
  * Use {@link TemporalAccessor} if read-only access is required, or use {@link Temporal}
@@ -262,7 +263,7 @@
      * @see #isEqual
      */
     static Comparator<ChronoLocalDate> timeLineOrder() {
-        return Chronology.DATE_ORDER;
+        return AbstractChronology.DATE_ORDER;
     }
 
     //-----------------------------------------------------------------------
@@ -292,7 +293,7 @@
             return (ChronoLocalDate) temporal;
         }
         Objects.requireNonNull(temporal, "temporal");
-        Chronology chrono = temporal.query(TemporalQuery.chronology());
+        Chronology chrono = temporal.query(TemporalQueries.chronology());
         if (chrono == null) {
             throw new DateTimeException("Unable to obtain ChronoLocalDate from TemporalAccessor: " + temporal.getClass());
         }
@@ -511,13 +512,13 @@
     @SuppressWarnings("unchecked")
     @Override
     default <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.zoneId() || query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
+        if (query == TemporalQueries.zoneId() || query == TemporalQueries.zone() || query == TemporalQueries.offset()) {
             return null;
-        } else if (query == TemporalQuery.localTime()) {
+        } else if (query == TemporalQueries.localTime()) {
             return null;
-        } else if (query == TemporalQuery.chronology()) {
+        } else if (query == TemporalQueries.chronology()) {
             return (R) getChronology();
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) DAYS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
--- a/src/share/classes/java/time/chrono/ChronoLocalDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/ChronoLocalDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -80,6 +80,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.zone.ZoneRules;
@@ -136,7 +137,7 @@
      * @see #isEqual
      */
     static Comparator<ChronoLocalDateTime<?>> timeLineOrder() {
-        return Chronology.DATE_TIME_ORDER;
+        return AbstractChronology.DATE_TIME_ORDER;
     }
 
     //-----------------------------------------------------------------------
@@ -166,7 +167,7 @@
             return (ChronoLocalDateTime<?>) temporal;
         }
         Objects.requireNonNull(temporal, "temporal");
-        Chronology chrono = temporal.query(TemporalQuery.chronology());
+        Chronology chrono = temporal.query(TemporalQueries.chronology());
         if (chrono == null) {
             throw new DateTimeException("Unable to obtain ChronoLocalDateTime from TemporalAccessor: " + temporal.getClass());
         }
@@ -334,13 +335,13 @@
     @SuppressWarnings("unchecked")
     @Override
     default <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.zoneId() || query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
+        if (query == TemporalQueries.zoneId() || query == TemporalQueries.zone() || query == TemporalQueries.offset()) {
             return null;
-        } else if (query == TemporalQuery.localTime()) {
+        } else if (query == TemporalQueries.localTime()) {
             return (R) toLocalTime();
-        } else if (query == TemporalQuery.chronology()) {
+        } else if (query == TemporalQueries.chronology()) {
             return (R) getChronology();
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
--- a/src/share/classes/java/time/chrono/ChronoPeriodImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/ChronoPeriodImpl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -72,7 +72,7 @@
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
@@ -104,7 +104,7 @@
     /**
      * The set of supported units.
      */
-    private final static List<TemporalUnit> SUPPORTED_UNITS =
+    private static final List<TemporalUnit> SUPPORTED_UNITS =
             Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS));
 
     /**
@@ -308,7 +308,7 @@
      */
     private void validateChrono(TemporalAccessor temporal) {
         Objects.requireNonNull(temporal, "temporal");
-        Chronology temporalChrono = temporal.query(TemporalQuery.chronology());
+        Chronology temporalChrono = temporal.query(TemporalQueries.chronology());
         if (temporalChrono != null && chrono.equals(temporalChrono) == false) {
             throw new DateTimeException("Chronology mismatch, expected: " + chrono.getId() + ", actual: " + temporalChrono.getId());
         }
--- a/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -80,6 +80,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -137,7 +138,7 @@
      * @see #isEqual
      */
     static Comparator<ChronoZonedDateTime<?>> timeLineOrder() {
-        return Chronology.INSTANT_ORDER;
+        return AbstractChronology.INSTANT_ORDER;
     }
 
     //-----------------------------------------------------------------------
@@ -167,7 +168,7 @@
             return (ChronoZonedDateTime<?>) temporal;
         }
         Objects.requireNonNull(temporal, "temporal");
-        Chronology chrono = temporal.query(TemporalQuery.chronology());
+        Chronology chrono = temporal.query(TemporalQueries.chronology());
         if (chrono == null) {
             throw new DateTimeException("Unable to obtain ChronoZonedDateTime from TemporalAccessor: " + temporal.getClass());
         }
@@ -481,15 +482,15 @@
     @SuppressWarnings("unchecked")
     @Override
     default <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.zone() || query == TemporalQuery.zoneId()) {
+        if (query == TemporalQueries.zone() || query == TemporalQueries.zoneId()) {
             return (R) getZone();
-        } else if (query == TemporalQuery.offset()) {
+        } else if (query == TemporalQueries.offset()) {
             return (R) getOffset();
-        } else if (query == TemporalQuery.localTime()) {
+        } else if (query == TemporalQueries.localTime()) {
             return (R) toLocalTime();
-        } else if (query == TemporalQuery.chronology()) {
+        } else if (query == TemporalQueries.chronology()) {
             return (R) getChronology();
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
--- a/src/share/classes/java/time/chrono/Chronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/Chronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -61,33 +61,8 @@
  */
 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.ChronoUnit.DAYS;
-import static java.time.temporal.ChronoUnit.MONTHS;
-import static java.time.temporal.ChronoUnit.WEEKS;
-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;
@@ -97,28 +72,22 @@
 import java.time.format.TextStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 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>
  * The main date and time API is built on the ISO calendar system.
- * This class operates behind the scenes to represent the general concept of a calendar system.
+ * The chronology operates behind the scenes to represent the general concept of a calendar system.
  * For example, the Japanese, Minguo, Thai Buddhist and others.
  * <p>
  * Most other calendar systems also operate on the shared concepts of year, month and day,
@@ -148,7 +117,7 @@
  * <p>
  * The {@code Chronology} instance provides a set of methods to create {@code ChronoLocalDate} instances.
  * The date classes are used to manipulate specific dates.
- * <p><ul>
+ * <ul>
  * <li> {@link #dateNow() dateNow()}
  * <li> {@link #dateNow(Clock) dateNow(clock)}
  * <li> {@link #dateNow(ZoneId) dateNow(zone)}
@@ -157,7 +126,7 @@
  * <li> {@link #dateYearDay(int, int) dateYearDay(yearProleptic, dayOfYear)}
  * <li> {@link #dateYearDay(Era, int, int) dateYearDay(era, yearOfEra, dayOfYear)}
  * <li> {@link #date(TemporalAccessor) date(TemporalAccessor)}
- * </ul><p>
+ * </ul>
  *
  * <h3 id="addcalendars">Adding New Calendars</h3>
  * The set of available chronologies can be extended by applications.
@@ -179,138 +148,22 @@
  * CLDR type and, if applicable, the CLDR variant,
  *
  * @implSpec
- * This class must be implemented with care to ensure other classes operate correctly.
+ * This interface must be implemented with care to ensure other classes operate correctly.
  * All implementations that can be instantiated must be final, immutable and thread-safe.
  * Subclasses should be Serializable wherever possible.
  *
  * @since 1.8
  */
-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<>();
-    /**
-     * Map of available calendars by calendar type.
-     */
-    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());
-    }
+public interface Chronology extends Comparable<Chronology> {
 
     /**
-     * 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
-     */
-    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;
-    }
-
-    /**
-     * Initialization of the maps from id and type to Chronology.
-     * The ServiceLoader is used to find and register any implementations
-     * of {@link java.time.chrono.Chronology} found in the bootclass loader.
-     * The built-in chronologies are registered explicitly.
-     * Calendars configured via the Thread's context classloader are local
-     * to that thread and are ignored.
-     * <p>
-     * The initialization is done only once using the registration
-     * of the IsoChronology as the test and the final step.
-     * Multiple threads may perform the initialization concurrently.
-     * Only the first registration of each Chronology is retained by the
-     * ConcurrentHashMap.
-     * @return true if the cache was initialized
-     */
-    private static boolean initCache() {
-        if (CHRONOS_BY_ID.get("ISO") == null) {
-            // Initialization is incomplete
-
-            // 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;
-        }
-        return false;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
      * Obtains an instance of {@code Chronology} from a temporal object.
      * <p>
      * This obtains a 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 Chronology}.
      * <p>
-     * The conversion will obtain the chronology using {@link TemporalQuery#chronology()}.
+     * The conversion will obtain the chronology using {@link TemporalQueries#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}
@@ -320,9 +173,9 @@
      * @return the chronology, not null
      * @throws DateTimeException if unable to convert to an {@code Chronology}
      */
-    public static Chronology from(TemporalAccessor temporal) {
+    static Chronology from(TemporalAccessor temporal) {
         Objects.requireNonNull(temporal, "temporal");
-        Chronology obj = temporal.query(TemporalQuery.chronology());
+        Chronology obj = temporal.query(TemporalQueries.chronology());
         return (obj != null ? obj : IsoChronology.INSTANCE);
     }
 
@@ -367,31 +220,8 @@
      * @return the calendar system associated with the locale, not null
      * @throws DateTimeException if the locale-specified calendar cannot be found
      */
-    public static Chronology ofLocale(Locale locale) {
-        Objects.requireNonNull(locale, "locale");
-        String type = locale.getUnicodeLocaleType("ca");
-        if (type == null || "iso".equals(type) || "iso8601".equals(type)) {
-            return IsoChronology.INSTANCE;
-        }
-        // Not pre-defined; lookup by the type
-        do {
-            Chronology chrono = CHRONOS_BY_TYPE.get(type);
-            if (chrono != null) {
-                return chrono;
-            }
-            // 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);
+    static Chronology ofLocale(Locale locale) {
+        return AbstractChronology.ofLocale(locale);
     }
 
     //-----------------------------------------------------------------------
@@ -415,41 +245,8 @@
      * @return the chronology with the identifier requested, not null
      * @throws DateTimeException if the chronology cannot be found
      */
-    public static Chronology of(String id) {
-        Objects.requireNonNull(id, "id");
-        do {
-            Chronology chrono = of0(id);
-            if (chrono != null) {
-                return chrono;
-            }
-            // 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 (id.equals(chrono.getId()) || id.equals(chrono.getCalendarType())) {
-                return chrono;
-            }
-        }
-        throw new DateTimeException("Unknown chronology: " + id);
-    }
-
-    /**
-     * Obtains an instance of {@code Chronology} from a chronology ID or
-     * calendar system type.
-     *
-     * @param id  the chronology ID or calendar system type, not null
-     * @return the chronology with the identifier requested, or {@code null} if not found
-     */
-    private static Chronology of0(String id) {
-        Chronology chrono = CHRONOS_BY_ID.get(id);
-        if (chrono == null) {
-            chrono = CHRONOS_BY_TYPE.get(id);
-        }
-        return chrono;
+    static Chronology of(String id) {
+        return AbstractChronology.of(id);
     }
 
     /**
@@ -462,24 +259,8 @@
      *
      * @return the independent, modifiable set of the available chronology IDs, not null
      */
-    public static Set<Chronology> getAvailableChronologies() {
-        initCache();       // force initialization
-        HashSet<Chronology> chronos = new HashSet<>(CHRONOS_BY_ID.values());
-
-        /// Add in Chronologies from the ServiceLoader configuration
-        @SuppressWarnings("rawtypes")
-        ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class);
-        for (Chronology chrono : loader) {
-            chronos.add(chrono);
-        }
-        return chronos;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Creates an instance.
-     */
-    protected Chronology() {
+    static Set<Chronology> getAvailableChronologies() {
+        return AbstractChronology.getAvailableChronologies();
     }
 
     //-----------------------------------------------------------------------
@@ -492,7 +273,7 @@
      * @return the chronology ID, not null
      * @see #getCalendarType()
      */
-    public abstract String getId();
+    String getId();
 
     /**
      * Gets the calendar type of the calendar system.
@@ -507,13 +288,17 @@
      * @return the calendar system type, null if the calendar is not defined by CLDR/LDML
      * @see #getId()
      */
-    public abstract String getCalendarType();
+    String getCalendarType();
 
     //-----------------------------------------------------------------------
     /**
      * Obtains a local date in this chronology from the era, year-of-era,
      * month-of-year and day-of-month fields.
      *
+     * @implSpec
+     * The default implementation combines the era and year-of-era into a proleptic
+     * year before calling {@link #date(int, int, int)}.
+     *
      * @param era  the era of the correct type for the chronology, not null
      * @param yearOfEra  the chronology year-of-era
      * @param month  the chronology month-of-year
@@ -522,7 +307,7 @@
      * @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) {
+    default ChronoLocalDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
         return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
     }
 
@@ -536,12 +321,16 @@
      * @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);
+    ChronoLocalDate date(int prolepticYear, int month, int dayOfMonth);
 
     /**
      * Obtains a local date in this chronology from the era, year-of-era and
      * day-of-year fields.
      *
+     * @implSpec
+     * The default implementation combines the era and year-of-era into a proleptic
+     * year before calling {@link #dateYearDay(int, int)}.
+     *
      * @param era  the era of the correct type for the chronology, not null
      * @param yearOfEra  the chronology year-of-era
      * @param dayOfYear  the chronology day-of-year
@@ -549,7 +338,7 @@
      * @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) {
+    default ChronoLocalDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
         return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
     }
 
@@ -562,7 +351,7 @@
      * @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);
+    ChronoLocalDate dateYearDay(int prolepticYear, int dayOfYear);
 
     /**
      * Obtains a local date in this chronology from the epoch-day.
@@ -574,7 +363,7 @@
      * @return the local date in this chronology, not null
      * @throws DateTimeException if unable to create the date
      */
-    public abstract ChronoLocalDate dateEpochDay(long epochDay);
+    ChronoLocalDate dateEpochDay(long epochDay);
 
     //-----------------------------------------------------------------------
     /**
@@ -585,13 +374,14 @@
      * <p>
      * Using this method will prevent the ability to use an alternate clock for testing
      * because the clock is hard-coded.
-     * <p>
-     * This implementation uses {@link #dateNow(Clock)}.
+     *
+     * @implSpec
+     * The default implementation invokes {@link #dateNow(Clock)}.
      *
      * @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() {
+    default ChronoLocalDate dateNow() {
         return dateNow(Clock.systemDefaultZone());
     }
 
@@ -604,11 +394,14 @@
      * Using this method will prevent the ability to use an alternate clock for testing
      * because the clock is hard-coded.
      *
+     * @implSpec
+     * The default implementation invokes {@link #dateNow(Clock)}.
+     *
      * @param zone  the zone ID to use, not null
      * @return the current local date using the system clock, not null
      * @throws DateTimeException if unable to create the date
      */
-    public ChronoLocalDate dateNow(ZoneId zone) {
+    default ChronoLocalDate dateNow(ZoneId zone) {
         return dateNow(Clock.system(zone));
     }
 
@@ -619,11 +412,14 @@
      * Using this method allows the use of an alternate clock for testing.
      * The alternate clock may be introduced using {@link Clock dependency injection}.
      *
+     * @implSpec
+     * The default implementation invokes {@link #date(TemporalAccessor)} )}.
+     *
      * @param clock  the clock to use, not null
      * @return the current local date, not null
      * @throws DateTimeException if unable to create the date
      */
-    public ChronoLocalDate dateNow(Clock clock) {
+    default ChronoLocalDate dateNow(Clock clock) {
         Objects.requireNonNull(clock, "clock");
         return date(LocalDate.now(clock));
     }
@@ -647,7 +443,7 @@
      * @throws DateTimeException if unable to create the date
      * @see ChronoLocalDate#from(TemporalAccessor)
      */
-    public abstract ChronoLocalDate date(TemporalAccessor temporal);
+    ChronoLocalDate date(TemporalAccessor temporal);
 
     /**
      * Obtains a local date-time in this chronology from another temporal object.
@@ -670,7 +466,7 @@
      * @throws DateTimeException if unable to create the date-time
      * @see ChronoLocalDateTime#from(TemporalAccessor)
      */
-    public ChronoLocalDateTime<? extends ChronoLocalDate> localDateTime(TemporalAccessor temporal) {
+    default ChronoLocalDateTime<? extends ChronoLocalDate> localDateTime(TemporalAccessor temporal) {
         try {
             return date(temporal).atTime(LocalTime.from(temporal));
         } catch (DateTimeException ex) {
@@ -702,7 +498,7 @@
      * @throws DateTimeException if unable to create the date-time
      * @see ChronoZonedDateTime#from(TemporalAccessor)
      */
-    public ChronoZonedDateTime<? extends ChronoLocalDate> zonedDateTime(TemporalAccessor temporal) {
+    default ChronoZonedDateTime<? extends ChronoLocalDate> zonedDateTime(TemporalAccessor temporal) {
         try {
             ZoneId zone = ZoneId.from(temporal);
             try {
@@ -728,7 +524,7 @@
      * @return the zoned date-time, not null
      * @throws DateTimeException if the result exceeds the supported range
      */
-    public ChronoZonedDateTime<? extends ChronoLocalDate> zonedDateTime(Instant instant, ZoneId zone) {
+    default ChronoZonedDateTime<? extends ChronoLocalDate> zonedDateTime(Instant instant, ZoneId zone) {
         return ChronoZonedDateTimeImpl.ofInstant(this, instant, zone);
     }
 
@@ -738,15 +534,15 @@
      * <p>
      * A leap-year is a year of a longer length than normal.
      * The exact meaning is determined by the chronology according to the following constraints.
-     * <p><ul>
+     * <ul>
      * <li>a leap-year must imply a year-length longer than a non leap-year.
      * <li>a chronology that does not support the concept of a year must return false.
-     * </ul><p>
+     * </ul>
      *
      * @param prolepticYear  the proleptic-year to check, not validated for range
      * @return true if the year is a leap year
      */
-    public abstract boolean isLeapYear(long prolepticYear);
+    boolean isLeapYear(long prolepticYear);
 
     /**
      * Calculates the proleptic-year given the era and year-of-era.
@@ -764,7 +560,7 @@
      *  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);
+    int prolepticYear(Era era, int yearOfEra);
 
     /**
      * Creates the chronology era object from the numeric value.
@@ -785,7 +581,7 @@
      * @return the calendar system era, not null
      * @throws DateTimeException if unable to create the era
      */
-    public abstract Era eraOf(int eraValue);
+    Era eraOf(int eraValue);
 
     /**
      * Gets the list of eras for the chronology.
@@ -796,7 +592,7 @@
      *
      * @return the list of eras for the chronology, may be immutable, not null
      */
-    public abstract List<Era> eras();
+    List<Era> eras();
 
     //-----------------------------------------------------------------------
     /**
@@ -815,7 +611,7 @@
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
      */
-    public abstract ValueRange range(ChronoField field);
+    ValueRange range(ChronoField field);
 
     //-----------------------------------------------------------------------
     /**
@@ -825,28 +621,16 @@
      * suitable for presentation to the user.
      * The parameters control the style of the returned text and the locale.
      *
+     * @implSpec
+     * The default implementation behaves as the the formatter was used to
+     * format the chronology textual name.
+     *
      * @param style  the style of the text required, not null
      * @param locale  the locale to use, not null
      * @return the text value of the chronology, not null
      */
-    public String getDisplayName(TextStyle style, Locale locale) {
-        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() {
+    default String getDisplayName(TextStyle style, Locale locale) {
+        TemporalAccessor temporal = new TemporalAccessor() {
             @Override
             public boolean isSupported(TemporalField field) {
                 return false;
@@ -858,12 +642,13 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.chronology()) {
+                if (query == TemporalQueries.chronology()) {
                     return (R) Chronology.this;
                 }
                 return TemporalAccessor.super.query(query);
             }
         };
+        return new DateTimeFormatterBuilder().appendChronologyText(style).toFormatter(locale).format(temporal);
     }
 
     //-----------------------------------------------------------------------
@@ -876,82 +661,8 @@
      * As such, {@code ChronoField} date fields are resolved here in the
      * context of a specific chronology.
      * <p>
-     * {@code ChronoField} instances are resolved by this method, which may
-     * be overridden in subclasses.
-     * <ul>
-     * <li>{@code EPOCH_DAY} - If present, this is converted to a date and
-     *  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 last available era
-     *  is assumed. In strict mode, no era 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 date.
-     *  In all three modes, the {@code YEAR} is validated.
-     *  If the mode is smart or strict, then the month and day are validated.
-     *  If the mode is lenient, then the date is combined in a manner equivalent to
-     *  creating a date on the first day of the first month 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 date.
-     *  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 day of 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 date.
-     *  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 day of the first month 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 date. 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 date.
-     *  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 day of 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 date.
-     *  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>
-     * <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, that first day-of-year has the value 1, and that the
-     * first of the month and year always exists.
+     * The default implementation, which explains typical resolve behaviour,
+     * is provided in {@link AbstractChronology}.
      *
      * @param fieldValues  the map of fields to values, which can be updated, not null
      * @param resolverStyle  the requested type of resolve, not null
@@ -959,233 +670,7 @@
      * @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
-        resolveProlepticMonth(fieldValues, resolverStyle);
-
-        // invent era if necessary to resolve year-of-era
-        ChronoLocalDate resolved = resolveYearOfEra(fieldValues, resolverStyle);
-        if (resolved != null) {
-            return resolved;
-        }
-
-        // 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;
-    }
-
-    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);
-            }
-            // 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));
-        }
-    }
-
-    ChronoLocalDate resolveYearOfEra(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
-        Long yoeLong = fieldValues.remove(YEAR_OF_ERA);
-        if (yoeLong != null) {
-            Long eraLong = fieldValues.remove(ERA);
-            int yoe;
-            if (resolverStyle != ResolverStyle.LENIENT) {
-                yoe = range(YEAR_OF_ERA).checkValidIntValue(yoeLong, YEAR_OF_ERA);
-            } else {
-                yoe = Math.toIntExact(yoeLong);
-            }
-            if (eraLong != null) {
-                Era eraObj = eraOf(range(ERA).checkValidIntValue(eraLong, ERA));
-                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 if (resolverStyle == ResolverStyle.STRICT) {
-                    // do not invent era if strict
-                    // reinstate the field removed earlier, no cross-check issues
-                    fieldValues.put(YEAR_OF_ERA, yoeLong);
-                } 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));
-                    }
-                }
-            }
-        } else if (fieldValues.containsKey(ERA)) {
-            range(ERA).checkValidValue(fieldValues.get(ERA), ERA);  // always validated
-        }
-        return null;
-    }
-
-    ChronoLocalDate resolveYMD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
-        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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 date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS);
-        }
-        int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), MONTH_OF_YEAR);
-        ValueRange domRange = range(DAY_OF_MONTH);
-        int dom = domRange.checkValidIntValue(fieldValues.remove(DAY_OF_MONTH), DAY_OF_MONTH);
-        if (resolverStyle == ResolverStyle.SMART) {  // previous valid
-            try {
-                return date(y, moy, dom);
-            } catch (DateTimeException ex) {
-                return date(y, moy, 1).with(TemporalAdjuster.lastDayOfMonth());
-            }
-        }
-        return date(y, moy, dom);
-    }
-
-    ChronoLocalDate resolveYD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
-        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
-        if (resolverStyle == ResolverStyle.LENIENT) {
-            long days = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1);
-            return dateYearDay(y, 1).plus(days, DAYS);
-        }
-        int doy = range(DAY_OF_YEAR).checkValidIntValue(fieldValues.remove(DAY_OF_YEAR), DAY_OF_YEAR);
-        return dateYearDay(y, doy);  // smart is same as strict
-    }
-
-    ChronoLocalDate resolveYMAA(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
-        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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 date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS);
-        }
-        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 date = date(y, moy, 1).plus((aw - 1) * 7 + (ad - 1), DAYS);
-        if (resolverStyle == ResolverStyle.STRICT && date.get(MONTH_OF_YEAR) != moy) {
-            throw new DateTimeException("Strict mode rejected resolved date as it is in a different month");
-        }
-        return date;
-    }
-
-    ChronoLocalDate resolveYMAD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
-        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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(date(y, 1, 1), months, weeks, dow);
-        }
-        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 date = date(y, moy, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow)));
-        if (resolverStyle == ResolverStyle.STRICT && date.get(MONTH_OF_YEAR) != moy) {
-            throw new DateTimeException("Strict mode rejected resolved date as it is in a different month");
-        }
-        return date;
-    }
-
-    ChronoLocalDate resolveYAA(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
-        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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 dateYearDay(y, 1).plus(weeks, WEEKS).plus(days, DAYS);
-        }
-        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 date = dateYearDay(y, 1).plus((aw - 1) * 7 + (ad - 1), DAYS);
-        if (resolverStyle == ResolverStyle.STRICT && date.get(YEAR) != y) {
-            throw new DateTimeException("Strict mode rejected resolved date as it is in a different year");
-        }
-        return date;
-    }
-
-    ChronoLocalDate resolveYAD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
-        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), 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(dateYearDay(y, 1), 0, weeks, dow);
-        }
-        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 date = dateYearDay(y, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow)));
-        if (resolverStyle == ResolverStyle.STRICT && date.get(YEAR) != y) {
-            throw new DateTimeException("Strict mode rejected resolved date as it is in a different year");
-        }
-        return date;
-    }
-
-    ChronoLocalDate resolveAligned(ChronoLocalDate base, long months, long weeks, long dow) {
-        ChronoLocalDate date = base.plus(months, MONTHS).plus(weeks, WEEKS);
-        if (dow > 7) {
-            date = date.plus((dow - 1) / 7, WEEKS);
-            dow = ((dow - 1) % 7) + 1;
-        } else if (dow < 1) {
-            date = date.plus(Math.subtractExact(dow,  7) / 7, WEEKS);
-            dow = ((dow + 6) % 7) + 1;
-        }
-        return date.with(nextOrSame(DayOfWeek.of((int) dow)));
-    }
-
-    /**
-     * 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);
-    }
+    ChronoLocalDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle);
 
     //-----------------------------------------------------------------------
     /**
@@ -1215,7 +700,7 @@
      * @param days  the number of years, may be negative
      * @return the period in terms of this chronology, not null
      */
-    public ChronoPeriod period(int years, int months, int days) {
+    default ChronoPeriod period(int years, int months, int days) {
         return new ChronoPeriodImpl(this, years, months, days);
     }
 
@@ -1226,107 +711,43 @@
      * The comparison order first by the chronology ID string, then by any
      * additional information specific to the subclass.
      * It is "consistent with equals", as defined by {@link Comparable}.
-     * <p>
-     * The default implementation compares the chronology ID.
-     * Subclasses must compare any additional state that they store.
      *
      * @param other  the other chronology to compare to, not null
      * @return the comparator value, negative if less, positive if greater
      */
     @Override
-    public int compareTo(Chronology other) {
-        return getId().compareTo(other.getId());
-    }
+    int compareTo(Chronology other);
 
     /**
      * Checks if this chronology is equal to another chronology.
      * <p>
      * The comparison is based on the entire state of the object.
-     * <p>
-     * The default implementation checks the type and calls {@link #compareTo(Chronology)}.
      *
      * @param obj  the object to check, null returns false
      * @return true if this is equal to the other chronology
      */
     @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-           return true;
-        }
-        if (obj instanceof Chronology) {
-            return compareTo((Chronology) obj) == 0;
-        }
-        return false;
-    }
+    boolean equals(Object obj);
 
     /**
      * A hash code for this chronology.
      * <p>
-     * The default implementation is based on the ID and class.
-     * Subclasses should add any additional state that they store.
+     * The hash code should be based on the entire state of the object.
      *
      * @return a suitable hash code
      */
     @Override
-    public int hashCode() {
-        return getClass().hashCode() ^ getId().hashCode();
-    }
+    int hashCode();
 
     //-----------------------------------------------------------------------
     /**
-     * Outputs this chronology as a {@code String}, using the ID.
+     * Outputs this chronology as a {@code String}.
+     * <p>
+     * The format should include the entire state of the object.
      *
      * @return a string representation of this chronology, not null
      */
     @Override
-    public String toString() {
-        return getId();
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Writes the Chronology using a
-     * <a href="../../../serialized-form.html#java.time.chrono.Ser">dedicated serialized form</a>.
-     * @serialData
-     * <pre>
-     *  out.writeByte(1);  // identifies a Chronology
-     *  out.writeUTF(getId());
-     * </pre>
-     *
-     * @return the instance of {@code Ser}, not null
-     */
-    Object writeReplace() {
-        return new Ser(Ser.CHRONO_TYPE, this);
-    }
-
-    /**
-     * Defend against malicious streams.
-     * @return never
-     * @throws InvalidObjectException always
-     */
-    private Object readResolve() throws InvalidObjectException {
-        throw new InvalidObjectException("Deserialization via serialization delegate");
-    }
-
-    /**
-     * Write the Chronology id to the stream.
-     * @param out the output stream
-     * @throws IOException on any error during the write
-     */
-    void writeExternal(DataOutput out) throws IOException {
-        out.writeUTF(getId());
-    }
-
-    /**
-     * Reads the Chronology id and creates the Chronology.
-     * @param in  the input stream
-     * @return  the Chronology
-     * @throws IOException  on errors during the read
-     * @throws DateTimeException if the Chronology cannot be returned
-     */
-    static Chronology readExternal(DataInput in) throws IOException {
-        String id = in.readUTF();
-        return Chronology.of(id);
-    }
+    String toString();
 
 }
--- a/src/share/classes/java/time/chrono/Era.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/Era.java	Wed Oct 30 18:38:20 2013 +0000
@@ -73,6 +73,7 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.ValueRange;
 import java.util.Locale;
@@ -110,11 +111,11 @@
      * All fields, including eras, have an associated numeric value.
      * The meaning of the numeric value for era is determined by the chronology
      * according to these principles:
-     * <p><ul>
+     * <ul>
      * <li>The era in use at the epoch 1970-01-01 (ISO) has the value 1.
      * <li>Later eras have sequentially higher values.
      * <li>Earlier eras have sequentially lower values, which may be negative.
-     * </ul><p>
+     * </ul>
      *
      * @return the numeric era value
      */
@@ -265,7 +266,7 @@
     @SuppressWarnings("unchecked")
     @Override
     default <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.precision()) {
+        if (query == TemporalQueries.precision()) {
             return (R) ERAS;
         }
         return TemporalAccessor.super.query(query);
--- a/src/share/classes/java/time/chrono/HijrahChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/HijrahChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -214,7 +214,7 @@
  *
  * @since 1.8
  */
-public final class HijrahChronology extends Chronology implements Serializable {
+public final class HijrahChronology extends AbstractChronology implements Serializable {
 
     /**
      * The Hijrah Calendar id.
@@ -308,8 +308,8 @@
         try {
             INSTANCE = new HijrahChronology("Hijrah-umalqura");
             // Register it by its aliases
-            Chronology.registerChrono(INSTANCE, "Hijrah");
-            Chronology.registerChrono(INSTANCE, "islamic");
+            AbstractChronology.registerChrono(INSTANCE, "Hijrah");
+            AbstractChronology.registerChrono(INSTANCE, "islamic");
         } catch (DateTimeException ex) {
             // Absence of Hijrah calendar is fatal to initializing this class.
             PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono");
@@ -336,7 +336,7 @@
                 try {
                     // Create and register the variant
                     HijrahChronology chrono = new HijrahChronology(id);
-                    Chronology.registerChrono(chrono);
+                    AbstractChronology.registerChrono(chrono);
                 } catch (DateTimeException ex) {
                     // Log error and continue
                     PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono");
--- a/src/share/classes/java/time/chrono/IsoChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/IsoChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -100,7 +100,7 @@
  * <i>de facto</i> world calendar.
  * <p>
  * The fields are defined as follows:
- * <p><ul>
+ * <ul>
  * <li>era - There are two eras, 'Current Era' (CE) and 'Before Current Era' (BCE).
  * <li>year-of-era - The year-of-era is the same as the proleptic-year for the current CE era.
  *  For the BCE era before the ISO epoch the year increases from 1 upwards as time goes backwards.
@@ -113,14 +113,14 @@
  * <li>day-of-year - There are 365 days in a standard ISO year and 366 in a leap year.
  *  The days are numbered from 1 to 365 or 1 to 366.
  * <li>leap-year - Leap years occur every 4 years, except where the year is divisble by 100 and not divisble by 400.
- * </ul><p>
+ * </ul>
  *
  * @implSpec
  * This class is immutable and thread-safe.
  *
  * @since 1.8
  */
-public final class IsoChronology extends Chronology implements Serializable {
+public final class IsoChronology extends AbstractChronology implements Serializable {
 
     /**
      * Singleton instance of the ISO chronology.
--- a/src/share/classes/java/time/chrono/IsoEra.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/IsoEra.java	Wed Oct 30 18:38:20 2013 +0000
@@ -69,7 +69,7 @@
  * The ISO-8601 standard does not define eras.
  * A definition has therefore been created with two eras - 'Current era' (CE) for
  * 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">
--- a/src/share/classes/java/time/chrono/JapaneseChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/JapaneseChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -56,8 +56,6 @@
  */
 package java.time.chrono;
 
-import java.io.InvalidObjectException;
-import java.io.ObjectStreamException;
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
 import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.ERA;
@@ -67,6 +65,7 @@
 import static java.time.temporal.ChronoUnit.DAYS;
 import static java.time.temporal.ChronoUnit.MONTHS;
 
+import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.Clock;
 import java.time.DateTimeException;
@@ -77,7 +76,7 @@
 import java.time.format.ResolverStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAdjusters;
 import java.time.temporal.TemporalField;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
@@ -120,7 +119,7 @@
  *
  * @since 1.8
  */
-public final class JapaneseChronology extends Chronology implements Serializable {
+public final class JapaneseChronology extends AbstractChronology implements Serializable {
 
     static final LocalGregorianCalendar JCAL =
         (LocalGregorianCalendar) CalendarSystem.forName("japanese");
@@ -480,7 +479,7 @@
              try {
                  result = date(y, moy, dom);
              } catch (DateTimeException ex) {
-                 result = date(y, moy, 1).with(TemporalAdjuster.lastDayOfMonth());
+                 result = date(y, moy, 1).with(TemporalAdjusters.lastDayOfMonth());
              }
              // handle the era being changed
              // only allow if the new date is in the same Jan-Dec as the era change
--- a/src/share/classes/java/time/chrono/JapaneseDate.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/JapaneseDate.java	Wed Oct 30 18:38:20 2013 +0000
@@ -140,7 +140,7 @@
     /**
      * The first day supported by the JapaneseChronology is Meiji 6, January 1st.
      */
-    final static LocalDate MEIJI_6_ISODATE = LocalDate.of(1873, 1, 1);
+    static final LocalDate MEIJI_6_ISODATE = LocalDate.of(1873, 1, 1);
 
     //-----------------------------------------------------------------------
     /**
--- a/src/share/classes/java/time/chrono/MinguoChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/MinguoChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -85,7 +85,7 @@
  * Dates are aligned such that {@code 0001-01-01 (Minguo)} is {@code 1912-01-01 (ISO)}.
  * <p>
  * The fields are defined as follows:
- * <p><ul>
+ * <ul>
  * <li>era - There are two eras, the current 'Republic' (ERA_ROC) and the previous era (ERA_BEFORE_ROC).
  * <li>year-of-era - The year-of-era for the current era increases uniformly from the epoch at year one.
  *  For the previous era the year increases from one as time goes backwards.
@@ -98,14 +98,14 @@
  * <li>day-of-year - The Minguo day-of-year exactly matches ISO.
  * <li>leap-year - The Minguo leap-year pattern exactly matches ISO, such that the two calendars
  *  are never out of step.
- * </ul><p>
+ * </ul>
  *
  * @implSpec
  * This class is immutable and thread-safe.
  *
  * @since 1.8
  */
-public final class MinguoChronology extends Chronology implements Serializable {
+public final class MinguoChronology extends AbstractChronology implements Serializable {
 
     /**
      * Singleton instance for the Minguo chronology.
--- a/src/share/classes/java/time/chrono/MinguoEra.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/MinguoEra.java	Wed Oct 30 18:38:20 2013 +0000
@@ -70,7 +70,7 @@
  * 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">
--- a/src/share/classes/java/time/chrono/Ser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/Ser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -161,7 +161,7 @@
         out.writeByte(type);
         switch (type) {
             case CHRONO_TYPE:
-                ((Chronology) object).writeExternal(out);
+                ((AbstractChronology) object).writeExternal(out);
                 break;
             case CHRONO_LOCAL_DATE_TIME_TYPE:
                 ((ChronoLocalDateTimeImpl<?>) object).writeExternal(out);
@@ -231,7 +231,7 @@
 
     private static Object readInternal(byte type, ObjectInput in) throws IOException, ClassNotFoundException {
         switch (type) {
-            case CHRONO_TYPE: return Chronology.readExternal(in);
+            case CHRONO_TYPE: return AbstractChronology.readExternal(in);
             case CHRONO_LOCAL_DATE_TIME_TYPE: return ChronoLocalDateTimeImpl.readExternal(in);
             case CHRONO_ZONE_DATE_TIME_TYPE: return ChronoZonedDateTimeImpl.readExternal(in);
             case JAPANESE_DATE_TYPE:  return JapaneseDate.readExternal(in);
--- a/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -86,7 +86,7 @@
  * Dates are aligned such that {@code 2484-01-01 (Buddhist)} is {@code 1941-01-01 (ISO)}.
  * <p>
  * The fields are defined as follows:
- * <p><ul>
+ * <ul>
  * <li>era - There are two eras, the current 'Buddhist' (ERA_BE) and the previous era (ERA_BEFORE_BE).
  * <li>year-of-era - The year-of-era for the current era increases uniformly from the epoch at year one.
  *  For the previous era the year increases from one as time goes backwards.
@@ -99,14 +99,14 @@
  * <li>day-of-year - The ThaiBuddhist day-of-year exactly matches ISO.
  * <li>leap-year - The ThaiBuddhist leap-year pattern exactly matches ISO, such that the two calendars
  *  are never out of step.
- * </ul><p>
+ * </ul>
  *
  * @implSpec
  * This class is immutable and thread-safe.
  *
  * @since 1.8
  */
-public final class ThaiBuddhistChronology extends Chronology implements Serializable {
+public final class ThaiBuddhistChronology extends AbstractChronology implements Serializable {
 
     /**
      * Singleton instance of the Buddhist chronology.
--- a/src/share/classes/java/time/chrono/ThaiBuddhistEra.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/chrono/ThaiBuddhistEra.java	Wed Oct 30 18:38:20 2013 +0000
@@ -70,7 +70,7 @@
  * 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>
+ *
  * <table summary="Buddhist years and eras" cellpadding="2" cellspacing="3" border="0" >
  * <thead>
  * <tr class="tableSubHeadingColor">
--- a/src/share/classes/java/time/format/DateTimeFormatter.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/format/DateTimeFormatter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -146,7 +146,7 @@
  * 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>
@@ -460,7 +460,7 @@
  * <li>The {@code ChronoField} time fields are resolved.
  * This is documented on {@link ChronoField} and is the same for all chronologies.
  * <li>Any fields that are not {@code ChronoField} are processed.
- * This is achieved using {@link TemporalField#resolve(Map, Chronology, ZoneId, ResolverStyle)}.
+ * This is achieved using {@link TemporalField#resolve(Map, TemporalAccessor, ResolverStyle)}.
  * Documentation about field resolution is located in the implementation
  * of {@code TemporalField}.
  * <li>The {@code ChronoField} date and time fields are re-resolved.
@@ -684,7 +684,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended local date format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>Four digits or more for the {@link ChronoField#YEAR year}.
      * Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
      * Years outside that range will have a prefixed positive or negative symbol.
@@ -719,7 +719,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset date format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>The {@link #ISO_LOCAL_DATE}
      * <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.
@@ -747,7 +747,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended date format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>The {@link #ISO_LOCAL_DATE}
      * <li>If the offset is not available then the format is complete.
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
@@ -780,7 +780,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended local time format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>Two digits for the {@link ChronoField#HOUR_OF_DAY hour-of-day}.
      *  This is pre-padded by zero to ensure two digits.
      * <li>A colon
@@ -821,7 +821,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset time format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>The {@link #ISO_LOCAL_TIME}
      * <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.
@@ -848,7 +848,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset time format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>The {@link #ISO_LOCAL_TIME}
      * <li>If the offset is not available then the format is complete.
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
@@ -880,7 +880,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset date-time format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>The {@link #ISO_LOCAL_DATE}
      * <li>The letter 'T'. Parsing is case insensitive.
      * <li>The {@link #ISO_LOCAL_TIME}
@@ -908,7 +908,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset date-time format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>The {@link #ISO_LOCAL_DATE_TIME}
      * <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.
@@ -938,7 +938,7 @@
      * to add the time-zone.
      * The section in square brackets is not part of the ISO-8601 standard.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>The {@link #ISO_OFFSET_DATE_TIME}
      * <li>If the zone ID is not available or is a {@code ZoneOffset} then the format is complete.
      * <li>An open square bracket '['.
@@ -973,7 +973,7 @@
      * 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>
+     * <ul>
      * <li>The {@link #ISO_LOCAL_DATE_TIME}
      * <li>If the offset is not available to format or parse then the format is complete.
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
@@ -1014,7 +1014,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended ordinal date format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>Four digits or more for the {@link ChronoField#YEAR year}.
      * Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
      * Years outside that range will have a prefixed positive or negative symbol.
@@ -1054,7 +1054,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended week-based date format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>Four digits or more for the {@link IsoFields#WEEK_BASED_YEAR week-based-year}.
      * Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
      * Years outside that range will have a prefixed positive or negative symbol.
@@ -1114,7 +1114,7 @@
      * a suitable conversion using {@code ZoneOffset.UTC}.
      * <p>
      * The format consists of:
-     * <p><ul>
+     * <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.
@@ -1139,7 +1139,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 basic local date format.
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>Four digits for the {@link ChronoField#YEAR year}.
      *  Only years in the range 0000 to 9999 are supported.
      * <li>Two digits for the {@link ChronoField#MONTH_OF_YEAR month-of-year}.
@@ -1183,7 +1183,7 @@
      * names, only 'GMT' and offset amounts.
      * <p>
      * The format consists of:
-     * <p><ul>
+     * <ul>
      * <li>If the day-of-week is not available to format or parse then jump to day-of-month.
      * <li>Three letter {@link ChronoField#DAY_OF_WEEK day-of-week} in English.
      * <li>A comma
@@ -1274,11 +1274,11 @@
      * a non-null period, with a zero period returned instead of null.
      * <p>
      * There are two situations where this query may return a non-zero period.
-     * <p><ul>
+     * <ul>
      * <li>If the {@code ResolverStyle} is {@code LENIENT} and a time is parsed
      *  without a date, then the complete result of the parse consists of a
      *  {@code LocalTime} and an excess {@code Period} in days.
-     * <p>
+     *
      * <li>If the {@code ResolverStyle} is {@code SMART} and a time is parsed
      *  without a date where the time is 24:00:00, then the complete result of
      *  the parse consists of a {@code LocalTime} of 00:00:00 and an excess
--- a/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Wed Oct 30 18:38:20 2013 +0000
@@ -90,6 +90,7 @@
 import java.time.temporal.IsoFields;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.ValueRange;
 import java.time.temporal.WeekFields;
@@ -124,7 +125,7 @@
  * All date-time formatters are created ultimately using this builder.
  * <p>
  * The basic elements of date-time can all be added:
- * <p><ul>
+ * <ul>
  * <li>Value - a numeric value</li>
  * <li>Fraction - a fractional value including the decimal place. Always use this when
  * outputting fractions to ensure that the fraction is parsed correctly</li>
@@ -137,7 +138,7 @@
  * <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>
- * </ul><p>
+ * </ul>
  * In addition, any of the elements may be decorated by padding, either with spaces or any other character.
  * <p>
  * Finally, a shorthand pattern, mostly compatible with {@code java.text.SimpleDateFormat SimpleDateFormat}
@@ -155,7 +156,7 @@
      * Query for a time-zone that is region-only.
      */
     private static final TemporalQuery<ZoneId> QUERY_REGION_ONLY = (temporal) -> {
-        ZoneId zone = temporal.query(TemporalQuery.zoneId());
+        ZoneId zone = temporal.query(TemporalQueries.zoneId());
         return (zone != null && zone instanceof ZoneOffset == false ? zone : null);
     };
 
@@ -556,12 +557,13 @@
      * a two digit year parse will be in the range 1950-01-01 to 2049-12-31.
      * Only the year would be extracted from the date, thus a base date of
      * 1950-08-25 would also parse to the range 1950-01-01 to 2049-12-31.
-     * This behaviour is necessary to support fields such as week-based-year
+     * This behavior is necessary to support fields such as week-based-year
      * or other calendar systems where the parsed value does not align with
      * standard ISO years.
      * <p>
      * The exact behavior is as follows. Parse the full set of fields and
-     * determine the effective chronology. Then convert the base date to the
+     * determine the effective chronology using the last chronology if
+     * it appears more than once. Then convert the base date to the
      * effective chronology. Then extract the specified field from the
      * chronology-specific base date and use it to determine the
      * {@code baseValue} used below.
@@ -877,7 +879,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 TemporalQuery#offset()}.
+     * to querying the temporal with {@link TemporalQueries#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.
@@ -888,7 +890,7 @@
      * <p>
      * The format of the offset is controlled by a pattern which must be one
      * of the following:
-     * <p><ul>
+     * <ul>
      * <li>{@code +HH} - hour only, ignoring minute and second
      * <li>{@code +HHmm} - hour, with minute if non-zero, ignoring second, no colon
      * <li>{@code +HH:mm} - hour, with minute if non-zero, ignoring second, with colon
@@ -898,7 +900,7 @@
      * <li>{@code +HH:MM:ss} - hour and minute, with second if non-zero, with colon
      * <li>{@code +HHMMSS} - hour, minute and second, no colon
      * <li>{@code +HH:MM:SS} - hour, minute and second, with colon
-     * </ul><p>
+     * </ul>
      * The "no offset" text controls what text is printed when the total amount of
      * the offset fields to be output is zero.
      * Example values would be 'Z', '+00:00', 'UTC' or 'GMT'.
@@ -920,17 +922,17 @@
      * 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>
+     * <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>
+     * </ul>
      * <p>
      * During formatting, the offset is obtained using a mechanism equivalent
-     * to querying the temporal with {@link TemporalQuery#offset()}.
+     * to querying the temporal with {@link TemporalQueries#offset()}.
      * If the offset cannot be obtained then an exception is thrown unless the
      * section of the formatter is optional.
      * <p>
@@ -962,7 +964,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 TemporalQuery#zoneId()}.
+     * to querying the temporal with {@link TemporalQueries#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.
@@ -1000,7 +1002,7 @@
      * @see #appendZoneRegionId()
      */
     public DateTimeFormatterBuilder appendZoneId() {
-        appendInternal(new ZoneIdPrinterParser(TemporalQuery.zoneId(), "ZoneId()"));
+        appendInternal(new ZoneIdPrinterParser(TemporalQueries.zoneId(), "ZoneId()"));
         return this;
     }
 
@@ -1012,7 +1014,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 TemporalQuery#zoneId()}.
+     * to querying the temporal with {@link TemporalQueries#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
@@ -1071,7 +1073,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 TemporalQuery#zone()}.
+     * to querying the temporal with {@link TemporalQueries#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.
@@ -1112,7 +1114,7 @@
      * @see #appendZoneId()
      */
     public DateTimeFormatterBuilder appendZoneOrOffsetId() {
-        appendInternal(new ZoneIdPrinterParser(TemporalQuery.zone(), "ZoneOrOffsetId()"));
+        appendInternal(new ZoneIdPrinterParser(TemporalQueries.zone(), "ZoneOrOffsetId()"));
         return this;
     }
 
@@ -1123,7 +1125,7 @@
      * the builder.
      * <p>
      * During formatting, the zone is obtained using a mechanism equivalent
-     * to querying the temporal with {@link TemporalQuery#zoneId()}.
+     * to querying the temporal with {@link TemporalQueries#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
@@ -1159,7 +1161,7 @@
      * the builder.
      * <p>
      * During formatting, the zone is obtained using a mechanism equivalent
-     * to querying the temporal with {@link TemporalQuery#zoneId()}.
+     * to querying the temporal with {@link TemporalQueries#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
@@ -1202,7 +1204,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 TemporalQuery#chronology()}.
+     * to querying the temporal with {@link TemporalQueries#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.
@@ -1243,12 +1245,12 @@
      * This appends a localized section to the builder, suitable for outputting
      * a date, time or date-time combination. The format of the localized
      * section is lazily looked up based on four items:
-     * <p><ul>
+     * <ul>
      * <li>the {@code dateStyle} specified to this method
      * <li>the {@code timeStyle} specified to this method
      * <li>the {@code Locale} of the {@code DateTimeFormatter}
      * <li>the {@code Chronology}, selecting the best available
-     * </ul><p>
+     * </ul>
      * During formatting, the chronology is obtained from the temporal object
      * being formatted, which may have been overridden by
      * {@link DateTimeFormatter#withChronology(Chronology)}.
@@ -2808,9 +2810,19 @@
         int setValue(DateTimeParseContext context, long value, int errorPos, int successPos) {
             int baseValue = this.baseValue;
             if (baseDate != null) {
-                // TODO: effective chrono is inaccurate at this point
                 Chronology chrono = context.getEffectiveChronology();
                 baseValue = chrono.date(baseDate).get(field);
+
+                // In case the Chronology is changed later, add a callback when/if it changes
+                final long initialValue = value;
+                context.addChronoChangedListener(
+                        (_unused) ->  {
+                            /* Repeat the set of the field using the current Chronology
+                             * The success/error position is ignored because the value is
+                             * intentionally being overwritten.
+                             */
+                            setValue(context, initialValue, errorPos, successPos);
+                        });
             }
             int parseLen = successPos - errorPos;
             if (parseLen == minWidth && value >= 0) {
@@ -3062,7 +3074,7 @@
                 return false;
             }
             String text;
-            Chronology chrono = context.getTemporal().query(TemporalQuery.chronology());
+            Chronology chrono = context.getTemporal().query(TemporalQueries.chronology());
             if (chrono == null || chrono == IsoChronology.INSTANCE) {
                 text = provider.getText(field, value, textStyle, context.getLocale());
             } else {
@@ -3590,7 +3602,7 @@
         private Set<String> preferredZones;
 
         ZoneTextPrinterParser(TextStyle textStyle, Set<ZoneId> preferredZones) {
-            super(TemporalQuery.zone(), "ZoneText(" + textStyle + ")");
+            super(TemporalQueries.zone(), "ZoneText(" + textStyle + ")");
             this.textStyle = Objects.requireNonNull(textStyle, "textStyle");
             if (preferredZones != null && preferredZones.size() != 0) {
                 this.preferredZones = new HashSet<>();
@@ -3647,7 +3659,7 @@
 
         @Override
         public boolean format(DateTimePrintContext context, StringBuilder buf) {
-            ZoneId zone = context.getValue(TemporalQuery.zoneId());
+            ZoneId zone = context.getValue(TemporalQueries.zoneId());
             if (zone == null) {
                 return false;
             }
@@ -4228,7 +4240,7 @@
 
         @Override
         public boolean format(DateTimePrintContext context, StringBuilder buf) {
-            Chronology chrono = context.getValue(TemporalQuery.chronology());
+            Chronology chrono = context.getValue(TemporalQueries.chronology());
             if (chrono == null) {
                 return false;
             }
--- a/src/share/classes/java/time/format/DateTimeParseContext.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/format/DateTimeParseContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -61,7 +61,6 @@
  */
 package java.time.format;
 
-import java.time.Duration;
 import java.time.ZoneId;
 import java.time.chrono.Chronology;
 import java.time.chrono.IsoChronology;
@@ -69,6 +68,7 @@
 import java.util.ArrayList;
 import java.util.Locale;
 import java.util.Objects;
+import java.util.function.Consumer;
 
 /**
  * Context object used during date and time parsing.
@@ -105,6 +105,10 @@
      * The list of parsed data.
      */
     private final ArrayList<Parsed> parsed = new ArrayList<>();
+    /**
+     * List of Consumers<Chronology> to be notified if the Chronology changes.
+     */
+    private ArrayList<Consumer<Chronology>> chronoListeners = null;
 
     /**
      * Creates a new instance of the context.
@@ -354,12 +358,36 @@
      * <p>
      * This stores the chronology that has been parsed.
      * No validation is performed other than ensuring it is not null.
+     * <p>
+     * The list of listeners is copied and cleared so that each
+     * listener is called only once.  A listener can add itself again
+     * if it needs to be notified of future changes.
      *
      * @param chrono  the parsed chronology, not null
      */
     void setParsed(Chronology chrono) {
         Objects.requireNonNull(chrono, "chrono");
         currentParsed().chrono = chrono;
+        if (chronoListeners != null && !chronoListeners.isEmpty()) {
+            Consumer[] tmp = new Consumer[1];
+            Consumer<Chronology>[] listeners = chronoListeners.toArray(tmp);
+            chronoListeners.clear();
+            for (Consumer<Chronology> l : listeners) {
+                l.accept(chrono);
+            }
+        }
+    }
+
+    /**
+     * Adds a Consumer<Chronology> to the list of listeners to be notified
+     * if the Chronology changes.
+     * @param listener a Consumer<Chronology> to be called when Chronology changes
+     */
+    void addChronoChangedListener(Consumer<Chronology> listener) {
+        if (chronoListeners == null) {
+            chronoListeners = new ArrayList<Consumer<Chronology>>();
+        }
+        chronoListeners.add(listener);
     }
 
     /**
--- a/src/share/classes/java/time/format/DateTimePrintContext.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/format/DateTimePrintContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -75,6 +75,7 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.ValueRange;
 import java.util.Locale;
@@ -128,8 +129,8 @@
         }
 
         // ensure minimal change (early return is an optimization)
-        Chronology temporalChrono = temporal.query(TemporalQuery.chronology());
-        ZoneId temporalZone = temporal.query(TemporalQuery.zoneId());
+        Chronology temporalChrono = temporal.query(TemporalQueries.chronology());
+        ZoneId temporalZone = temporal.query(TemporalQueries.zoneId());
         if (Objects.equals(overrideChrono, temporalChrono)) {
             overrideChrono = null;
         }
@@ -206,13 +207,13 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.chronology()) {
+                if (query == TemporalQueries.chronology()) {
                     return (R) effectiveChrono;
                 }
-                if (query == TemporalQuery.zoneId()) {
+                if (query == TemporalQueries.zoneId()) {
                     return (R) effectiveZone;
                 }
-                if (query == TemporalQuery.precision()) {
+                if (query == TemporalQueries.precision()) {
                     return temporal.query(query);
                 }
                 return query.queryFrom(this);
--- a/src/share/classes/java/time/format/Parsed.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/format/Parsed.java	Wed Oct 30 18:38:20 2013 +0000
@@ -89,6 +89,7 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.HashMap;
@@ -207,17 +208,17 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.zoneId()) {
+        if (query == TemporalQueries.zoneId()) {
             return (R) zone;
-        } else if (query == TemporalQuery.chronology()) {
+        } else if (query == TemporalQueries.chronology()) {
             return (R) chrono;
-        } else if (query == TemporalQuery.localDate()) {
+        } else if (query == TemporalQueries.localDate()) {
             return (R) (date != null ? LocalDate.from(date) : null);
-        } else if (query == TemporalQuery.localTime()) {
+        } else if (query == TemporalQueries.localTime()) {
             return (R) time;
-        } else if (query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
+        } else if (query == TemporalQueries.zone() || query == TemporalQueries.offset()) {
             return query.queryFrom(this);
-        } else if (query == TemporalQuery.precision()) {
+        } else if (query == TemporalQueries.precision()) {
             return null;  // not a complete date/time
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -262,7 +263,7 @@
             while (changedCount < 50) {
                 for (Map.Entry<TemporalField, Long> entry : fieldValues.entrySet()) {
                     TemporalField targetField = entry.getKey();
-                    TemporalAccessor resolvedObject = targetField.resolve(fieldValues, chrono, zone, resolverStyle);
+                    TemporalAccessor resolvedObject = targetField.resolve(fieldValues, this, resolverStyle);
                     if (resolvedObject != null) {
                         if (resolvedObject instanceof ChronoZonedDateTime) {
                             ChronoZonedDateTime czdt = (ChronoZonedDateTime) resolvedObject;
--- a/src/share/classes/java/time/temporal/IsoFields.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/IsoFields.java	Wed Oct 30 18:38:20 2013 +0000
@@ -69,14 +69,13 @@
 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.ZoneId;
 import java.time.chrono.ChronoLocalDate;
 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;
@@ -101,11 +100,11 @@
  * October, November and December are in Q4.
  * <p>
  * The complete date is expressed using three fields:
- * <p><ul>
+ * <ul>
  * <li>{@link #DAY_OF_QUARTER DAY_OF_QUARTER} - the day within the quarter, from 1 to 90, 91 or 92
  * <li>{@link #QUARTER_OF_YEAR QUARTER_OF_YEAR} - the week within the week-based-year
  * <li>{@link ChronoField#YEAR YEAR} - the standard ISO year
- * </ul><p>
+ * </ul>
  *
  * <h3>Week based years</h3>
  * The ISO-8601 standard was originally intended as a data interchange format,
@@ -113,18 +112,18 @@
  * alternate way of expressing the date, based on the concept of week-based-year.
  * <p>
  * The date is expressed using three fields:
- * <p><ul>
+ * <ul>
  * <li>{@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} - the standard field defining the
  *  day-of-week from Monday (1) to Sunday (7)
  * <li>{@link #WEEK_OF_WEEK_BASED_YEAR} - the week within the week-based-year
  * <li>{@link #WEEK_BASED_YEAR WEEK_BASED_YEAR} - the week-based-year
- * </ul><p>
+ * </ul>
  * The week-based-year itself is defined relative to the standard ISO proleptic year.
  * It differs from the standard year in that it always starts on a Monday.
  * <p>
  * The first week of a week-based-year is the first Monday-based week of the standard
  * ISO year that has at least 4 days in the new year.
- * <p><ul>
+ * <ul>
  * <li>If January 1st is Monday then week 1 starts on January 1st
  * <li>If January 1st is Tuesday then week 1 starts on December 31st of the previous standard year
  * <li>If January 1st is Wednesday then week 1 starts on December 30th of the previous standard year
@@ -132,11 +131,11 @@
  * <li>If January 1st is Friday then week 1 starts on January 4th
  * <li>If January 1st is Saturday then week 1 starts on January 3rd
  * <li>If January 1st is Sunday then week 1 starts on January 2nd
- * </ul><p>
+ * </ul>
  * There are 52 weeks in most week-based years, however on occasion there are 53 weeks.
  * <p>
  * For example:
- * <p>
+ *
  * <table cellpadding="0" cellspacing="3" border="0" style="text-align: left; width: 50%;">
  * <caption>Examples of Week based Years</caption>
  * <tr><th>Date</th><th>Day-of-week</th><th>Field values</th></tr>
@@ -343,7 +342,7 @@
             }
             @Override
             public ChronoLocalDate resolve(
-                    Map<TemporalField, Long> fieldValues, Chronology chronology, ZoneId zone, ResolverStyle resolverStyle) {
+                    Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) {
                 Long yearLong = fieldValues.get(YEAR);
                 Long qoyLong = fieldValues.get(QUARTER_OF_YEAR);
                 if (yearLong == null || qoyLong == null) {
@@ -351,6 +350,7 @@
                 }
                 int y = YEAR.checkValidIntValue(yearLong);  // always validate
                 long doq = fieldValues.get(DAY_OF_QUARTER);
+                ensureIso(partialTemporal);
                 LocalDate date;
                 if (resolverStyle == ResolverStyle.LENIENT) {
                     date = LocalDate.of(y, 1, 1).plusMonths(Math.multiplyExact(Math.subtractExact(qoyLong, 1), 3));
@@ -464,7 +464,7 @@
             }
             @Override
             public ChronoLocalDate resolve(
-                    Map<TemporalField, Long> fieldValues, Chronology chronology, ZoneId zone, ResolverStyle resolverStyle) {
+                    Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) {
                 Long wbyLong = fieldValues.get(WEEK_BASED_YEAR);
                 Long dowLong = fieldValues.get(DAY_OF_WEEK);
                 if (wbyLong == null || dowLong == null) {
@@ -472,6 +472,7 @@
                 }
                 int wby = WEEK_BASED_YEAR.range().checkValidIntValue(wbyLong, WEEK_BASED_YEAR);  // always validate
                 long wowby = fieldValues.get(WEEK_OF_WEEK_BASED_YEAR);
+                ensureIso(partialTemporal);
                 LocalDate date = LocalDate.of(wby, 1, 4);
                 if (resolverStyle == ResolverStyle.LENIENT) {
                     long dow = dowLong;  // unvalidated
@@ -568,6 +569,12 @@
             return Chronology.from(temporal).equals(IsoChronology.INSTANCE);
         }
 
+        private static void ensureIso(TemporalAccessor temporal) {
+            if (isIso(temporal) == false) {
+                throw new DateTimeException("Resolve requires IsoChronology");
+            }
+        }
+
         private static ValueRange getWeekRange(LocalDate date) {
             int wby = getWeekBasedYear(date);
             date = date.withDayOfYear(1).withYear(wby);
--- a/src/share/classes/java/time/temporal/JulianFields.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/JulianFields.java	Wed Oct 30 18:38:20 2013 +0000
@@ -66,11 +66,9 @@
 import static java.time.temporal.ChronoUnit.FOREVER;
 
 import java.time.DateTimeException;
-import java.time.ZoneId;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Chronology;
 import java.time.format.ResolverStyle;
-import java.util.Collections;
 import java.util.Map;
 
 /**
@@ -116,7 +114,7 @@
      * 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,
      * thus 3.25 would represent the time 18:00, since days start at midday.
@@ -124,7 +122,7 @@
      * The integer value for the Julian Day Number is the astronomical Julian Day value at midday
      * of the date in question.
      * This amounts to the astronomical Julian Day, rounded to an integer {@code JDN = floor(JD + 0.5)}.
-     * <p>
+     *
      * <pre>
      *  | ISO date          |  Julian Day Number | Astronomical Julian Day |
      *  | 1970-01-01T00:00  |         2,440,588  |         2,440,587.5     |
@@ -164,7 +162,7 @@
      * 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 |
@@ -176,7 +174,7 @@
      *  | 1970-01-02T06:00  |             40,588  |       40,588.25  |
      *  | 1970-01-02T12:00  |             40,588  |       40,588.5   |
      * </pre>
-     * <p>
+     *
      * Modified Julian Days are sometimes taken to imply Universal Time or UTC, but this
      * implementation always uses the Modified Julian Day for the local date,
      * regardless of the offset or time-zone.
@@ -291,13 +289,14 @@
         //-----------------------------------------------------------------------
         @Override
         public ChronoLocalDate resolve(
-                Map<TemporalField, Long> fieldValues, Chronology chronology, ZoneId zone, ResolverStyle resolverStyle) {
+                Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) {
             long value = fieldValues.remove(this);
+            Chronology chrono = Chronology.from(partialTemporal);
             if (resolverStyle == ResolverStyle.LENIENT) {
-                return chronology.dateEpochDay(Math.subtractExact(value, offset));
+                return chrono.dateEpochDay(Math.subtractExact(value, offset));
             }
             range().checkValidValue(value, this);
-            return chronology.dateEpochDay(value - offset);
+            return chrono.dateEpochDay(value - offset);
         }
 
         //-----------------------------------------------------------------------
--- a/src/share/classes/java/time/temporal/Temporal.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/Temporal.java	Wed Oct 30 18:38:20 2013 +0000
@@ -95,15 +95,15 @@
  * <h3>When to implement</h3>
  * <p>
  * A class should implement this interface if it meets three criteria:
- * <p><ul>
+ * <ul>
  * <li>it provides access to date/time/offset information, as per {@code TemporalAccessor}
  * <li>the set of fields are contiguous from the largest to the smallest
  * <li>the set of fields are complete, such that no other field is needed to define the
  *  valid range of values for the fields that are represented
- * </ul><p>
+ * </ul>
  * <p>
  * Four examples make this clear:
- * <p><ul>
+ * <ul>
  * <li>{@code LocalDate} implements this interface as it represents a set of fields
  *  that are contiguous from days to forever and require no external information to determine
  *  the validity of each date. It is therefore able to implement plus/minus correctly.
@@ -117,7 +117,7 @@
  * <li>The combination day-of-week and day-of-month ("Friday the 13th") should not implement
  *  this interface. It does not represent a contiguous set of fields, as days to weeks overlaps
  *  days to months.
- * </ul><p>
+ * </ul>
  *
  * @implSpec
  * This interface places no restrictions on the mutability of implementations,
--- a/src/share/classes/java/time/temporal/TemporalAccessor.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/TemporalAccessor.java	Wed Oct 30 18:38:20 2013 +0000
@@ -272,8 +272,8 @@
      * @implSpec
      * The default implementation must behave equivalent to this code:
      * <pre>
-     *  if (query == TemporalQuery.zoneId() ||
-     *        query == TemporalQuery.chronology() || query == TemporalQuery.precision()) {
+     *  if (query == TemporalQueries.zoneId() ||
+     *        query == TemporalQueries.chronology() || query == TemporalQueries.precision()) {
      *    return null;
      *  }
      *  return query.queryFrom(this);
@@ -290,7 +290,7 @@
      * For example, an application-defined {@code HourMin} class storing the hour
      * and minute must override this method as follows:
      * <pre>
-     *  if (query == TemporalQuery.precision()) {
+     *  if (query == TemporalQueries.precision()) {
      *    return MINUTES;
      *  }
      *  return TemporalAccessor.super.query(query);
@@ -306,7 +306,9 @@
      * @throws ArithmeticException if numeric overflow occurs
      */
     default <R> R query(TemporalQuery<R> query) {
-        if (query == TemporalQuery.zoneId() || query == TemporalQuery.chronology() || query == TemporalQuery.precision()) {
+        if (query == TemporalQueries.zoneId()
+                || query == TemporalQueries.chronology()
+                || query == TemporalQueries.precision()) {
             return null;
         }
         return query.queryFrom(this);
--- a/src/share/classes/java/time/temporal/TemporalAdjuster.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/TemporalAdjuster.java	Wed Oct 30 18:38:20 2013 +0000
@@ -62,9 +62,6 @@
 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.
@@ -86,7 +83,8 @@
  * It is recommended to use the second approach, {@code with(TemporalAdjuster)},
  * as it is a lot clearer to read in code.
  * <p>
- * This class also contains a standard set of adjusters, available as static methods.
+ * The {@link TemporalAdjusters} class contains a standard set of adjusters,
+ * available as static methods.
  * These include:
  * <ul>
  * <li>finding the first or last day of the month
@@ -100,9 +98,8 @@
  * @implSpec
  * 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.
  *
+ * @see TemporalAdjusters
  * @since 1.8
  */
 @FunctionalInterface
@@ -140,7 +137,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 TemporalQuery#chronology() querying the chronology}.
+     * or reject non-ISO temporal objects by {@link TemporalQueries#chronology() querying the chronology}.
      * <p>
      * This method may be called from multiple threads in parallel.
      * It must be thread-safe when invoked.
@@ -152,311 +149,4 @@
      */
     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>{@code
-     *  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);
-    }
-
 }
--- a/src/share/classes/java/time/temporal/TemporalAdjusters.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/TemporalAdjusters.java	Wed Oct 30 18:38:20 2013 +0000
@@ -74,13 +74,47 @@
 import java.util.function.UnaryOperator;
 
 /**
- * Implementations of the static methods in {@code TemporalAdjuster}
+ * Common and useful TemporalAdjusters.
+ * <p>
+ * Adjusters are a key tool for modifying temporal objects.
+ * They exist to externalize the process of adjustment, permitting different
+ * approaches, as per the strategy design pattern.
+ * Examples might be an adjuster that sets the date avoiding weekends, or one that
+ * sets the date to the last day of the month.
+ * <p>
+ * 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
+ *   temporal = thisAdjuster.adjustInto(temporal);
+ *   temporal = temporal.with(thisAdjuster);
+ * </pre>
+ * It is recommended to use the second approach, {@code with(TemporalAdjuster)},
+ * as it is a lot clearer to read in code.
+ * <p>
+ * This class 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>
  *
+ * @implSpec
+ * All the implementations supplied by the static methods are immutable.
+ *
+ * @see TemporalAdjuster
  * @since 1.8
  */
-final class TemporalAdjusters {
-    // work around compiler bug not allowing lambdas in static methods
+public final class TemporalAdjusters {
 
+    /**
+     * Private constructor since this is a utility class.
+     */
     private TemporalAdjusters() {
     }
 
@@ -94,15 +128,15 @@
      * 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>
+     * <pre>{@code
+     *  static TemporalAdjuster TWO_DAYS_LATER =
+     *       TemporalAdjusters.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) {
+    public static TemporalAdjuster ofDateAdjuster(UnaryOperator<LocalDate> dateBasedAdjuster) {
         Objects.requireNonNull(dateBasedAdjuster, "dateBasedAdjuster");
         return (temporal) -> {
             LocalDate input = LocalDate.from(temporal);
@@ -128,7 +162,7 @@
      *
      * @return the first day-of-month adjuster, not null
      */
-    static TemporalAdjuster firstDayOfMonth() {
+    public static TemporalAdjuster firstDayOfMonth() {
         return (temporal) -> temporal.with(DAY_OF_MONTH, 1);
     }
 
@@ -151,7 +185,7 @@
      *
      * @return the last day-of-month adjuster, not null
      */
-    static TemporalAdjuster lastDayOfMonth() {
+    public static TemporalAdjuster lastDayOfMonth() {
         return (temporal) -> temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum());
     }
 
@@ -171,7 +205,7 @@
      *
      * @return the first day of next month adjuster, not null
      */
-    static TemporalAdjuster firstDayOfNextMonth() {
+    public static TemporalAdjuster firstDayOfNextMonth() {
         return (temporal) -> temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
     }
 
@@ -192,7 +226,7 @@
      *
      * @return the first day-of-year adjuster, not null
      */
-    static TemporalAdjuster firstDayOfYear() {
+    public static TemporalAdjuster firstDayOfYear() {
         return (temporal) -> temporal.with(DAY_OF_YEAR, 1);
     }
 
@@ -213,7 +247,7 @@
      *
      * @return the last day-of-year adjuster, not null
      */
-    static TemporalAdjuster lastDayOfYear() {
+    public static TemporalAdjuster lastDayOfYear() {
         return (temporal) -> temporal.with(DAY_OF_YEAR, temporal.range(DAY_OF_YEAR).getMaximum());
     }
 
@@ -232,7 +266,7 @@
      *
      * @return the first day of next month adjuster, not null
      */
-    static TemporalAdjuster firstDayOfNextYear() {
+    public static TemporalAdjuster firstDayOfNextYear() {
         return (temporal) -> temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);
     }
 
@@ -253,7 +287,7 @@
      * @param dayOfWeek  the day-of-week, not null
      * @return the first in month adjuster, not null
      */
-    static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) {
+    public static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) {
         return TemporalAdjusters.dayOfWeekInMonth(1, dayOfWeek);
     }
 
@@ -273,7 +307,7 @@
      * @param dayOfWeek  the day-of-week, not null
      * @return the first in month adjuster, not null
      */
-    static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) {
+    public static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) {
         return TemporalAdjusters.dayOfWeekInMonth(-1, dayOfWeek);
     }
 
@@ -309,7 +343,7 @@
      * @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) {
+    public static TemporalAdjuster dayOfWeekInMonth(int ordinal, DayOfWeek dayOfWeek) {
         Objects.requireNonNull(dayOfWeek, "dayOfWeek");
         int dowValue = dayOfWeek.getValue();
         if (ordinal >= 0) {
@@ -349,7 +383,7 @@
      * @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) {
+    public static TemporalAdjuster next(DayOfWeek dayOfWeek) {
         int dowValue = dayOfWeek.getValue();
         return (temporal) -> {
             int calDow = temporal.get(DAY_OF_WEEK);
@@ -375,7 +409,7 @@
      * @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) {
+    public static TemporalAdjuster nextOrSame(DayOfWeek dayOfWeek) {
         int dowValue = dayOfWeek.getValue();
         return (temporal) -> {
             int calDow = temporal.get(DAY_OF_WEEK);
@@ -403,7 +437,7 @@
      * @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) {
+    public static TemporalAdjuster previous(DayOfWeek dayOfWeek) {
         int dowValue = dayOfWeek.getValue();
         return (temporal) -> {
             int calDow = temporal.get(DAY_OF_WEEK);
@@ -429,7 +463,7 @@
      * @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) {
+    public static TemporalAdjuster previousOrSame(DayOfWeek dayOfWeek) {
         int dowValue = dayOfWeek.getValue();
         return (temporal) -> {
             int calDow = temporal.get(DAY_OF_WEEK);
--- a/src/share/classes/java/time/temporal/TemporalAmount.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/TemporalAmount.java	Wed Oct 30 18:38:20 2013 +0000
@@ -163,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 TemporalQuery#chronology() querying the chronology}.
+     * or reject non-ISO temporal objects by {@link TemporalQueries#chronology() querying the chronology}.
      * <p>
      * This method may be called from multiple threads in parallel.
      * It must be thread-safe when invoked.
@@ -205,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 TemporalQuery#chronology() querying the chronology}.
+     * or reject non-ISO temporal objects by {@link TemporalQueries#chronology() querying the chronology}.
      * <p>
      * This method may be called from multiple threads in parallel.
      * It must be thread-safe when invoked.
--- a/src/share/classes/java/time/temporal/TemporalField.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/TemporalField.java	Wed Oct 30 18:38:20 2013 +0000
@@ -62,7 +62,6 @@
 package java.time.temporal;
 
 import java.time.DateTimeException;
-import java.time.ZoneId;
 import java.time.chrono.Chronology;
 import java.time.format.ResolverStyle;
 import java.util.Locale;
@@ -338,6 +337,13 @@
      * complete {@code LocalDate}. The resolve method will remove all three
      * fields from the map before returning the {@code LocalDate}.
      * <p>
+     * A partially complete temporal is used to allow the chronology and zone
+     * to be queried. In general, only the chronology will be needed.
+     * Querying items other than the zone or chronology is undefined and
+     * must not be relied on.
+     * The behavior of other methods such as {@code get}, {@code getLong},
+     * {@code range} and {@code isSupported} is unpredictable and the results undefined.
+     * <p>
      * If resolution should be possible, but the data is invalid, the resolver
      * style should be used to determine an appropriate level of leniency, which
      * may require throwing a {@code DateTimeException} or {@code ArithmeticException}.
@@ -350,16 +356,14 @@
      * instances that can produce a date, such as {@code EPOCH_DAY}.
      * <p>
      * Not all {@code TemporalAccessor} implementations are accepted as return values.
-     * Implementations must accept {@code ChronoLocalDate}, {@code ChronoLocalDateTime},
-     * {@code ChronoZonedDateTime} and {@code LocalTime}.
-     * <p>
-     * The zone is not normally required for resolution, but is provided for completeness.
+     * Implementations that call this method must accept {@code ChronoLocalDate},
+     * {@code ChronoLocalDateTime}, {@code ChronoZonedDateTime} and {@code LocalTime}.
      * <p>
      * The default implementation must return null.
      *
      * @param fieldValues  the map of fields to values, which can be updated, not null
-     * @param chronology  the effective chronology, not null
-     * @param zone  the effective zone, not null
+     * @param partialTemporal  the partially complete temporal to query for zone and
+     *  chronology; querying for other things is undefined and not recommended, not null
      * @param resolverStyle  the requested type of resolve, not null
      * @return the resolved temporal object; null if resolving only
      *  changed the map, or no resolve occurred
@@ -368,8 +372,9 @@
      *  by querying a field on the temporal without first checking if it is supported
      */
     default TemporalAccessor resolve(
-            Map<TemporalField, Long> fieldValues, Chronology chronology,
-            ZoneId zone, ResolverStyle resolverStyle) {
+            Map<TemporalField, Long> fieldValues,
+            TemporalAccessor partialTemporal,
+            ResolverStyle resolverStyle) {
         return null;
     }
 
--- a/src/share/classes/java/time/temporal/TemporalQueries.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/TemporalQueries.java	Wed Oct 30 18:38:20 2013 +0000
@@ -78,10 +78,44 @@
  * 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.
+ * <p>
+ * Queries are a key tool for extracting information from temporal objects.
+ * They exist to externalize the process of querying, permitting different
+ * approaches, as per the strategy design pattern.
+ * Examples might be a query that checks if the date is the day before February 29th
+ * in a leap year, or calculates the number of days to your next birthday.
+ * <p>
+ * The {@link TemporalField} interface provides another mechanism for querying
+ * temporal objects. That interface is limited to returning a {@code long}.
+ * By contrast, queries can return any type.
+ * <p>
+ * There are two equivalent ways of using a {@code TemporalQuery}.
+ * The first is to invoke the method on this interface directly.
+ * The second is to use {@link TemporalAccessor#query(TemporalQuery)}:
+ * <pre>
+ *   // these two lines are equivalent, but the second approach is recommended
+ *   temporal = thisQuery.queryFrom(temporal);
+ *   temporal = temporal.query(thisQuery);
+ * </pre>
+ * It is recommended to use the second approach, {@code query(TemporalQuery)},
+ * as it is a lot clearer to read in code.
+ * <p>
+ * The most common implementations are method references, such as
+ * {@code LocalDate::from} and {@code ZoneId::from}.
+ * Additional common queries are provided to return:
+ * <ul>
+ * <li> a Chronology,
+ * <li> a LocalDate,
+ * <li> a LocalTime,
+ * <li> a ZoneOffset,
+ * <li> a precision,
+ * <li> a zone, or
+ * <li> a zoneId.
+ * </ul>
  *
  * @since 1.8
  */
-final class TemporalQueries {
+public 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)
@@ -94,37 +128,236 @@
     }
 
     //-----------------------------------------------------------------------
+    // 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
+     */
+    public 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
+     */
+    public 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
+     */
+    public 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
+     */
+    public 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
+     */
+    public 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
+     */
+    public 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
+     */
+    public static TemporalQuery<LocalTime> localTime() {
+        return TemporalQueries.LOCAL_TIME;
+    }
+
+    //-----------------------------------------------------------------------
     /**
      * A strict query for the {@code ZoneId}.
      */
-    static final TemporalQuery<ZoneId> ZONE_ID = (temporal) -> {
-        return temporal.query(ZONE_ID);
-    };
+    static final TemporalQuery<ZoneId> ZONE_ID = (temporal) ->
+        temporal.query(TemporalQueries.ZONE_ID);
 
     /**
      * A query for the {@code Chronology}.
      */
-    static final TemporalQuery<Chronology> CHRONO = (temporal) -> {
-        return temporal.query(CHRONO);
-    };
+    static final TemporalQuery<Chronology> CHRONO = (temporal) ->
+        temporal.query(TemporalQueries.CHRONO);
 
     /**
      * A query for the smallest supported unit.
      */
-    static final TemporalQuery<TemporalUnit> PRECISION = (temporal) -> {
-        return temporal.query(PRECISION);
-    };
+    static final TemporalQuery<TemporalUnit> PRECISION = (temporal) ->
+        temporal.query(TemporalQueries.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) -> {
@@ -135,6 +368,14 @@
     };
 
     /**
+     * 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 LocalDate} returning null if not found.
      */
     static final TemporalQuery<LocalDate> LOCAL_DATE = (temporal) -> {
--- a/src/share/classes/java/time/temporal/TemporalQuery.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/TemporalQuery.java	Wed Oct 30 18:38:20 2013 +0000
@@ -62,11 +62,6 @@
 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.
@@ -94,12 +89,14 @@
  * <p>
  * The most common implementations are method references, such as
  * {@code LocalDate::from} and {@code ZoneId::from}.
- * Additional common implementations are provided on this interface as static methods.
+ * Additional common queries are provided as static methods in {@link TemporalQueries}.
  *
  * @implSpec
  * This interface places no restrictions on the mutability of implementations,
  * however immutability is strongly recommended.
  *
+ * @param <R> the type returned from the query
+ *
  * @since 1.8
  */
 @FunctionalInterface
@@ -133,7 +130,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 TemporalQuery#chronology() querying the chronology}.
+     * or reject non-ISO temporal objects by {@link TemporalQueries#chronology() querying the chronology}.
      * <p>
      * This method may be called from multiple threads in parallel.
      * It must be thread-safe when invoked.
@@ -145,214 +142,4 @@
      */
     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/WeekFields.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/WeekFields.java	Wed Oct 30 18:38:20 2013 +0000
@@ -64,7 +64,6 @@
 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.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoUnit.DAYS;
@@ -77,12 +76,9 @@
 import java.io.Serializable;
 import java.time.DateTimeException;
 import java.time.DayOfWeek;
-import java.time.ZoneId;
 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;
@@ -119,16 +115,16 @@
  * 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-8601 standard counts the first week as needing at least 4 days.
- * </ul><p>
+ * </ul>
  * Together these two values allow a year or month to be divided into weeks.
- * <p>
+ *
  * <h3>Week of Month</h3>
  * One field is used: week-of-month.
  * The calculation ensures that weeks never overlap a month boundary.
  * The month 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>
+ *
  * <table cellpadding="0" cellspacing="3" border="0" style="text-align: left; width: 50%;">
  * <caption>Examples of WeekFields</caption>
  * <tr><th>Date</th><td>Day-of-week</td>
@@ -249,15 +245,15 @@
     /**
      * The field used to access the computed DayOfWeek.
      */
-    private transient final TemporalField dayOfWeek = ComputedDayOfField.ofDayOfWeekField(this);
+    private final transient TemporalField dayOfWeek = ComputedDayOfField.ofDayOfWeekField(this);
     /**
      * The field used to access the computed WeekOfMonth.
      */
-    private transient final TemporalField weekOfMonth = ComputedDayOfField.ofWeekOfMonthField(this);
+    private final transient TemporalField weekOfMonth = ComputedDayOfField.ofWeekOfMonthField(this);
     /**
      * The field used to access the computed WeekOfYear.
      */
-    private transient final TemporalField weekOfYear = ComputedDayOfField.ofWeekOfYearField(this);
+    private final transient TemporalField weekOfYear = ComputedDayOfField.ofWeekOfYearField(this);
     /**
      * The field that represents the week-of-week-based-year.
      * <p>
@@ -265,7 +261,7 @@
      * <p>
      * This unit is an immutable and thread-safe singleton.
      */
-    private transient final TemporalField weekOfWeekBasedYear = ComputedDayOfField.ofWeekOfWeekBasedYearField(this);
+    private final transient TemporalField weekOfWeekBasedYear = ComputedDayOfField.ofWeekOfWeekBasedYearField(this);
     /**
      * The field that represents the week-based-year.
      * <p>
@@ -273,7 +269,7 @@
      * <p>
      * This unit is an immutable and thread-safe singleton.
      */
-    private transient final TemporalField weekBasedYear = ComputedDayOfField.ofWeekBasedYearField(this);
+    private final transient TemporalField weekBasedYear = ComputedDayOfField.ofWeekBasedYearField(this);
 
     //-----------------------------------------------------------------------
     /**
@@ -892,7 +888,7 @@
 
         @Override
         public ChronoLocalDate resolve(
-                Map<TemporalField, Long> fieldValues, Chronology chronology, ZoneId zone, ResolverStyle resolverStyle) {
+                Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) {
             final long value = fieldValues.get(this);
             final int newValue = Math.toIntExact(value);  // broad limit makes overflow checking lighter
             // first convert localized day-of-week to ISO day-of-week
@@ -915,19 +911,20 @@
             int dow = localizedDayOfWeek(isoDow);
 
             // build date
+            Chronology chrono = Chronology.from(partialTemporal);
             if (fieldValues.containsKey(YEAR)) {
                 int year = YEAR.checkValidIntValue(fieldValues.get(YEAR));  // validate
                 if (rangeUnit == MONTHS && fieldValues.containsKey(MONTH_OF_YEAR)) {  // week-of-month
                     long month = fieldValues.get(MONTH_OF_YEAR);  // not validated yet
-                    return resolveWoM(fieldValues, chronology, year, month, newValue, dow, resolverStyle);
+                    return resolveWoM(fieldValues, chrono, year, month, newValue, dow, resolverStyle);
                 }
                 if (rangeUnit == YEARS) {  // week-of-year
-                    return resolveWoY(fieldValues, chronology, year, newValue, dow, resolverStyle);
+                    return resolveWoY(fieldValues, chrono, year, newValue, dow, resolverStyle);
                 }
             } else if ((rangeUnit == WEEK_BASED_YEARS || rangeUnit == FOREVER) &&
                     fieldValues.containsKey(weekDef.weekBasedYear) &&
                     fieldValues.containsKey(weekDef.weekOfWeekBasedYear)) { // week-of-week-based-year and year-of-week-based-year
-                return resolveWBY(fieldValues, chronology, dow, resolverStyle);
+                return resolveWBY(fieldValues, chrono, dow, resolverStyle);
             }
             return null;
         }
--- a/src/share/classes/java/time/temporal/package-info.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/temporal/package-info.java	Wed Oct 30 18:38:20 2013 +0000
@@ -81,7 +81,7 @@
  * A unit is used to measure an amount of time, such as years, days or minutes.
  * All units implement {@link java.time.temporal.TemporalUnit}.
  * The set of well known units is defined in {@link java.time.temporal.ChronoUnit}, such as {@code DAYS}.
- * The unit interface is designed to allow applications defined units.
+ * The unit interface is designed to allow application defined units.
  * </p>
  * <p>
  * A field is used to express part of a larger date-time, such as year, month-of-year or second-of-minute.
@@ -89,7 +89,7 @@
  * The set of well known fields are defined in {@link java.time.temporal.ChronoField}, such as {@code HOUR_OF_DAY}.
  * Additional fields are defined by {@link java.time.temporal.JulianFields}, {@link java.time.temporal.WeekFields}
  * and {@link java.time.temporal.IsoFields}.
- * The field interface is designed to allow applications defined fields.
+ * The field interface is designed to allow application defined fields.
  * </p>
  * <p>
  * This package provides tools that allow the units and fields of date and time to be accessed
@@ -112,23 +112,23 @@
  * 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 {@code TemporalAdjuster}.
+ * A set of common functions are provided in {@link java.time.temporal.TemporalAdjusters}.
  * For example, to find the first occurrence of a day-of-week after a given date, use
- * {@link java.time.temporal.TemporalAdjuster#next(DayOfWeek)}, such as
+ * {@link java.time.temporal.TemporalAdjusters#next(DayOfWeek)}, such as
  * {@code date.with(next(MONDAY))}.
- * Applications can also define adjusters by implementing {@code TemporalAdjuster}.
+ * Applications can also define adjusters by implementing {@link java.time.temporal.TemporalAdjuster}.
  * </p>
  * <p>
  * The {@link java.time.temporal.TemporalAmount} interface models amounts of relative time.
  * </p>
  * <p>
- * In addition to adjusting a date-time, an interface is provided to enable querying -
+ * In addition to adjusting a date-time, an interface is provided to enable querying via
  * {@link java.time.temporal.TemporalQuery}.
  * 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 {@code TemporalQuery} as static methods.
- * Applications can also define queries by implementing {@code TemporalQuery}.
+ * Further implementations are provided in {@link java.time.temporal.TemporalQueries} as static methods.
+ * Applications can also define queries by implementing {@link java.time.temporal.TemporalQuery}.
  * </p>
  *
  * <h3>Weeks</h3>
--- a/src/share/classes/java/time/zone/Ser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/zone/Ser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -171,9 +171,9 @@
      * <li><a href="../../../serialized-form.html#java.time.zone.ZoneRules">ZoneRules</a>
      * - {@code ZoneRules.of(standardTransitions, standardOffsets, savingsInstantTransitions, wallOffsets, lastRules);}
      * <li><a href="../../../serialized-form.html#java.time.zone.ZoneOffsetTransition">ZoneOffsetTransition</a>
-     * - {@code ;}
+     * - {@code ZoneOffsetTransition of(LocalDateTime.ofEpochSecond(epochSecond), offsetBefore, offsetAfter);}
      * <li><a href="../../../serialized-form.html#java.time.zone.ZoneOffsetTransitionRule">ZoneOffsetTransitionRule</a>
-     * - {@code ;}
+     * - {@code ZoneOffsetTransitionRule.of(month, dom, dow, time, timeEndOfDay, timeDefinition, standardOffset, offsetBefore, offsetAfter);}
      * </ul>
      * @param in  the data to read, not null
      */
--- a/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java	Wed Oct 30 18:38:20 2013 +0000
@@ -62,6 +62,7 @@
 package java.time.zone;
 
 import java.io.ByteArrayInputStream;
+import java.io.BufferedInputStream;
 import java.io.DataInputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -107,7 +108,8 @@
         try {
             String libDir = System.getProperty("java.home") + File.separator + "lib";
             try (DataInputStream dis = new DataInputStream(
-                     new FileInputStream(new File(libDir, "tzdb.dat")))) {
+                     new BufferedInputStream(new FileInputStream(
+                         new File(libDir, "tzdb.dat"))))) {
                 load(dis);
             }
         } catch (Exception ex) {
--- a/src/share/classes/java/time/zone/ZoneOffsetTransition.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/zone/ZoneOffsetTransition.java	Wed Oct 30 18:38:20 2013 +0000
@@ -191,7 +191,7 @@
      *   out.writeByte(2);                // identifies a ZoneOffsetTransition
      *   out.writeEpochSec(toEpochSecond);
      *   out.writeOffset(offsetBefore);
-     *   out.writeOfset(offsetAfter);
+     *   out.writeOffset(offsetAfter);
      * }
      * </pre>
      * @return the replacing object, not null
--- a/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java	Wed Oct 30 18:38:20 2013 +0000
@@ -61,8 +61,8 @@
  */
 package java.time.zone;
 
-import static java.time.temporal.TemporalAdjuster.nextOrSame;
-import static java.time.temporal.TemporalAdjuster.previousOrSame;
+import static java.time.temporal.TemporalAdjusters.nextOrSame;
+import static java.time.temporal.TemporalAdjusters.previousOrSame;
 
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -83,12 +83,12 @@
  * <p>
  * This class allows rules for identifying future transitions to be expressed.
  * A rule might be written in many forms:
- * <p><ul>
+ * <ul>
  * <li>the 16th March
  * <li>the Sunday on or after the 16th March
  * <li>the Sunday on or before the 16th March
  * <li>the last Sunday in February
- * </ul><p>
+ * </ul>
  * These different rule types can be expressed and queried.
  *
  * @implSpec
@@ -575,11 +575,11 @@
      * transition date-time.
      * <p>
      * Time zone rules are expressed in one of three ways:
-     * <p><ul>
+     * <ul>
      * <li>Relative to UTC</li>
      * <li>Relative to the standard offset in force</li>
      * <li>Relative to the wall offset (what you would see on a clock on the wall)</li>
-     * </ul><p>
+     * </ul>
      */
     public static enum TimeDefinition {
         /** The local date-time is expressed in terms of the UTC offset. */
--- a/src/share/classes/java/time/zone/ZoneRules.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/time/zone/ZoneRules.java	Wed Oct 30 18:38:20 2013 +0000
@@ -508,7 +508,7 @@
      * <p>
      * The mapping from a local date-time to an offset is not straightforward.
      * There are three cases:
-     * <p><ul>
+     * <ul>
      * <li>Normal, with one valid offset. For the vast majority of the year, the normal
      *  case applies, where there is a single valid offset for the local date-time.</li>
      * <li>Gap, with zero valid offsets. This is when clocks jump forward typically
@@ -517,7 +517,7 @@
      * <li>Overlap, with two valid offsets. This is when clocks are set back typically
      *  due to the autumn daylight savings change from "summer" to "winter".
      *  In an overlap there are local date-time values with two valid offsets.</li>
-     * </ul><p>
+     * </ul>
      * Thus, for any given local date-time there can be zero, one or two valid offsets.
      * This method returns the single offset in the Normal case, and in the Gap or Overlap
      * case it returns the offset before the transition.
@@ -544,7 +544,7 @@
      * <p>
      * The mapping from a local date-time to an offset is not straightforward.
      * There are three cases:
-     * <p><ul>
+     * <ul>
      * <li>Normal, with one valid offset. For the vast majority of the year, the normal
      *  case applies, where there is a single valid offset for the local date-time.</li>
      * <li>Gap, with zero valid offsets. This is when clocks jump forward typically
@@ -553,7 +553,7 @@
      * <li>Overlap, with two valid offsets. This is when clocks are set back typically
      *  due to the autumn daylight savings change from "summer" to "winter".
      *  In an overlap there are local date-time values with two valid offsets.</li>
-     * </ul><p>
+     * </ul>
      * Thus, for any given local date-time there can be zero, one or two valid offsets.
      * This method returns that list of valid offsets, which is a list of size 0, 1 or 2.
      * In the case where there are two offsets, the earlier offset is returned at index 0
@@ -595,7 +595,7 @@
      * <p>
      * The mapping from a local date-time to an offset is not straightforward.
      * There are three cases:
-     * <p><ul>
+     * <ul>
      * <li>Normal, with one valid offset. For the vast majority of the year, the normal
      *  case applies, where there is a single valid offset for the local date-time.</li>
      * <li>Gap, with zero valid offsets. This is when clocks jump forward typically
@@ -604,7 +604,7 @@
      * <li>Overlap, with two valid offsets. This is when clocks are set back typically
      *  due to the autumn daylight savings change from "summer" to "winter".
      *  In an overlap there are local date-time values with two valid offsets.</li>
-     * </ul><p>
+     * </ul>
      * A transition is used to model the cases of a Gap or Overlap.
      * The Normal case will return null.
      * <p>
--- a/src/share/classes/java/util/Base64.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Base64.java	Wed Oct 30 18:38:20 2013 +0000
@@ -40,7 +40,6 @@
  * <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a> and
  * <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.
  *
- * <p>
  * <ul>
  * <li><a name="basic"><b>Basic</b></a>
  * <p> Uses "The Base64 Alphabet" as specified in Table 1 of
@@ -128,7 +127,7 @@
      *          character of "The Base64 Alphabet" as specified in Table 1 of
      *          RFC 2045.
      */
-    public static Encoder getEncoder(int lineLength, byte[] lineSeparator) {
+    public static Encoder getMimeEncoder(int lineLength, byte[] lineSeparator) {
          Objects.requireNonNull(lineSeparator);
          int[] base64 = Decoder.fromBase64;
          for (byte b : lineSeparator) {
@@ -620,11 +619,20 @@
      * required. So if the final unit of the encoded byte data only has
      * two or three Base64 characters (without the corresponding padding
      * character(s) padded), they are decoded as if followed by padding
-     * character(s). If there is padding character present in the
-     * final unit, the correct number of padding character(s) must be
-     * present, otherwise {@code IllegalArgumentException} (
-     * {@code IOException} when reading from a Base64 stream) is thrown
-     * during decoding.
+     * character(s).
+     * <p>
+     * For decoders that use the <a href="#basic">Basic</a> and
+     * <a href="#url">URL and Filename safe</a> type base64 scheme, and
+     * if there is padding character present in the final unit, the
+     * correct number of padding character(s) must be present, otherwise
+     * {@code IllegalArgumentException} ({@code IOException} when reading
+     * from a Base64 stream) is thrown during decoding.
+     * <p>
+     * Decoders that use the <a href="#mime">MIME</a> type base64 scheme
+     * are more lenient when decoding the padding character(s). If the
+     * padding character(s) is incorrectly encoded, the first padding
+     * character encountered is interpreted as the end of the encoded byte
+     * data, the decoding operation will then end and return normally.
      *
      * <p> Instances of {@link Decoder} class are safe for use by
      * multiple concurrent threads.
@@ -903,8 +911,9 @@
                     int b = sa[sp++] & 0xff;
                     if ((b = base64[b]) < 0) {
                         if (b == -2) {   // padding byte
-                            if (shiftto == 6 && (sp == sl || sa[sp++] != '=') ||
-                                shiftto == 18) {
+                            if (!isMIME &&
+                                (shiftto == 6 && (sp == sl || sa[sp++] != '=') ||
+                                 shiftto == 18)) {
                                 throw new IllegalArgumentException(
                                      "Input byte array has wrong 4-byte ending unit");
                             }
@@ -943,11 +952,12 @@
                     throw new IllegalArgumentException(
                         "Last unit does not have enough valid bits");
                 }
-                while (sp < sl) {
-                    if (isMIME && base64[sa[sp++]] < 0)
-                        continue;
-                    throw new IllegalArgumentException(
-                        "Input byte array has incorrect ending byte at " + sp);
+                if (sp < sl) {
+                    if (isMIME)
+                        sp = sl;
+                    else
+                        throw new IllegalArgumentException(
+                            "Input byte array has incorrect ending byte at " + sp);
                 }
                 mark = sp;
                 return dp - dp0;
@@ -972,8 +982,9 @@
                     int b = src.get(sp++) & 0xff;
                     if ((b = base64[b]) < 0) {
                         if (b == -2) {  // padding byte
-                            if (shiftto == 6 && (sp == sl || src.get(sp++) != '=') ||
-                                shiftto == 18) {
+                            if (!isMIME &&
+                                (shiftto == 6 && (sp == sl || src.get(sp++) != '=') ||
+                                 shiftto == 18)) {
                                 throw new IllegalArgumentException(
                                      "Input byte array has wrong 4-byte ending unit");
                             }
@@ -1012,11 +1023,12 @@
                     throw new IllegalArgumentException(
                         "Last unit does not have enough valid bits");
                 }
-                while (sp < sl) {
-                    if (isMIME && base64[src.get(sp++)] < 0)
-                        continue;
-                    throw new IllegalArgumentException(
-                        "Input byte array has incorrect ending byte at " + sp);
+                if (sp < sl) {
+                    if (isMIME)
+                        sp = sl;
+                    else
+                        throw new IllegalArgumentException(
+                            "Input byte array has incorrect ending byte at " + sp);
                 }
                 mark = sp;
                 return dp - dp0;
@@ -1072,14 +1084,15 @@
             while (sp < sl) {
                 int b = src[sp++] & 0xff;
                 if ((b = base64[b]) < 0) {
-                    if (b == -2) {     // padding byte '='
-                        // xx=   shiftto==6&&sp==sl missing last =
-                        // xx=y  shiftto==6 last is not =
-                        // =     shiftto==18 unnecessary padding
-                        // x=    shiftto==12 be taken care later
-                        //       together with single x, invalid anyway
-                        if (shiftto == 6 && (sp == sl || src[sp++] != '=') ||
-                            shiftto == 18) {
+                    if (b == -2) {         // padding byte '='
+                        if (!isMIME  &&    // be lenient for rfc2045
+                            // =     shiftto==18 unnecessary padding
+                            // x=    shiftto==12 a dangling single x
+                            // x     to be handled together with non-padding case
+                            // xx=   shiftto==6&&sp==sl missing last =
+                            // xx=y  shiftto==6 last is not =
+                            (shiftto == 6 && (sp == sl || src[sp++] != '=') ||
+                            shiftto == 18)) {
                             throw new IllegalArgumentException(
                                 "Input byte array has wrong 4-byte ending unit");
                         }
@@ -1109,14 +1122,14 @@
                 dst[dp++] = (byte)(bits >> 16);
                 dst[dp++] = (byte)(bits >>  8);
             } else if (shiftto == 12) {
+                // dangling single "x", throw exception even in lenient mode,
+                // it's incorrectly encoded.
                 throw new IllegalArgumentException(
                     "Last unit does not have enough valid bits");
             }
             // anything left is invalid, if is not MIME.
-            // if MIME, ignore all non-base64 character
-            while (sp < sl) {
-                if (isMIME && base64[src[sp++]] < 0)
-                    continue;
+            // if MIME (lenient), just ignore all leftover
+            if (sp < sl && !isMIME) {
                 throw new IllegalArgumentException(
                     "Input byte array has incorrect ending byte at " + sp);
             }
@@ -1286,7 +1299,7 @@
                         if (nextin == 12)
                             throw new IOException("Base64 stream has one un-decoded dangling byte.");
                         // treat ending xx/xxx without padding character legal.
-                        // same logic as v == 'v' below
+                        // same logic as v == '=' below
                         b[off++] = (byte)(bits >> (16));
                         len--;
                         if (nextin == 0) {           // only one padding byte
@@ -1305,21 +1318,31 @@
                 }
                 if (v == '=') {                  // padding byte(s)
                     // =     shiftto==18 unnecessary padding
-                    // x=    shiftto==12 invalid unit
+                    // x=    shiftto==12 dangling x, invalid unit
                     // xx=   shiftto==6 && missing last '='
-                    // xx=y                or last is not '='
+                    // xx=y  or last is not '='
                     if (nextin == 18 || nextin == 12 ||
                         nextin == 6 && is.read() != '=') {
-                        throw new IOException("Illegal base64 ending sequence:" + nextin);
-                    }
-                    b[off++] = (byte)(bits >> (16));
-                    len--;
-                    if (nextin == 0) {           // only one padding byte
-                        if (len == 0) {          // no enough output space
-                            bits >>= 8;          // shift to lowest byte
-                            nextout = 0;
-                        } else {
-                            b[off++] = (byte) (bits >>  8);
+                        if (!isMIME || nextin == 12) {
+                            throw new IOException("Illegal base64 ending sequence:" + nextin);
+                        } else if (nextin != 18) {
+                            // lenient mode for mime
+                            // (1) handle the "unnecessary padding in "xxxx ="
+                            //     case as the eof (nextin == 18)
+                            // (2) decode "xx=" and "xx=y" normally
+                            b[off++] = (byte)(bits >> (16));
+                            len--;
+                        }
+                    } else {
+                        b[off++] = (byte)(bits >> (16));
+                        len--;
+                        if (nextin == 0) {           // only one padding byte
+                            if (len == 0) {          // no enough output space
+                                bits >>= 8;          // shift to lowest byte
+                                nextout = 0;
+                            } else {
+                                b[off++] = (byte) (bits >>  8);
+                            }
                         }
                     }
                     eof = true;
--- a/src/share/classes/java/util/BitSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/BitSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1164,10 +1164,10 @@
      * <p>Example:
      * <pre>
      * BitSet drPepper = new BitSet();</pre>
-     * Now {@code drPepper.toString()} returns "{@code {}}".<p>
+     * Now {@code drPepper.toString()} returns "{@code {}}".
      * <pre>
      * drPepper.set(2);</pre>
-     * Now {@code drPepper.toString()} returns "{@code {2}}".<p>
+     * Now {@code drPepper.toString()} returns "{@code {2}}".
      * <pre>
      * drPepper.set(4);
      * drPepper.set(10);</pre>
--- a/src/share/classes/java/util/Deque.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Deque.java	Wed Oct 30 18:38:20 2013 +0000
@@ -56,7 +56,6 @@
  * <p>The twelve methods described above are summarized in the
  * following table:
  *
- * <p>
  * <table BORDER CELLPADDING=3 CELLSPACING=1>
  * <caption>Summary of Deque methods</caption>
  *  <tr>
@@ -100,7 +99,6 @@
  * inherited from the {@code Queue} interface are precisely equivalent to
  * {@code Deque} methods as indicated in the following table:
  *
- * <p>
  * <table BORDER CELLPADDING=3 CELLSPACING=1>
  * <caption>Comparison of Queue and Deque methods</caption>
  *  <tr>
@@ -139,7 +137,6 @@
  * beginning of the deque.  Stack methods are precisely equivalent to
  * {@code Deque} methods as indicated in the table below:
  *
- * <p>
  * <table BORDER CELLPADDING=3 CELLSPACING=1>
  * <caption>Comparison of Stack and Deque methods</caption>
  *  <tr>
--- a/src/share/classes/java/util/DoubleSummaryStatistics.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/DoubleSummaryStatistics.java	Wed Oct 30 18:38:20 2013 +0000
@@ -127,7 +127,7 @@
      * numerical sum compared to a simple summation of {@code double}
      * values.
      *
-     * @apiNote Sorting values by increasing absolute magnitude tends to yield
+     * @apiNote Values sorted by increasing absolute magnitude tend to yield
      * more accurate results.
      *
      * @return the sum of values, or zero if none
--- a/src/share/classes/java/util/Formatter.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Formatter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -56,7 +56,7 @@
 import java.time.ZoneOffset;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 
 import sun.misc.DoubleConsts;
 import sun.misc.FormattedFloatingDecimal;
@@ -131,7 +131,7 @@
  *   import static java.util.Calendar.*;
  *
  *   Calendar c = new GregorianCalendar(1995, MAY, 23);
- *   String s = String.format("Duke's Birthday: %1$tm %1$te,%1$tY", c);
+ *   String s = String.format("Duke's Birthday: %1$tb %1$te, %1$tY", c);
  *   // -&gt; s == "Duke's Birthday: May 23, 1995"
  * </pre></blockquote>
  *
@@ -253,7 +253,7 @@
  * <li> <b>Integral</b> - may be applied to Java integral types: {@code byte},
  * {@link Byte}, {@code short}, {@link Short}, {@code int} and {@link
  * Integer}, {@code long}, {@link Long}, and {@link java.math.BigInteger
- * BigInteger}
+ * BigInteger} (but not {@code char} or {@link Character})
  *
  * <li><b>Floating Point</b> - may be applied to Java floating-point types:
  * {@code float}, {@link Float}, {@code double}, {@link Double}, and {@link
@@ -899,7 +899,7 @@
  * <table cellpadding=5 summary="IntConv">
  *
  * <tr><td valign="top"> {@code 'd'}
- *     <td valign="top"> <tt>'&#92;u0054'</tt>
+ *     <td valign="top"> <tt>'&#92;u0064'</tt>
  *     <td> Formats the argument as a decimal integer. The <a
  *     href="#L10nAlgorithm">localization algorithm</a> is applied.
  *
@@ -1057,7 +1057,7 @@
  * <table cellpadding=5 summary="BIntConv">
  *
  * <tr><td valign="top"> {@code 'd'}
- *     <td valign="top"> <tt>'&#92;u0054'</tt>
+ *     <td valign="top"> <tt>'&#92;u0064'</tt>
  *     <td> Requires the output to be formatted as a decimal integer. The <a
  *     href="#L10nAlgorithm">localization algorithm</a> is applied.
  *
@@ -4153,7 +4153,7 @@
                     break;
                 }
                 case DateTime.ZONE:        { // 'Z' (symbol)
-                    ZoneId zid = t.query(TemporalQuery.zone());
+                    ZoneId zid = t.query(TemporalQueries.zone());
                     if (zid == null) {
                         throw new IllegalFormatConversionException(c, t.getClass());
                     }
--- a/src/share/classes/java/util/HashMap.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/HashMap.java	Wed Oct 30 18:38:20 2013 +0000
@@ -915,7 +915,7 @@
             return removeNode(hash(key), key, null, false, true) != null;
         }
         public final Spliterator<K> spliterator() {
-            return new KeySpliterator<K,V>(HashMap.this, 0, -1, 0, 0);
+            return new KeySpliterator<>(HashMap.this, 0, -1, 0, 0);
         }
         public final void forEach(Consumer<? super K> action) {
             Node<K,V>[] tab;
@@ -959,7 +959,7 @@
         public final Iterator<V> iterator()     { return new ValueIterator(); }
         public final boolean contains(Object o) { return containsValue(o); }
         public final Spliterator<V> spliterator() {
-            return new ValueSpliterator<K,V>(HashMap.this, 0, -1, 0, 0);
+            return new ValueSpliterator<>(HashMap.this, 0, -1, 0, 0);
         }
         public final void forEach(Consumer<? super V> action) {
             Node<K,V>[] tab;
@@ -1022,7 +1022,7 @@
             return false;
         }
         public final Spliterator<Map.Entry<K,V>> spliterator() {
-            return new EntrySpliterator<K,V>(HashMap.this, 0, -1, 0, 0);
+            return new EntrySpliterator<>(HashMap.this, 0, -1, 0, 0);
         }
         public final void forEach(Consumer<? super Map.Entry<K,V>> action) {
             Node<K,V>[] tab;
@@ -1042,19 +1042,23 @@
 
     // Overrides of JDK8 Map extension methods
 
+    @Override
     public V getOrDefault(Object key, V defaultValue) {
         Node<K,V> e;
         return (e = getNode(hash(key), key)) == null ? defaultValue : e.value;
     }
 
+    @Override
     public V putIfAbsent(K key, V value) {
         return putVal(hash(key), key, value, true, true);
     }
 
+    @Override
     public boolean remove(Object key, Object value) {
         return removeNode(hash(key), key, value, true, true) != null;
     }
 
+    @Override
     public boolean replace(K key, V oldValue, V newValue) {
         Node<K,V> e; V v;
         if ((e = getNode(hash(key), key)) != null &&
@@ -1066,6 +1070,7 @@
         return false;
     }
 
+    @Override
     public V replace(K key, V value) {
         Node<K,V> e;
         if ((e = getNode(hash(key), key)) != null) {
@@ -1077,6 +1082,7 @@
         return null;
     }
 
+    @Override
     public V computeIfAbsent(K key,
                              Function<? super K, ? extends V> mappingFunction) {
         if (mappingFunction == null)
@@ -1150,6 +1156,7 @@
         return null;
     }
 
+    @Override
     public V compute(K key,
                      BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
         if (remappingFunction == null)
@@ -1202,6 +1209,7 @@
         return v;
     }
 
+    @Override
     public V merge(K key, V value,
                    BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
         if (remappingFunction == null)
@@ -1230,7 +1238,11 @@
             }
         }
         if (old != null) {
-            V v = remappingFunction.apply(old.value, value);
+            V v;
+            if (old.value != null)
+                v = remappingFunction.apply(old.value, value);
+            else
+                v = value;
             if (v != null) {
                 old.value = v;
                 afterNodeAccess(old);
@@ -1254,6 +1266,7 @@
         return value;
     }
 
+    @Override
     public void forEach(BiConsumer<? super K, ? super V> action) {
         Node<K,V>[] tab;
         if (action == null)
@@ -1269,6 +1282,7 @@
         }
     }
 
+    @Override
     public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
         Node<K,V>[] tab;
         if (function == null)
@@ -1295,6 +1309,7 @@
      * @return a shallow copy of this map
      */
     @SuppressWarnings("unchecked")
+    @Override
     public Object clone() {
         HashMap<K,V> result;
         try {
@@ -1496,7 +1511,7 @@
         public KeySpliterator<K,V> trySplit() {
             int hi = getFence(), lo = index, mid = (lo + hi) >>> 1;
             return (lo >= mid || current != null) ? null :
-                new KeySpliterator<K,V>(map, lo, index = mid, est >>>= 1,
+                new KeySpliterator<>(map, lo, index = mid, est >>>= 1,
                                         expectedModCount);
         }
 
@@ -1568,7 +1583,7 @@
         public ValueSpliterator<K,V> trySplit() {
             int hi = getFence(), lo = index, mid = (lo + hi) >>> 1;
             return (lo >= mid || current != null) ? null :
-                new ValueSpliterator<K,V>(map, lo, index = mid, est >>>= 1,
+                new ValueSpliterator<>(map, lo, index = mid, est >>>= 1,
                                           expectedModCount);
         }
 
@@ -1639,7 +1654,7 @@
         public EntrySpliterator<K,V> trySplit() {
             int hi = getFence(), lo = index, mid = (lo + hi) >>> 1;
             return (lo >= mid || current != null) ? null :
-                new EntrySpliterator<K,V>(map, lo, index = mid, est >>>= 1,
+                new EntrySpliterator<>(map, lo, index = mid, est >>>= 1,
                                           expectedModCount);
         }
 
@@ -1714,22 +1729,22 @@
 
     // Create a regular (non-tree) node
     Node<K,V> newNode(int hash, K key, V value, Node<K,V> next) {
-        return new Node<K,V>(hash, key, value, next);
+        return new Node<>(hash, key, value, next);
     }
 
     // For conversion from TreeNodes to plain nodes
     Node<K,V> replacementNode(Node<K,V> p, Node<K,V> next) {
-        return new Node<K,V>(p.hash, p.key, p.value, next);
+        return new Node<>(p.hash, p.key, p.value, next);
     }
 
     // Create a tree bin node
     TreeNode<K,V> newTreeNode(int hash, K key, V value, Node<K,V> next) {
-        return new TreeNode<K,V>(hash, key, value, next);
+        return new TreeNode<>(hash, key, value, next);
     }
 
     // For treeifyBin
     TreeNode<K,V> replacementTreeNode(Node<K,V> p, Node<K,V> next) {
-        return new TreeNode<K,V>(p.hash, p.key, p.value, next);
+        return new TreeNode<>(p.hash, p.key, p.value, next);
     }
 
     /**
--- a/src/share/classes/java/util/Iterator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Iterator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -94,10 +94,10 @@
     }
 
     /**
-     * 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.
+     * Performs the given action for each remaining element until all elements
+     * have been processed or the action throws an exception.  Actions are
+     * performed in the order of iteration, if that order is specified.
+     * Exceptions thrown by the action are relayed to the caller.
      *
      * @implSpec
      * <p>The default implementation behaves as if:
--- a/src/share/classes/java/util/List.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/List.java	Wed Oct 30 18:38:20 2013 +0000
@@ -192,8 +192,9 @@
      * The following code can be used to dump the list into a newly
      * allocated array of <tt>String</tt>:
      *
-     * <pre>
-     *     String[] y = x.toArray(new String[0]);</pre>
+     * <pre>{@code
+     *     String[] y = x.toArray(new String[0]);
+     * }</pre>
      *
      * Note that <tt>toArray(new Object[0])</tt> is identical in function to
      * <tt>toArray()</tt>.
@@ -383,14 +384,13 @@
      *
      * @implSpec
      * The default implementation is equivalent to, for this {@code list}:
-     * <pre>
-     * {@code
-     * final ListIterator<E> li = list.listIterator();
-     * while (li.hasNext()) {
-     *   li.set(operator.apply(li.next()));
-     * }
-     * }
-     * </pre>
+     * <pre>{@code
+     *     final ListIterator<E> li = list.listIterator();
+     *     while (li.hasNext()) {
+     *         li.set(operator.apply(li.next()));
+     *     }
+     * }</pre>
+     *
      * If the list's list-iterator does not support the {@code set} operation
      * then an {@code UnsupportedOperationException} will be thrown when
      * replacing the first element.
@@ -469,11 +469,11 @@
     /**
      * Returns the hash code value for this list.  The hash code of a list
      * is defined to be the result of the following calculation:
-     * <pre>
-     *  int hashCode = 1;
-     *  for (E e : list)
-     *      hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
-     * </pre>
+     * <pre>{@code
+     *     int hashCode = 1;
+     *     for (E e : list)
+     *         hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
+     * }</pre>
      * This ensures that <tt>list1.equals(list2)</tt> implies that
      * <tt>list1.hashCode()==list2.hashCode()</tt> for any two lists,
      * <tt>list1</tt> and <tt>list2</tt>, as required by the general
@@ -640,9 +640,9 @@
      * a list can be used as a range operation by passing a subList view
      * instead of a whole list.  For example, the following idiom
      * removes a range of elements from a list:
-     * <pre>
+     * <pre>{@code
      *      list.subList(from, to).clear();
-     * </pre>
+     * }</pre>
      * Similar idioms may be constructed for <tt>indexOf</tt> and
      * <tt>lastIndexOf</tt>, and all of the algorithms in the
      * <tt>Collections</tt> class can be applied to a subList.<p>
--- a/src/share/classes/java/util/Locale.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Locale.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1248,7 +1248,7 @@
      * Returns a string representation of this <code>Locale</code>
      * object, consisting of language, country, variant, script,
      * and extensions as below:
-     * <p><blockquote>
+     * <blockquote>
      * language + "_" + country + "_" + (variant + "_#" | "#") + script + "-" + extensions
      * </blockquote>
      *
@@ -2199,7 +2199,7 @@
      * are exactly "ja", "JP", "JP" or "th", "TH", "TH" and script/extensions
      * fields are empty, this method supplies <code>UNICODE_LOCALE_EXTENSION</code>
      * "ca"/"japanese" (calendar type is "japanese") or "nu"/"thai" (number script
-     * type is "thai"). See <a href="Locale.html#special_cases_constructor"/>Special Cases</a>
+     * type is "thai"). See <a href="Locale.html#special_cases_constructor">Special Cases</a>
      * for more information.
      *
      * @return an instance of <code>Locale</code> equivalent to
--- a/src/share/classes/java/util/Map.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Map.java	Wed Oct 30 18:38:20 2013 +0000
@@ -465,6 +465,7 @@
          * @param  <V> the type of the map values
          * @return a comparator that compares {@link Map.Entry} in natural order on key.
          * @see Comparable
+         * @since 1.8
          */
         public static <K extends Comparable<? super K>, V> Comparator<Map.Entry<K,V>> comparingByKey() {
             return (Comparator<Map.Entry<K, V>> & Serializable)
@@ -481,6 +482,7 @@
          * @param <V> the {@link Comparable} type of the map values
          * @return a comparator that compares {@link Map.Entry} in natural order on value.
          * @see Comparable
+         * @since 1.8
          */
         public static <K, V extends Comparable<? super V>> Comparator<Map.Entry<K,V>> comparingByValue() {
             return (Comparator<Map.Entry<K, V>> & Serializable)
@@ -498,6 +500,7 @@
          * @param  <V> the type of the map values
          * @param  cmp the key {@link Comparator}
          * @return a comparator that compares {@link Map.Entry} by the key.
+         * @since 1.8
          */
         public static <K, V> Comparator<Map.Entry<K, V>> comparingByKey(Comparator<? super K> cmp) {
             Objects.requireNonNull(cmp);
@@ -516,6 +519,7 @@
          * @param  <V> the type of the map values
          * @param  cmp the value {@link Comparator}
          * @return a comparator that compares {@link Map.Entry} by the value.
+         * @since 1.8
          */
         public static <K, V> Comparator<Map.Entry<K, V>> comparingByValue(Comparator<? super V> cmp) {
             Objects.requireNonNull(cmp);
@@ -558,26 +562,27 @@
     // 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
-    * @param defaultValue the default mapping of the key
-    * @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>)
-    */
+     * Returns the value to which the specified key is mapped, or
+     * {@code defaultValue} if this map contains no mapping for the key.
+     *
+     * @implSpec
+     * 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
+     * @param defaultValue the default mapping of the key
+     * @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>)
+     * @since 1.8
+     */
     default V getOrDefault(Object key, V defaultValue) {
         V v;
         return (((v = get(key)) != null) || containsKey(key))
@@ -586,27 +591,24 @@
     }
 
     /**
-     * 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}.
+     * Performs the given action for each entry in this map until all entries
+     * have been processed or the action throws an exception.   Unless
+     * otherwise specified by the implementing class, actions are performed in
+     * the order of entry set iteration (if an iteration order is specified.)
      * 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}:
+     * @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>
      *
+     * 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 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
@@ -631,14 +633,9 @@
 
     /**
      * 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.
+     * function on that entry until all entries have been processed or the
+     * function throws an exception.  Exceptions thrown by the function are
+     * relayed to the caller.
      *
      * @implSpec
      * <p>The default implementation is equivalent to, for this {@code map}:
@@ -647,6 +644,11 @@
      *     entry.setValue(function.apply(entry.getKey(), entry.getValue()));
      * }</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.
+     *
      * @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.
@@ -698,22 +700,23 @@
      * 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);
+     * V v = map.get(key);
+     * if (v == null)
+     *     v = map.put(key, value);
+     *
+     * return v;
      * }</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.
+     *
      * @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
@@ -733,16 +736,12 @@
      * @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();
-            }
+            v = put(key, value);
         }
 
         return v;
@@ -752,11 +751,6 @@
      * 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}:
      *
@@ -768,6 +762,11 @@
      *     return false;
      * }</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.
+     *
      * @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
@@ -796,11 +795,6 @@
      * 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}:
      *
@@ -816,6 +810,11 @@
      * for maps that do not support null values if oldValue is null unless
      * newValue is also null.
      *
+     * <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 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
@@ -848,11 +847,6 @@
      * 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}:
      *
@@ -863,6 +857,11 @@
      *     return null;
      * }</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.
+      *
      * @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
@@ -883,14 +882,17 @@
      * @since 1.8
      */
     default V replace(K key, V value) {
-        return containsKey(key) ? put(key, value) : null;
+        V curValue;
+        if (((curValue = get(key)) != null) || containsKey(key)) {
+            curValue = put(key, value);
+        }
+        return curValue;
     }
 
     /**
-     * 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}.
+     * 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
@@ -902,35 +904,42 @@
      * map.computeIfAbsent(key, k -> new Value(f(k)));
      * }</pre>
      *
+     * <p>Or to implement a multi-value map, {@code Map<K,Collection<V>>},
+     * supporting multiple values per key:
+     *
+     * <pre> {@code
+     * map.computeIfAbsent(key, k -> new HashSet<V>()).add(v);
+     * }</pre>
+     *
+     *
+     * @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.put(key, newValue);
+     * }
+     * }</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>
+     * present.
      *
      * @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
+     *         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>)
@@ -942,10 +951,16 @@
     default V computeIfAbsent(K key,
             Function<? super K, ? extends V> mappingFunction) {
         Objects.requireNonNull(mappingFunction);
-        V v, newValue;
-        return ((v = get(key)) == null &&
-                (newValue = mappingFunction.apply(key)) != null &&
-                (v = putIfAbsent(key, newValue)) == null) ? newValue : v;
+        V v;
+        if ((v = get(key)) == null) {
+            V newValue;
+            if ((newValue = mappingFunction.apply(key)) != null) {
+                put(key, newValue);
+                return newValue;
+            }
+        }
+
+        return v;
     }
 
     /**
@@ -955,6 +970,22 @@
      * <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.
+    *
+     * @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.put(key, newValue);
+     *     else
+     *         map.remove(key);
+     * }
+     * }</pre>
      *
      * <p>The default implementation makes no guarantees about synchronization
      * or atomicity properties of this method. Any implementation providing
@@ -962,27 +993,7 @@
      * 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.
+     * present.
      *
      * @param key key with which the specified value is to be associated
      * @param remappingFunction the function to compute a value
@@ -1002,22 +1013,25 @@
             BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
         Objects.requireNonNull(remappingFunction);
         V oldValue;
-        while ((oldValue = get(key)) != null) {
+        if ((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))
+                put(key, newValue);
+                return newValue;
+            } else {
+                remove(key);
                 return null;
+            }
+        } else {
+            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:
+     * 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>
@@ -1028,15 +1042,6 @@
      * (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
@@ -1047,19 +1052,24 @@
      * V newValue = remappingFunction.apply(key, oldValue);
      * if (oldValue != null ) {
      *    if (newValue != null)
-     *       map.replace(key, oldValue, newValue);
+     *       map.put(key, newValue);
      *    else
-     *       map.remove(key, oldValue);
+     *       map.remove(key);
      * } else {
      *    if (newValue != null)
-     *       map.putIfAbsent(key, newValue);
+     *       map.put(key, newValue);
      *    else
      *       return null;
      * }
      * }</pre>
      *
-     * In concurrent contexts, the default implementation may retry
-     * these steps when multiple threads attempt updates.
+     * <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.
      *
      * @param key key with which the specified value is to be associated
      * @param remappingFunction the function to compute a value
@@ -1079,44 +1089,22 @@
             BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
         Objects.requireNonNull(remappingFunction);
         V oldValue = get(key);
-        for (;;) {
-            V newValue = remappingFunction.apply(key, oldValue);
-            if (newValue == null) {
-                // delete mapping
-                if(oldValue != null || containsKey(key)) {
-                    // something to remove
-                    if (remove(key, oldValue)) {
-                        // removed the old value as expected
-                        return null;
-                    }
 
-                    // some other value replaced old value. try again.
-                    oldValue = get(key);
-                } else {
-                    // nothing to do. Leave things as they were.
-                    return null;
-                }
+        V newValue = remappingFunction.apply(key, oldValue);
+        if (newValue == null) {
+            // delete mapping
+            if (oldValue != null || containsKey(key)) {
+                // something to remove
+                remove(key);
+                return null;
             } else {
-                // add or replace old mapping
-                if (oldValue != null) {
-                    // replace
-                    if (replace(key, oldValue, newValue)) {
-                        // replaced as expected.
-                        return newValue;
-                    }
-
-                    // some other value replaced old value. try again.
-                    oldValue = get(key);
-                } else {
-                    // add (replace if oldValue was null)
-                    if ((oldValue = putIfAbsent(key, newValue)) == null) {
-                        // replaced
-                        return newValue;
-                    }
-
-                    // some other value replaced old value. try again.
-                }
+                // nothing to do. Leave things as they were.
+                return null;
             }
+        } else {
+            // add or replace old mapping
+            put(key, newValue);
+            return newValue;
         }
     }
 
@@ -1138,15 +1126,6 @@
      * (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
@@ -1157,15 +1136,20 @@
      * V newValue = (oldValue == null) ? value :
      *              remappingFunction.apply(oldValue, value);
      * if (newValue == null)
-     *     map.remove(key, oldValue);
+     *     map.remove(key);
      * else if (oldValue == null)
-     *     map.putIfAbsent(key, newValue);
+     *     map.remove(key);
      * else
-     *     map.replace(key, oldValue, newValue);
+     *     map.put(key, newValue);
      * }</pre>
      *
-     * In concurrent contexts, the default implementation may retry
-     * these steps when multiple threads attempt updates.
+     * <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.
      *
      * @param key key with which the specified value is to be associated
      * @param value the value to use if absent
@@ -1178,32 +1162,30 @@
      *         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
+     *         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) {
         Objects.requireNonNull(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);
+        if (oldValue != null) {
+            V newValue = remappingFunction.apply(oldValue, value);
+            if (newValue != null) {
+                put(key, newValue);
+                return newValue;
             } else {
-                if (value == null) {
-                    return null;
-                }
-
-                if ((oldValue = putIfAbsent(key, value)) == null) {
-                    return value;
-                }
+                remove(key);
+                return null;
+            }
+        } else {
+            if (value == null) {
+                remove(key);
+                return null;
+            } else {
+                put(key, value);
+                return value;
             }
         }
     }
--- a/src/share/classes/java/util/PrimitiveIterator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/PrimitiveIterator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -76,6 +76,7 @@
      * @param action The action to be performed for each element
      * @throws NullPointerException if the specified action is null
      */
+    @SuppressWarnings("overloads")
     void forEachRemaining(T_CONS action);
 
     /**
@@ -93,10 +94,10 @@
         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.
+         * Performs the given action for each remaining element until all elements
+         * have been processed or the action throws an exception.  Actions are
+         * performed in the order of iteration, if that order is specified.
+         * Exceptions thrown by the action are relayed to the caller.
          *
          * @implSpec
          * <p>The default implementation behaves as if:
@@ -167,10 +168,10 @@
         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.
+         * Performs the given action for each remaining element until all elements
+         * have been processed or the action throws an exception.  Actions are
+         * performed in the order of iteration, if that order is specified.
+         * Exceptions thrown by the action are relayed to the caller.
          *
          * @implSpec
          * <p>The default implementation behaves as if:
@@ -240,10 +241,10 @@
         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.
+         * Performs the given action for each remaining element until all elements
+         * have been processed or the action throws an exception.  Actions are
+         * performed in the order of iteration, if that order is specified.
+         * Exceptions thrown by the action are relayed to the caller.
          *
          * @implSpec
          * <p>The default implementation behaves as if:
--- a/src/share/classes/java/util/Properties.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Properties.java	Wed Oct 30 18:38:20 2013 +0000
@@ -244,7 +244,6 @@
      * As an example, each of the following three lines specifies the key
      * {@code "Truth"} and the associated element value
      * {@code "Beauty"}:
-     * <p>
      * <pre>
      * Truth = Beauty
      *  Truth:Beauty
@@ -252,14 +251,12 @@
      * </pre>
      * As another example, the following three lines specify a single
      * property:
-     * <p>
      * <pre>
      * fruits                           apple, banana, pear, \
      *                                  cantaloupe, watermelon, \
      *                                  kiwi, mango
      * </pre>
      * The key is {@code "fruits"} and the associated element is:
-     * <p>
      * <pre>"apple, banana, pear, cantaloupe, watermelon, kiwi, mango"</pre>
      * Note that a space appears before each {@code \} so that a space
      * will appear after each comma in the final result; the {@code \},
@@ -268,13 +265,11 @@
      * characters.
      * <p>
      * As a third example, the line:
-     * <p>
      * <pre>cheeses
      * </pre>
      * specifies that the key is {@code "cheeses"} and the associated
-     * element is the empty string {@code ""}.<p>
+     * element is the empty string {@code ""}.
      * <p>
-     *
      * <a name="unicodeescapes"></a>
      * Characters in keys and elements can be represented in escape
      * sequences similar to those used for character and string literals
--- a/src/share/classes/java/util/PropertyPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/PropertyPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -51,11 +51,10 @@
  * signify a wildcard match. For example: "java.*" and "*" signify a wildcard
  * match, while "*java" and "a*b" do not.
  * <P>
- * <P>
  * The actions to be granted are passed to the constructor in a string containing
  * a list of one or more comma-separated keywords. The possible keywords are
  * "read" and "write". Their meaning is defined as follows:
- * <P>
+ *
  * <DL>
  *    <DT> read
  *    <DD> read permission. Allows <code>System.getProperty</code> to
@@ -166,11 +165,11 @@
      * Checks if this PropertyPermission object "implies" the specified
      * permission.
      * <P>
-     * More specifically, this method returns true if:<p>
+     * More specifically, this method returns true if:
      * <ul>
-     * <li> <i>p</i> is an instanceof PropertyPermission,<p>
+     * <li> <i>p</i> is an instanceof PropertyPermission,
      * <li> <i>p</i>'s actions are a subset of this
-     * object's actions, and <p>
+     * object's actions, and
      * <li> <i>p</i>'s name is implied by this object's
      *      name. For example, "java.*" implies "java.home".
      * </ul>
--- a/src/share/classes/java/util/Queue.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Queue.java	Wed Oct 30 18:38:20 2013 +0000
@@ -47,7 +47,6 @@
  * implementations; in most implementations, insert operations cannot
  * fail.
  *
- * <p>
  * <table BORDER CELLPADDING=3 CELLSPACING=1>
  * <caption>Summary of Queue methods</caption>
  *  <tr>
--- a/src/share/classes/java/util/ResourceBundle.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/ResourceBundle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -311,6 +311,24 @@
     private static final ReferenceQueue<Object> referenceQueue = new ReferenceQueue<>();
 
     /**
+     * Returns the base name of this bundle, if known, or {@code null} if unknown.
+     *
+     * If not null, then this is the value of the {@code baseName} parameter
+     * that was passed to the {@code ResourceBundle.getBundle(...)} method
+     * when the resource bundle was loaded.
+     *
+     * @return The base name of the resource bundle, as provided to and expected
+     * by the {@code ResourceBundle.getBundle(...)} methods.
+     *
+     * @see #getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
+     *
+     * @since 1.8
+     */
+    public String getBaseBundleName() {
+        return name;
+    }
+
+    /**
      * The parent bundle of this bundle.
      * The parent bundle is searched by {@link #getObject getObject}
      * when this bundle does not contain a particular resource.
@@ -1066,7 +1084,6 @@
      * bundles. Conceptually, the bundle loading process with the given
      * <code>control</code> is performed in the following steps.
      *
-     * <p>
      * <ol>
      * <li>This factory method looks up the resource bundle in the cache for
      * the specified <code>baseName</code>, <code>targetLocale</code> and
--- a/src/share/classes/java/util/Scanner.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Scanner.java	Wed Oct 30 18:38:20 2013 +0000
@@ -216,7 +216,6 @@
  * are specified in terms of the following regular-expression grammar, where
  * Rmax is the highest digit in the radix being used (for example, Rmax is 9 in base 10).
  *
- * <p>
  * <dl>
  *   <dt><i>NonAsciiDigit</i>:
  *       <dd>A non-ASCII character c for which
--- a/src/share/classes/java/util/Spliterator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/Spliterator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -613,6 +613,7 @@
          * upon entry to this method, else {@code true}.
          * @throws NullPointerException if the specified action is null
          */
+        @SuppressWarnings("overloads")
         boolean tryAdvance(T_CONS action);
 
         /**
@@ -630,6 +631,7 @@
          * @param action The action
          * @throws NullPointerException if the specified action is null
          */
+        @SuppressWarnings("overloads")
         default void forEachRemaining(T_CONS action) {
             do { } while (tryAdvance(action));
         }
--- a/src/share/classes/java/util/TimeZone.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/TimeZone.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -39,13 +39,9 @@
 package java.util;
 
 import java.io.Serializable;
-import java.lang.ref.SoftReference;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.time.ZoneId;
-import java.util.concurrent.ConcurrentHashMap;
-import sun.misc.JavaAWTAccess;
-import sun.misc.SharedSecrets;
 import sun.security.action.GetPropertyAction;
 import sun.util.calendar.ZoneInfo;
 import sun.util.calendar.ZoneInfoFile;
@@ -548,7 +544,16 @@
      * @since 1.8
      */
     public ZoneId toZoneId() {
-        return ZoneId.of(getID(), ZoneId.SHORT_IDS);
+        String id = getID();
+        if (ZoneInfoFile.useOldMapping() && id.length() == 3) {
+            if ("EST".equals(id))
+                return ZoneId.of("America/New_York");
+            if ("MST".equals(id))
+                return ZoneId.of("America/Denver");
+            if ("HST".equals(id))
+                return ZoneId.of("America/Honolulu");
+        }
+        return ZoneId.of(id, ZoneId.SHORT_IDS);
     }
 
     private static TimeZone getTimeZone(String ID, boolean fallback) {
@@ -596,11 +601,26 @@
     private static native String getSystemGMTOffsetID();
 
     /**
-     * Gets the default <code>TimeZone</code> for this host.
-     * The source of the default <code>TimeZone</code>
-     * may vary with implementation.
-     * @return a default <code>TimeZone</code>.
-     * @see #setDefault
+     * Gets the default {@code TimeZone} of the Java virtual machine. If the
+     * cached default {@code TimeZone} is available, its clone is returned.
+     * Otherwise, the method takes the following steps to determine the default
+     * time zone.
+     *
+     * <ul>
+     * <li>Use the {@code user.timezone} property value as the default
+     * time zone ID if it's available.</li>
+     * <li>Detect the platform time zone ID. The source of the
+     * platform time zone and ID mapping may vary with implementation.</li>
+     * <li>Use {@code GMT} as the last resort if the given or detected
+     * time zone ID is unknown.</li>
+     * </ul>
+     *
+     * <p>The default {@code TimeZone} created from the ID is cached,
+     * and its clone is returned. The {@code user.timezone} property
+     * value is set to the ID upon return.
+     *
+     * @return the default {@code TimeZone}
+     * @see #setDefault(TimeZone)
      */
     public static TimeZone getDefault() {
         return (TimeZone) getDefaultRef().clone();
@@ -611,14 +631,11 @@
      * method doesn't create a clone.
      */
     static TimeZone getDefaultRef() {
-        TimeZone defaultZone = getDefaultInAppContext();
+        TimeZone defaultZone = defaultTimeZone;
         if (defaultZone == null) {
-            defaultZone = defaultTimeZone;
-            if (defaultZone == null) {
-                // Need to initialize the default time zone.
-                defaultZone = setDefaultZone();
-                assert defaultZone != null;
-            }
+            // Need to initialize the default time zone.
+            defaultZone = setDefaultZone();
+            assert defaultZone != null;
         }
         // Don't clone here.
         return defaultZone;
@@ -676,95 +693,27 @@
         return tz;
     }
 
-    private static boolean hasPermission() {
-        boolean hasPermission = true;
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) {
-            try {
-                sm.checkPermission(new PropertyPermission
-                                   ("user.timezone", "write"));
-            } catch (SecurityException e) {
-                hasPermission = false;
-            }
-        }
-        return hasPermission;
-    }
-
     /**
-     * Sets the <code>TimeZone</code> that is
-     * returned by the <code>getDefault</code> method.  If <code>zone</code>
-     * is null, reset the default to the value it had originally when the
-     * VM first started.
-     * @param zone the new default time zone
+     * Sets the {@code TimeZone} that is returned by the {@code getDefault}
+     * method. {@code zone} is cached. If {@code zone} is null, the cached
+     * default {@code TimeZone} is cleared. This method doesn't change the value
+     * of the {@code user.timezone} property.
+     *
+     * @param zone the new default {@code TimeZone}, or null
+     * @throws SecurityException if the security manager's {@code checkPermission}
+     *                           denies {@code PropertyPermission("user.timezone",
+     *                           "write")}
      * @see #getDefault
+     * @see PropertyPermission
      */
     public static void setDefault(TimeZone zone)
     {
-        if (hasPermission()) {
-            synchronized (TimeZone.class) {
-                defaultTimeZone = zone;
-                setDefaultInAppContext(null);
-            }
-        } else {
-            setDefaultInAppContext(zone);
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(new PropertyPermission
+                               ("user.timezone", "write"));
         }
-    }
-
-    /**
-     * Returns the default TimeZone in an AppContext if any AppContext
-     * has ever used. null is returned if any AppContext hasn't been
-     * used or if the AppContext doesn't have the default TimeZone.
-     *
-     * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't
-     * been loaded. If so, it implies that AWTSecurityManager is not our
-     * SecurityManager and we can use a local static variable.
-     * This works around a build time issue.
-     */
-    private static TimeZone getDefaultInAppContext() {
-        // JavaAWTAccess provides access implementation-private methods without using reflection.
-        JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess();
-
-        if (javaAWTAccess == null) {
-            return mainAppContextDefault;
-        } else {
-            if (!javaAWTAccess.isDisposed()) {
-                TimeZone tz = (TimeZone)
-                    javaAWTAccess.get(TimeZone.class);
-                if (tz == null && javaAWTAccess.isMainAppContext()) {
-                    return mainAppContextDefault;
-                } else {
-                    return tz;
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Sets the default TimeZone in the AppContext to the given
-     * tz. null is handled special: do nothing if any AppContext
-     * hasn't been used, remove the default TimeZone in the
-     * AppContext otherwise.
-     *
-     * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't
-     * been loaded. If so, it implies that AWTSecurityManager is not our
-     * SecurityManager and we can use a local static variable.
-     * This works around a build time issue.
-     */
-    private static void setDefaultInAppContext(TimeZone tz) {
-        // JavaAWTAccess provides access implementation-private methods without using reflection.
-        JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess();
-
-        if (javaAWTAccess == null) {
-            mainAppContextDefault = tz;
-        } else {
-            if (!javaAWTAccess.isDisposed()) {
-                javaAWTAccess.put(TimeZone.class, tz);
-                if (javaAWTAccess.isMainAppContext()) {
-                    mainAppContextDefault = null;
-                }
-            }
-        }
+        defaultTimeZone = zone;
     }
 
     /**
--- a/src/share/classes/java/util/UUID.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/UUID.java	Wed Oct 30 18:38:20 2013 +0000
@@ -233,7 +233,7 @@
      * number describes how this {@code UUID} was generated.
      *
      * The version number has the following meaning:
-     * <p><ul>
+     * <ul>
      * <li>1    Time-based UUID
      * <li>2    DCE security UUID
      * <li>3    Name-based UUID
@@ -252,7 +252,7 @@
      * number describes the layout of the {@code UUID}.
      *
      * The variant number has the following meaning:
-     * <p><ul>
+     * <ul>
      * <li>0    Reserved for NCS backward compatibility
      * <li>2    <a href="http://www.ietf.org/rfc/rfc4122.txt">IETF&nbsp;RFC&nbsp;4122</a>
      * (Leach-Salz), used by this class
--- a/src/share/classes/java/util/concurrent/BlockingDeque.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/BlockingDeque.java	Wed Oct 30 18:38:20 2013 +0000
@@ -50,7 +50,6 @@
  * and the fourth blocks for only a given maximum time limit before giving
  * up.  These methods are summarized in the following table:
  *
- * <p>
  * <table BORDER CELLPADDING=3 CELLSPACING=1>
  * <caption>Summary of BlockingDeque methods</caption>
  *  <tr>
@@ -126,7 +125,6 @@
  * {@code BlockingQueue} interface are precisely equivalent to
  * {@code BlockingDeque} methods as indicated in the following table:
  *
- * <p>
  * <table BORDER CELLPADDING=3 CELLSPACING=1>
  * <caption>Comparison of BlockingQueue and BlockingDeque methods</caption>
  *  <tr>
--- a/src/share/classes/java/util/concurrent/BlockingQueue.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/BlockingQueue.java	Wed Oct 30 18:38:20 2013 +0000
@@ -53,7 +53,6 @@
  * and the fourth blocks for only a given maximum time limit before giving
  * up.  These methods are summarized in the following table:
  *
- * <p>
  * <table BORDER CELLPADDING=3 CELLSPACING=1>
  * <caption>Summary of BlockingQueue methods</caption>
  *  <tr>
--- a/src/share/classes/java/util/concurrent/ConcurrentMap.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/ConcurrentMap.java	Wed Oct 30 18:38:20 2013 +0000
@@ -36,7 +36,9 @@
 package java.util.concurrent;
 import java.util.Map;
 import java.util.Objects;
+import java.util.function.BiConsumer;
 import java.util.function.BiFunction;
+import java.util.function.Function;
 
 /**
  * A {@link java.util.Map} providing thread safety and atomicity
@@ -64,9 +66,13 @@
      * {@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.
+     * contain null values and {@code get()} returning null unambiguously means
+     * the key is absent. Implementations which support null values
+     * <strong>must</strong> override this default implementation.
+     *
+     * @throws ClassCastException {@inheritDoc}
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
      */
     @Override
     default V getOrDefault(Object key, V defaultValue) {
@@ -74,6 +80,41 @@
         return ((v = get(key)) != null) ? v : defaultValue;
     }
 
+   /**
+     * {@inheritDoc}
+     *
+     * @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>
+     *
+     * @implNote The default implementation assumes that
+     * {@code IllegalStateException} thrown by {@code getKey()} or
+     * {@code getValue()} indicates that the entry has been removed and cannot
+     * be processed. Operation continues for subsequent entries.
+     *
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
+     */
+    @Override
+    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) {
+                // this usually means the entry is no longer in the map.
+                continue;
+            }
+            action.accept(k, v);
+        }
+    }
+
     /**
      * If the specified key is not already associated
      * with a value, associate it with the given value.
@@ -82,10 +123,14 @@
      * if (!map.containsKey(key))
      *   return map.put(key, value);
      * else
-     *   return map.get(key);}</pre>
+     *   return map.get(key);
+     * }</pre>
      *
      * except that the action is performed atomically.
      *
+     * @implNote This implementation intentionally re-abstracts the
+     * inappropriate default provided in {@code Map}.
+     *
      * @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
@@ -102,7 +147,7 @@
      * @throws IllegalArgumentException if some property of the specified key
      *         or value prevents it from being stored in this map
      */
-    V putIfAbsent(K key, V value);
+     V putIfAbsent(K key, V value);
 
     /**
      * Removes the entry for a key only if currently mapped to a given value.
@@ -112,10 +157,14 @@
      *   map.remove(key);
      *   return true;
      * } else
-     *   return false;}</pre>
+     *   return false;
+     * }</pre>
      *
      * except that the action is performed atomically.
      *
+     * @implNote This implementation intentionally re-abstracts the
+     * inappropriate default provided in {@code Map}.
+     *
      * @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
@@ -138,10 +187,14 @@
      *   map.put(key, newValue);
      *   return true;
      * } else
-     *   return false;}</pre>
+     *   return false;
+     * }</pre>
      *
      * except that the action is performed atomically.
      *
+     * @implNote This implementation intentionally re-abstracts the
+     * inappropriate default provided in {@code Map}.
+     *
      * @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
@@ -164,10 +217,14 @@
      * if (map.containsKey(key)) {
      *   return map.put(key, value);
      * } else
-     *   return null;}</pre>
+     *   return null;
+     * }</pre>
      *
      * except that the action is performed atomically.
      *
+     * @implNote This implementation intentionally re-abstracts the
+     * inappropriate default provided in {@code Map}.
+     *
      * @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
@@ -189,10 +246,30 @@
     /**
      * {@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
-     * <strong>must</strong> override this default implementation.
+     * @implSpec
+     * <p>The default implementation is equivalent to, for this {@code map}:
+     * <pre> {@code
+     * for ((Map.Entry<K, V> entry : map.entrySet())
+     *     do {
+     *        K k = entry.getKey();
+     *        V v = entry.getValue();
+     *     } while(!replace(k, v, function.apply(k, v)));
+     * }</pre>
+     *
+     * The default implementation may retry these steps when multiple
+     * threads attempt updates including potentially calling the function
+     * repeatedly for a given key.
+     *
+     * <p>This implementation assumes that the ConcurrentMap cannot contain null
+     * values and {@code get()} returning null unambiguously means the key is
+     * absent. Implementations which support null values <strong>must</strong>
+     * override this default implementation.
+     *
+     * @throws UnsupportedOperationException {@inheritDoc}
+     * @throws NullPointerException {@inheritDoc}
+     * @throws ClassCastException {@inheritDoc}
+     * @throws IllegalArgumentException {@inheritDoc}
+     * @since 1.8
      */
     @Override
     default void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
@@ -200,11 +277,243 @@
         forEach((k,v) -> {
             while(!replace(k, v, function.apply(k, v))) {
                 // v changed or k is gone
-                if( (v = get(k)) == null) {
+                if ( (v = get(k)) == null) {
                     // k is no longer in the map.
                     break;
                 }
             }
         });
     }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @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)
+     *         return map.putIfAbsent(key, newValue);
+     * }
+     * }</pre>
+     *
+     * The default implementation may retry these steps when multiple
+     * threads attempt updates including potentially calling the mapping
+     * function multiple times.
+     *
+     * <p>This implementation assumes that the ConcurrentMap cannot contain null
+     * values and {@code get()} returning null unambiguously means the key is
+     * absent. Implementations which support null values <strong>must</strong>
+     * override this default implementation.
+     *
+     * @throws UnsupportedOperationException {@inheritDoc}
+     * @throws ClassCastException {@inheritDoc}
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
+     */
+    @Override
+    default V computeIfAbsent(K key,
+            Function<? super K, ? extends V> mappingFunction) {
+        Objects.requireNonNull(mappingFunction);
+        V v, newValue;
+        return ((v = get(key)) == null &&
+                (newValue = mappingFunction.apply(key)) != null &&
+                (v = putIfAbsent(key, newValue)) == null) ? newValue : v;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @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>
+     *
+     * The default implementation may retry these steps when multiple threads
+     * attempt updates including potentially calling the remapping function
+     * multiple times.
+     *
+     * <p>This implementation assumes that the ConcurrentMap cannot contain null
+     * values and {@code get()} returning null unambiguously means the key is
+     * absent. Implementations which support null values <strong>must</strong>
+     * override this default implementation.
+     *
+     * @throws UnsupportedOperationException {@inheritDoc}
+     * @throws ClassCastException {@inheritDoc}
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
+     */
+    @Override
+    default V computeIfPresent(K key,
+            BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+        Objects.requireNonNull(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;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @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>
+     *
+     * The default implementation may retry these steps when multiple
+     * threads attempt updates including potentially calling the remapping
+     * function multiple times.
+     *
+     * <p>This implementation assumes that the ConcurrentMap cannot contain null
+     * values and {@code get()} returning null unambiguously means the key is
+     * absent. Implementations which support null values <strong>must</strong>
+     * override this default implementation.
+     *
+     * @throws UnsupportedOperationException {@inheritDoc}
+     * @throws ClassCastException {@inheritDoc}
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
+     */
+    @Override
+    default V compute(K key,
+            BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+        Objects.requireNonNull(remappingFunction);
+        V oldValue = get(key);
+        for(;;) {
+            V newValue = remappingFunction.apply(key, oldValue);
+            if (newValue == null) {
+                // delete mapping
+                if (oldValue != null || containsKey(key)) {
+                    // something to remove
+                    if (remove(key, oldValue)) {
+                        // removed the old value as expected
+                        return null;
+                    }
+
+                    // some other value replaced old value. try again.
+                    oldValue = get(key);
+                } else {
+                    // nothing to do. Leave things as they were.
+                    return null;
+                }
+            } else {
+                // add or replace old mapping
+                if (oldValue != null) {
+                    // replace
+                    if (replace(key, oldValue, newValue)) {
+                        // replaced as expected.
+                        return newValue;
+                    }
+
+                    // some other value replaced old value. try again.
+                    oldValue = get(key);
+                } else {
+                    // add (replace if oldValue was null)
+                    if ((oldValue = putIfAbsent(key, newValue)) == null) {
+                        // replaced
+                        return newValue;
+                    }
+
+                    // some other value replaced old value. try again.
+                }
+            }
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     *
+     * @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);
+     * else if (oldValue == null)
+     *     map.remove(key);
+     * else
+     *     map.put(key, newValue);
+     * }</pre>
+     *
+     * <p>The default implementation may retry these steps when multiple
+     * threads attempt updates including potentially calling the remapping
+     * function multiple times.
+     *
+     * <p>This implementation assumes that the ConcurrentMap cannot contain null
+     * values and {@code get()} returning null unambiguously means the key is
+     * absent. Implementations which support null values <strong>must</strong>
+     * override this default implementation.
+     *
+     * @throws UnsupportedOperationException {@inheritDoc}
+     * @throws ClassCastException {@inheritDoc}
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
+     */
+    @Override
+    default V merge(K key, V value,
+            BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+        Objects.requireNonNull(remappingFunction);
+        Objects.requireNonNull(value);
+        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 ((oldValue = putIfAbsent(key, value)) == null) {
+                    return value;
+                }
+            }
+        }
+    }
 }
--- a/src/share/classes/java/util/concurrent/ForkJoinTask.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/ForkJoinTask.java	Wed Oct 30 18:38:20 2013 +0000
@@ -439,11 +439,13 @@
         final Throwable ex;
         ExceptionNode next;
         final long thrower;  // use id not ref to avoid weak cycles
+        final int hashCode;  // store task hashCode before weak ref disappears
         ExceptionNode(ForkJoinTask<?> task, Throwable ex, ExceptionNode next) {
             super(task, exceptionTableRefQueue);
             this.ex = ex;
             this.next = next;
             this.thrower = Thread.currentThread().getId();
+            this.hashCode = System.identityHashCode(task);
         }
     }
 
@@ -605,9 +607,9 @@
     private static void expungeStaleExceptions() {
         for (Object x; (x = exceptionTableRefQueue.poll()) != null;) {
             if (x instanceof ExceptionNode) {
-                ForkJoinTask<?> key = ((ExceptionNode)x).get();
+                int hashCode = ((ExceptionNode)x).hashCode;
                 ExceptionNode[] t = exceptionTable;
-                int i = System.identityHashCode(key) & (t.length - 1);
+                int i = hashCode & (t.length - 1);
                 ExceptionNode e = t[i];
                 ExceptionNode pred = null;
                 while (e != null) {
--- a/src/share/classes/java/util/concurrent/Future.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/Future.java	Wed Oct 30 18:38:20 2013 +0000
@@ -52,8 +52,8 @@
  *
  * <p>
  * <b>Sample Usage</b> (Note that the following classes are all
- * made-up.) <p>
- *  <pre> {@code
+ * made-up.)
+ * <pre> {@code
  * interface ArchiveSearcher { String search(String target); }
  * class App {
  *   ExecutorService executor = ...
--- a/src/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -224,18 +224,71 @@
         return (float)get();
     }
 
-    private void writeObject(java.io.ObjectOutputStream s)
-        throws java.io.IOException {
-        s.defaultWriteObject();
-        s.writeDouble(get());
+    /**
+     * Serialization proxy, used to avoid reference to the non-public
+     * Striped64 superclass in serialized forms.
+     * @serial include
+     */
+    private static class SerializationProxy implements Serializable {
+        private static final long serialVersionUID = 7249069246863182397L;
+
+        /**
+         * The current value returned by get().
+         * @serial
+         */
+        private final double value;
+        /**
+         * The function used for updates.
+         * @serial
+         */
+        private final DoubleBinaryOperator function;
+        /**
+         * The identity value
+         * @serial
+         */
+        private final long identity;
+
+        SerializationProxy(DoubleAccumulator a) {
+            function = a.function;
+            identity = a.identity;
+            value = a.get();
+        }
+
+        /**
+         * Returns a {@code DoubleAccumulator} object with initial state
+         * held by this proxy.
+         *
+         * @return a {@code DoubleAccumulator} object with initial state
+         * held by this proxy.
+         */
+        private Object readResolve() {
+            double d = Double.longBitsToDouble(identity);
+            DoubleAccumulator a = new DoubleAccumulator(function, d);
+            a.base = Double.doubleToRawLongBits(value);
+            return a;
+        }
     }
 
+    /**
+     * Returns a
+     * <a href="../../../../serialized-form.html#java.util.concurrent.atomic.DoubleAccumulator.SerializationProxy">
+     * SerializationProxy</a>
+     * representing the state of this instance.
+     *
+     * @return a {@link SerializationProxy}
+     * representing the state of this instance
+     */
+    private Object writeReplace() {
+        return new SerializationProxy(this);
+    }
+
+    /**
+     * @param s the stream
+     * @throws java.io.InvalidObjectException always
+     */
     private void readObject(java.io.ObjectInputStream s)
-        throws java.io.IOException, ClassNotFoundException {
-        s.defaultReadObject();
-        cellsBusy = 0;
-        cells = null;
-        base = Double.doubleToRawLongBits(s.readDouble());
+        throws java.io.InvalidObjectException {
+        throw new java.io.InvalidObjectException("Proxy required");
     }
 
 }
--- a/src/share/classes/java/util/concurrent/atomic/DoubleAdder.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/atomic/DoubleAdder.java	Wed Oct 30 18:38:20 2013 +0000
@@ -210,18 +210,58 @@
         return (float)sum();
     }
 
-    private void writeObject(java.io.ObjectOutputStream s)
-        throws java.io.IOException {
-        s.defaultWriteObject();
-        s.writeDouble(sum());
+    /**
+     * Serialization proxy, used to avoid reference to the non-public
+     * Striped64 superclass in serialized forms.
+     * @serial include
+     */
+    private static class SerializationProxy implements Serializable {
+        private static final long serialVersionUID = 7249069246863182397L;
+
+        /**
+         * The current value returned by sum().
+         * @serial
+         */
+        private final double value;
+
+        SerializationProxy(DoubleAdder a) {
+            value = a.sum();
+        }
+
+        /**
+         * Returns a {@code DoubleAdder} object with initial state
+         * held by this proxy.
+         *
+         * @return a {@code DoubleAdder} object with initial state
+         * held by this proxy.
+         */
+        private Object readResolve() {
+            DoubleAdder a = new DoubleAdder();
+            a.base = Double.doubleToRawLongBits(value);
+            return a;
+        }
     }
 
+    /**
+     * Returns a
+     * <a href="../../../../serialized-form.html#java.util.concurrent.atomic.DoubleAdder.SerializationProxy">
+     * SerializationProxy</a>
+     * representing the state of this instance.
+     *
+     * @return a {@link SerializationProxy}
+     * representing the state of this instance
+     */
+    private Object writeReplace() {
+        return new SerializationProxy(this);
+    }
+
+    /**
+     * @param s the stream
+     * @throws java.io.InvalidObjectException always
+     */
     private void readObject(java.io.ObjectInputStream s)
-        throws java.io.IOException, ClassNotFoundException {
-        s.defaultReadObject();
-        cellsBusy = 0;
-        cells = null;
-        base = Double.doubleToRawLongBits(s.readDouble());
+        throws java.io.InvalidObjectException {
+        throw new java.io.InvalidObjectException("Proxy required");
     }
 
 }
--- a/src/share/classes/java/util/concurrent/atomic/LongAccumulator.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/atomic/LongAccumulator.java	Wed Oct 30 18:38:20 2013 +0000
@@ -221,18 +221,70 @@
         return (double)get();
     }
 
-    private void writeObject(java.io.ObjectOutputStream s)
-        throws java.io.IOException {
-        s.defaultWriteObject();
-        s.writeLong(get());
+    /**
+     * Serialization proxy, used to avoid reference to the non-public
+     * Striped64 superclass in serialized forms.
+     * @serial include
+     */
+    private static class SerializationProxy implements Serializable {
+        private static final long serialVersionUID = 7249069246863182397L;
+
+        /**
+         * The current value returned by get().
+         * @serial
+         */
+        private final long value;
+        /**
+         * The function used for updates.
+         * @serial
+         */
+        private final LongBinaryOperator function;
+        /**
+         * The identity value
+         * @serial
+         */
+        private final long identity;
+
+        SerializationProxy(LongAccumulator a) {
+            function = a.function;
+            identity = a.identity;
+            value = a.get();
+        }
+
+        /**
+         * Returns a {@code LongAccumulator} object with initial state
+         * held by this proxy.
+         *
+         * @return a {@code LongAccumulator} object with initial state
+         * held by this proxy.
+         */
+        private Object readResolve() {
+            LongAccumulator a = new LongAccumulator(function, identity);
+            a.base = value;
+            return a;
+        }
     }
 
+    /**
+     * Returns a
+     * <a href="../../../../serialized-form.html#java.util.concurrent.atomic.LongAccumulator.SerializationProxy">
+     * SerializationProxy</a>
+     * representing the state of this instance.
+     *
+     * @return a {@link SerializationProxy}
+     * representing the state of this instance
+     */
+    private Object writeReplace() {
+        return new SerializationProxy(this);
+    }
+
+    /**
+     * @param s the stream
+     * @throws java.io.InvalidObjectException always
+     */
     private void readObject(java.io.ObjectInputStream s)
-        throws java.io.IOException, ClassNotFoundException {
-        s.defaultReadObject();
-        cellsBusy = 0;
-        cells = null;
-        base = s.readLong();
+        throws java.io.InvalidObjectException {
+        throw new java.io.InvalidObjectException("Proxy required");
     }
 
 }
--- a/src/share/classes/java/util/concurrent/atomic/LongAdder.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/atomic/LongAdder.java	Wed Oct 30 18:38:20 2013 +0000
@@ -211,18 +211,58 @@
         return (double)sum();
     }
 
-    private void writeObject(java.io.ObjectOutputStream s)
-        throws java.io.IOException {
-        s.defaultWriteObject();
-        s.writeLong(sum());
+    /**
+     * Serialization proxy, used to avoid reference to the non-public
+     * Striped64 superclass in serialized forms.
+     * @serial include
+     */
+    private static class SerializationProxy implements Serializable {
+        private static final long serialVersionUID = 7249069246863182397L;
+
+        /**
+         * The current value returned by sum().
+         * @serial
+         */
+        private final long value;
+
+        SerializationProxy(LongAdder a) {
+            value = a.sum();
+        }
+
+        /**
+         * Return a {@code LongAdder} object with initial state
+         * held by this proxy.
+         *
+         * @return a {@code LongAdder} object with initial state
+         * held by this proxy.
+         */
+        private Object readResolve() {
+            LongAdder a = new LongAdder();
+            a.base = value;
+            return a;
+        }
     }
 
+    /**
+     * Returns a
+     * <a href="../../../../serialized-form.html#java.util.concurrent.atomic.LongAdder.SerializationProxy">
+     * SerializationProxy</a>
+     * representing the state of this instance.
+     *
+     * @return a {@link SerializationProxy}
+     * representing the state of this instance
+     */
+    private Object writeReplace() {
+        return new SerializationProxy(this);
+    }
+
+    /**
+     * @param s the stream
+     * @throws java.io.InvalidObjectException always
+     */
     private void readObject(java.io.ObjectInputStream s)
-        throws java.io.IOException, ClassNotFoundException {
-        s.defaultReadObject();
-        cellsBusy = 0;
-        cells = null;
-        base = s.readLong();
+        throws java.io.InvalidObjectException {
+        throw new java.io.InvalidObjectException("Proxy required");
     }
 
 }
--- a/src/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Wed Oct 30 18:38:20 2013 +0000
@@ -56,7 +56,6 @@
  * constraints.  A nonfair lock that is continuously contended may
  * indefinitely postpone one or more reader or writer threads, but
  * will normally have higher throughput than a fair lock.
- * <p>
  *
  * <dt><b><i>Fair mode</i></b>
  * <dd>When constructed as fair, threads contend for entry using an
--- a/src/share/classes/java/util/function/package-info.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/function/package-info.java	Wed Oct 30 18:38:20 2013 +0000
@@ -60,7 +60,11 @@
  * actions, or predicates.  In documenting functional interfaces, or referring
  * to variables typed as functional interfaces, it is common to refer directly
  * to those abstract concepts, for example using "this function" instead of
- * "the function represented by this object".
+ * "the function represented by this object".  When an API method is said to
+ * accept or return a functional interface in this manner, such as "applies the
+ * provided function to...", this is understood to mean a <i>non-null</i>
+ * reference to an object implementing the appropriate functional interface,
+ * unless potential nullity is explicitly specified.
  *
  * <p>The functional interfaces in this package follow an extensible naming
  * convention, as follows:
--- a/src/share/classes/java/util/jar/Pack200.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/jar/Pack200.java	Wed Oct 30 18:38:20 2013 +0000
@@ -44,7 +44,7 @@
  * The unpacker  engine is used by deployment applications to
  * transform the byte-stream back to JAR format.
  * <p>
- * Here is an example using  packer and unpacker:<p>
+ * Here is an example using  packer and unpacker:
  * <pre>{@code
  *    import java.util.jar.Pack200;
  *    import java.util.jar.Pack200.*;
--- a/src/share/classes/java/util/logging/LogManager.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/logging/LogManager.java	Wed Oct 30 18:38:20 2013 +0000
@@ -770,9 +770,10 @@
             ref = owner.new LoggerWeakRef(logger);
             namedLoggers.put(name, ref);
 
-            // Apply any initial level defined for the new logger.
+            // Apply any initial level defined for the new logger, unless
+            // the logger's level is already initialized
             Level level = owner.getLevelProperty(name + ".level", null);
-            if (level != null) {
+            if (level != null && !logger.isLevelInitialized()) {
                 doSetLevel(logger, level);
             }
 
--- a/src/share/classes/java/util/logging/Logger.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/logging/Logger.java	Wed Oct 30 18:38:20 2013 +0000
@@ -88,17 +88,21 @@
  * the LogRecord to its output Handlers.  By default, loggers also
  * publish to their parent's Handlers, recursively up the tree.
  * <p>
- * Each Logger may have a ResourceBundle name associated with it.
- * The named bundle will be used for localizing logging messages.
- * If a Logger does not have its own ResourceBundle name, then
- * it will inherit the ResourceBundle name from its parent,
- * recursively up the tree.
+ * Each Logger may have a {@code ResourceBundle} associated with it.
+ * The {@code ResourceBundle} may be specified by name, using the
+ * {@link #getLogger(java.lang.String, java.lang.String)} factory
+ * method, or by value - using the {@link
+ * #setResourceBundle(java.util.ResourceBundle) setResourceBundle} method.
+ * This bundle will be used for localizing logging messages.
+ * If a Logger does not have its own {@code ResourceBundle} or resource bundle
+ * name, then it will inherit the {@code ResourceBundle} or resource bundle name
+ * from its parent, recursively up the tree.
  * <p>
  * Most of the logger output methods take a "msg" argument.  This
  * msg argument may be either a raw value or a localization key.
  * During formatting, if the logger has (or inherits) a localization
- * ResourceBundle and if the ResourceBundle has a mapping for the msg
- * string, then the msg string is replaced by the localized value.
+ * {@code ResourceBundle} and if the {@code ResourceBundle} has a mapping for
+ * the msg string, then the msg string is replaced by the localized value.
  * Otherwise the original msg string is used.  Typically, formatters use
  * java.text.MessageFormat style formatting to format parameters, so
  * for example a format string "{0} {1}" would format two parameters
@@ -131,10 +135,30 @@
    logger.log(Level.FINER, DiagnosisMessages::systemHealthStatus);
 </code></pre>
  * <p>
- * When mapping ResourceBundle names to ResourceBundles, the Logger
- * will first try to use the Thread's ContextClassLoader.  If that
- * is null it will try the
- * {@linkplain java.lang.ClassLoader#getSystemClassLoader() system ClassLoader} instead.
+ * When looking for a {@code ResourceBundle}, the logger will first look at
+ * whether a bundle was specified using {@link
+ * #setResourceBundle(java.util.ResourceBundle) setResourceBundle}, and then
+ * only whether a resource bundle name was specified through the {@link
+ * #getLogger(java.lang.String, java.lang.String) getLogger} factory method.
+ * If no {@code ResourceBundle} or no resource bundle name is found,
+ * then it will use the nearest {@code ResourceBundle} or resource bundle
+ * name inherited from its parent tree.<br>
+ * When a {@code ResourceBundle} was inherited or specified through the
+ * {@link
+ * #setResourceBundle(java.util.ResourceBundle) setResourceBundle} method, then
+ * that {@code ResourceBundle} will be used. Otherwise if the logger only
+ * has or inherited a resource bundle name, then that resource bundle name
+ * will be mapped to a {@code ResourceBundle} object, using the default Locale
+ * at the time of logging.
+ * <br id="ResourceBundleMapping">When mapping resource bundle names to
+ * {@code ResourceBundle} objects, the logger will first try to use the
+ * Thread's {@linkplain java.lang.Thread#getContextClassLoader() context class
+ * loader} to map the given resource bundle name to a {@code ResourceBundle}.
+ * If the thread context class loader is {@code null}, it will try the
+ * {@linkplain java.lang.ClassLoader#getSystemClassLoader() system class loader}
+ * instead.  If the {@code ResourceBundle} is still not found, it will use the
+ * class loader of the first caller of the {@link
+ * #getLogger(java.lang.String, java.lang.String) getLogger} factory method.
  * <p>
  * Formatting (including localization) is the responsibility of
  * the output Handler, which will typically call a Formatter.
@@ -154,7 +178,7 @@
  * <li><p>
  *     There are a set of "logrb" method (for "log with resource bundle")
  *     that are like the "logp" method, but also take an explicit resource
- *     bundle name for use in localizing the log message.
+ *     bundle object for use in localizing the log message.
  * <li><p>
  *     There are convenience methods for tracing method entries (the
  *     "entering" methods), method returns (the "exiting" methods) and
@@ -198,18 +222,20 @@
     private String name;
     private final CopyOnWriteArrayList<Handler> handlers =
         new CopyOnWriteArrayList<>();
-    private String resourceBundleName;
+    private String resourceBundleName;  // Base name of the bundle.
+    private ResourceBundle userBundle;  // Bundle set through setResourceBundle.
     private volatile boolean useParentHandlers = true;
     private volatile Filter filter;
     private boolean anonymous;
 
+    // Cache to speed up behavior of findResourceBundle:
     private ResourceBundle catalog;     // Cached resource bundle
     private String catalogName;         // name associated with catalog
     private Locale catalogLocale;       // locale associated with catalog
 
     // The fields relating to parent-child relationships and levels
     // are managed under a separate lock, the treeLock.
-    private static Object treeLock = new Object();
+    private static final Object treeLock = new Object();
     // We keep weak references from parents to children, but strong
     // references from children to parents.
     private volatile Logger parent;    // our nearest parent.
@@ -372,6 +398,7 @@
         static boolean disableCallerCheck = getBooleanProperty("sun.util.logging.disableCallerCheck");
         private static boolean getBooleanProperty(final String key) {
             String s = AccessController.doPrivileged(new PrivilegedAction<String>() {
+                @Override
                 public String run() {
                     return System.getProperty(key);
                 }
@@ -528,7 +555,9 @@
      * Even although the new logger is anonymous, it is configured
      * to have the root logger ("") as its parent.  This means that
      * by default it inherits its effective level and handlers
-     * from the root logger.
+     * from the root logger. Changing its parent via the
+     * {@link #setParent(java.util.logging.Logger) setParent} method
+     * will still require the security permission specified by that method.
      * <p>
      *
      * @return a newly created private Logger
@@ -552,7 +581,9 @@
      * Even although the new logger is anonymous, it is configured
      * to have the root logger ("") as its parent.  This means that
      * by default it inherits its effective level and handlers
-     * from the root logger.
+     * from the root logger.  Changing its parent via the
+     * {@link #setParent(java.util.logging.Logger) setParent} method
+     * will still require the security permission specified by that method.
      * <p>
      * @param   resourceBundleName  name of ResourceBundle to be used for localizing
      *                          messages for this logger.
@@ -579,11 +610,18 @@
 
     /**
      * Retrieve the localization resource bundle for this
-     * logger for the current default locale.  Note that if
-     * the result is null, then the Logger will use a resource
-     * bundle inherited from its parent.
+     * logger.
+     * This method will return a {@code ResourceBundle} that was either
+     * set by the {@link
+     * #setResourceBundle(java.util.ResourceBundle) setResourceBundle} method or
+     * <a href="#ResourceBundleMapping">mapped from the
+     * the resource bundle name</a> set via the {@link
+     * Logger#getLogger(java.lang.String, java.lang.String) getLogger} factory
+     * method for the current default locale.
+     * <br>Note that if the result is {@code null}, then the Logger will use a resource
+     * bundle or resource bundle name inherited from its parent.
      *
-     * @return localization bundle (may be null)
+     * @return localization bundle (may be {@code null})
      */
     public ResourceBundle getResourceBundle() {
         return findResourceBundle(getResourceBundleName(), true);
@@ -591,10 +629,16 @@
 
     /**
      * Retrieve the localization resource bundle name for this
-     * logger.  Note that if the result is null, then the Logger
-     * will use a resource bundle name inherited from its parent.
+     * logger.
+     * This is either the name specified through the {@link
+     * #getLogger(java.lang.String, java.lang.String) getLogger} factory method,
+     * or the {@linkplain ResourceBundle#getBaseBundleName() base name} of the
+     * ResourceBundle set through {@link
+     * #setResourceBundle(java.util.ResourceBundle) setResourceBundle} method.
+     * <br>Note that if the result is {@code null}, then the Logger will use a resource
+     * bundle or resource bundle name inherited from its parent.
      *
-     * @return localization bundle name (may be null)
+     * @return localization bundle name (may be {@code null})
      */
     public String getResourceBundleName() {
         return resourceBundleName;
@@ -608,8 +652,9 @@
      * be published.
      *
      * @param   newFilter  a filter object (may be null)
-     * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have LoggingPermission("control").
+     * @throws  SecurityException if a security manager exists,
+     *          this logger is not anonymous, and the caller
+     *          does not have LoggingPermission("control").
      */
     public void setFilter(Filter newFilter) throws SecurityException {
         checkPermission();
@@ -665,10 +710,11 @@
     // resource bundle and then call "void log(LogRecord)".
     private void doLog(LogRecord lr) {
         lr.setLoggerName(name);
-        String ebname = getEffectiveResourceBundleName();
-        if (ebname != null && !ebname.equals(SYSTEM_LOGGER_RB_NAME)) {
+        final ResourceBundle bundle = getEffectiveResourceBundle();
+        final String ebname = getEffectiveResourceBundleName();
+        if (ebname != null && bundle != null) {
             lr.setResourceBundleName(ebname);
-            lr.setResourceBundle(findResourceBundle(ebname, true));
+            lr.setResourceBundle(bundle);
         }
         log(lr);
     }
@@ -1000,6 +1046,16 @@
         log(lr);
     }
 
+    // Private support method for logging for "logrb" methods.
+    private void doLog(LogRecord lr, ResourceBundle rb) {
+        lr.setLoggerName(name);
+        if (rb != null) {
+            lr.setResourceBundleName(rb.getBaseBundleName());
+            lr.setResourceBundle(rb);
+        }
+        log(lr);
+    }
+
     /**
      * Log a message, specifying source class, method, and resource bundle name
      * with no arguments.
@@ -1018,7 +1074,11 @@
      * @param   bundleName     name of resource bundle to localize msg,
      *                         can be null
      * @param   msg     The string message (or a key in the message catalog)
+     * @deprecated Use {@link #logrb(java.util.logging.Level, java.lang.String,
+     * java.lang.String, java.util.ResourceBundle, java.lang.String,
+     * java.lang.Object...)} instead.
      */
+    @Deprecated
     public void logrb(Level level, String sourceClass, String sourceMethod,
                                 String bundleName, String msg) {
         if (!isLoggable(level)) {
@@ -1049,7 +1109,11 @@
      *                         can be null
      * @param   msg      The string message (or a key in the message catalog)
      * @param   param1    Parameter to the log message.
+     * @deprecated Use {@link #logrb(java.util.logging.Level, java.lang.String,
+     *   java.lang.String, java.util.ResourceBundle, java.lang.String,
+     *   java.lang.Object...)} instead
      */
+    @Deprecated
     public void logrb(Level level, String sourceClass, String sourceMethod,
                                 String bundleName, String msg, Object param1) {
         if (!isLoggable(level)) {
@@ -1082,7 +1146,11 @@
      *                         can be null.
      * @param   msg     The string message (or a key in the message catalog)
      * @param   params  Array of parameters to the message
+     * @deprecated Use {@link #logrb(java.util.logging.Level, java.lang.String,
+     *      java.lang.String, java.util.ResourceBundle, java.lang.String,
+     *      java.lang.Object...)} instead.
      */
+    @Deprecated
     public void logrb(Level level, String sourceClass, String sourceMethod,
                                 String bundleName, String msg, Object params[]) {
         if (!isLoggable(level)) {
@@ -1096,6 +1164,41 @@
     }
 
     /**
+     * Log a message, specifying source class, method, and resource bundle,
+     * with an optional list of message parameters.
+     * <p>
+     * If the logger is currently enabled for the given message
+     * level then a corresponding LogRecord is created and forwarded
+     * to all the registered output Handler objects.
+     * <p>
+     * The {@code msg} string is localized using the given resource bundle.
+     * If the resource bundle is {@code null}, then the {@code msg} string is not
+     * localized.
+     * <p>
+     * @param   level   One of the message level identifiers, e.g., SEVERE
+     * @param   sourceClass    Name of the class that issued the logging request
+     * @param   sourceMethod   Name of the method that issued the logging request
+     * @param   bundle         Resource bundle to localize {@code msg},
+     *                         can be {@code null}.
+     * @param   msg     The string message (or a key in the message catalog)
+     * @param   params  Parameters to the message (optional, may be none).
+     * @since 1.8
+     */
+    public void logrb(Level level, String sourceClass, String sourceMethod,
+                      ResourceBundle bundle, String msg, Object... params) {
+        if (!isLoggable(level)) {
+            return;
+        }
+        LogRecord lr = new LogRecord(level, msg);
+        lr.setSourceClassName(sourceClass);
+        lr.setSourceMethodName(sourceMethod);
+        if (params != null && params.length != 0) {
+            lr.setParameters(params);
+        }
+        doLog(lr, bundle);
+    }
+
+    /**
      * Log a message, specifying source class, method, and resource bundle name,
      * with associated Throwable information.
      * <p>
@@ -1119,7 +1222,11 @@
      *                         can be null
      * @param   msg     The string message (or a key in the message catalog)
      * @param   thrown  Throwable associated with log message.
+     * @deprecated Use {@link #logrb(java.util.logging.Level, java.lang.String,
+     *     java.lang.String, java.util.ResourceBundle, java.lang.String,
+     *     java.lang.Throwable)} instead.
      */
+    @Deprecated
     public void logrb(Level level, String sourceClass, String sourceMethod,
                                         String bundleName, String msg, Throwable thrown) {
         if (!isLoggable(level)) {
@@ -1132,6 +1239,43 @@
         doLog(lr, bundleName);
     }
 
+    /**
+     * Log a message, specifying source class, method, and resource bundle,
+     * with associated Throwable information.
+     * <p>
+     * If the logger is currently enabled for the given message
+     * level then the given arguments are stored in a LogRecord
+     * which is forwarded to all registered output handlers.
+     * <p>
+     * The {@code msg} string is localized using the given resource bundle.
+     * If the resource bundle is {@code null}, then the {@code msg} string is not
+     * localized.
+     * <p>
+     * Note that the thrown argument is stored in the LogRecord thrown
+     * property, rather than the LogRecord parameters property.  Thus it is
+     * processed specially by output Formatters and is not treated
+     * as a formatting parameter to the LogRecord message property.
+     * <p>
+     * @param   level   One of the message level identifiers, e.g., SEVERE
+     * @param   sourceClass    Name of the class that issued the logging request
+     * @param   sourceMethod   Name of the method that issued the logging request
+     * @param   bundle         Resource bundle to localize {@code msg},
+     *                         can be {@code null}
+     * @param   msg     The string message (or a key in the message catalog)
+     * @param   thrown  Throwable associated with the log message.
+     * @since 1.8
+     */
+    public void logrb(Level level, String sourceClass, String sourceMethod,
+                      ResourceBundle bundle, String msg, Throwable thrown) {
+        if (!isLoggable(level)) {
+            return;
+        }
+        LogRecord lr = new LogRecord(level, msg);
+        lr.setSourceClassName(sourceClass);
+        lr.setSourceMethodName(sourceMethod);
+        lr.setThrown(thrown);
+        doLog(lr, bundle);
+    }
 
     //======================================================================
     // Start of convenience methods for logging method entries and returns.
@@ -1490,8 +1634,9 @@
      * (non-null) level value.
      *
      * @param newLevel   the new value for the log level (may be null)
-     * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have LoggingPermission("control").
+     * @throws  SecurityException if a security manager exists,
+     *          this logger is not anonymous, and the caller
+     *          does not have LoggingPermission("control").
      */
     public void setLevel(Level newLevel) throws SecurityException {
         checkPermission();
@@ -1501,6 +1646,10 @@
         }
     }
 
+    final boolean isLevelInitialized() {
+        return levelObject != null;
+    }
+
     /**
      * Get the log Level that has been specified for this Logger.
      * The result may be null, which means that this logger's
@@ -1543,8 +1692,9 @@
      * that essentially act as default handlers for all loggers.
      *
      * @param   handler a logging Handler
-     * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have LoggingPermission("control").
+     * @throws  SecurityException if a security manager exists,
+     *          this logger is not anonymous, and the caller
+     *          does not have LoggingPermission("control").
      */
     public void addHandler(Handler handler) throws SecurityException {
         // Check for null handler
@@ -1559,8 +1709,9 @@
      * Returns silently if the given Handler is not found or is null
      *
      * @param   handler a logging Handler
-     * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have LoggingPermission("control").
+     * @throws  SecurityException if a security manager exists,
+     *          this logger is not anonymous, and the caller
+     *          does not have LoggingPermission("control").
      */
     public void removeHandler(Handler handler) throws SecurityException {
         checkPermission();
@@ -1587,8 +1738,9 @@
      *
      * @param useParentHandlers   true if output is to be sent to the
      *          logger's parent.
-     * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have LoggingPermission("control").
+     * @throws  SecurityException if a security manager exists,
+     *          this logger is not anonymous, and the caller
+     *          does not have LoggingPermission("control").
      */
     public void setUseParentHandlers(boolean useParentHandlers) {
         checkPermission();
@@ -1610,6 +1762,7 @@
     private static ResourceBundle findSystemResourceBundle(final Locale locale) {
         // the resource bundle is in a restricted package
         return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
+            @Override
             public ResourceBundle run() {
                 try {
                     return ResourceBundle.getBundle(SYSTEM_LOGGER_RB_NAME,
@@ -1650,7 +1803,10 @@
         Locale currentLocale = Locale.getDefault();
 
         // Normally we should hit on our simple one entry cache.
-        if (catalog != null && currentLocale.equals(catalogLocale)
+        if (userBundle != null &&
+                name.equals(resourceBundleName)) {
+            return userBundle;
+        } else if (catalog != null && currentLocale.equals(catalogLocale)
                 && name.equals(catalogName)) {
             return catalog;
         }
@@ -1738,6 +1894,46 @@
     }
 
     /**
+     * Sets a resource bundle on this logger.
+     * All messages will be logged using the given resource bundle for its
+     * specific {@linkplain ResourceBundle#getLocale locale}.
+     * @param bundle The resource bundle that this logger shall use.
+     * @throws NullPointerException if the given bundle is {@code null}.
+     * @throws IllegalArgumentException if the given bundle doesn't have a
+     *         {@linkplain ResourceBundle#getBaseBundleName base name},
+     *         or if this logger already has a resource bundle set but
+     *         the given bundle has a different base name.
+     * @throws SecurityException if a security manager exists,
+     *         this logger is not anonymous, and the caller
+     *         does not have LoggingPermission("control").
+     * @since 1.8
+     */
+    public void setResourceBundle(ResourceBundle bundle) {
+        checkPermission();
+
+        // Will throw NPE if bundle is null.
+        final String baseName = bundle.getBaseBundleName();
+
+        // bundle must have a name
+        if (baseName == null || baseName.isEmpty()) {
+            throw new IllegalArgumentException("resource bundle must have a name");
+        }
+
+        synchronized (this) {
+            final boolean canReplaceResourceBundle = resourceBundleName == null
+                    || resourceBundleName.equals(baseName);
+
+            if (!canReplaceResourceBundle) {
+                throw new IllegalArgumentException("can't replace resource bundle");
+            }
+
+
+            userBundle = bundle;
+            resourceBundleName = baseName;
+        }
+    }
+
+    /**
      * Return the parent for this Logger.
      * <p>
      * This method returns the nearest extant parent in the namespace.
@@ -1766,14 +1962,20 @@
      * It should not be called from application code.
      * <p>
      * @param  parent   the new parent logger
-     * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have LoggingPermission("control").
+     * @throws  SecurityException  if a security manager exists and if
+     *          the caller does not have LoggingPermission("control").
      */
     public void setParent(Logger parent) {
         if (parent == null) {
             throw new NullPointerException();
         }
-        checkPermission();
+
+        // check permission for all loggers, including anonymous loggers
+        if (manager == null) {
+            manager = LogManager.getLogManager();
+        }
+        manager.checkPermission();
+
         doSetParent(parent);
     }
 
@@ -1813,7 +2015,7 @@
                 // we didn't have a previous parent
                 ref = manager.new LoggerWeakRef(this);
             }
-            ref.setParentRef(new WeakReference<Logger>(parent));
+            ref.setParentRef(new WeakReference<>(parent));
             parent.kids.add(ref);
 
             // As a result of the reparenting, the effective level
@@ -1895,4 +2097,30 @@
     }
 
 
+    private ResourceBundle getEffectiveResourceBundle() {
+        Logger target = this;
+        if (SYSTEM_LOGGER_RB_NAME.equals(resourceBundleName)) return null;
+        ResourceBundle localRB = getResourceBundle();
+        if (localRB != null) {
+            return localRB;
+        }
+
+        while (target != null) {
+            final ResourceBundle rb = target.userBundle;
+            if (rb != null) {
+                return rb;
+            }
+            final String rbn = target.getResourceBundleName();
+            if (rbn != null) {
+                if (!SYSTEM_LOGGER_RB_NAME.equals(rbn)) {
+                    return findResourceBundle(rbn, true);
+                } else {
+                    return null;
+                }
+            }
+            target = target.getParent();
+        }
+        return null;
+    }
+
 }
--- a/src/share/classes/java/util/regex/Pattern.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/regex/Pattern.java	Wed Oct 30 18:38:20 2013 +0000
@@ -618,7 +618,7 @@
  * are in conformance with the recommendation of <i>Annex C: Compatibility Properties</i>
  * of <a href="http://www.unicode.org/reports/tr18/"><i>Unicode Regular Expression
  * </i></a>, when {@link #UNICODE_CHARACTER_CLASS} flag is specified.
- * <p>
+ *
  * <table border="0" cellpadding="1" cellspacing="0"
  *  summary="predefined and posix character classes in Unicode mode">
  * <tr align="left">
--- a/src/share/classes/java/util/spi/LocaleServiceProvider.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/spi/LocaleServiceProvider.java	Wed Oct 30 18:38:20 2013 +0000
@@ -41,7 +41,7 @@
  * <code>java.util</code> packages use implementations of the provider
  * interfaces to offer support for locales beyond the set of locales
  * supported by the Java runtime environment itself.
- * <p>
+ *
  * <h3>Packaging of Locale Sensitive Service Provider Implementations</h3>
  * Implementations of these locale sensitive services are packaged using the
  * <a href="../../../../technotes/guides/extensions/index.html">Java Extension Mechanism</a>
--- a/src/share/classes/java/util/stream/BaseStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/BaseStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -35,9 +35,10 @@
 import java.util.function.Predicate;
 
 /**
- * A sequence of elements supporting sequential and parallel aggregate
- * operations.  The following example illustrates an aggregate operation using
- * {@link Stream} and {@link IntStream}:
+ * Base interface for streams, which are sequences of elements supporting
+ * sequential and parallel aggregate operations.  The following example
+ * illustrates an aggregate operation using the stream types {@link Stream}
+ * and {@link IntStream}, computing the sum of the weights of the red widgets:
  *
  * <pre>{@code
  *     int sum = widgets.stream()
@@ -46,80 +47,18 @@
  *                      .sum();
  * }</pre>
  *
- * In this example, {@code widgets} is a {@code Collection<Widget>}.  We create
- * a stream of {@code Widget} objects via {@link Collection#stream Collection.stream()},
- * filter it to produce a stream containing only the red widgets, and then
- * transform it into a stream of {@code int} values representing the weight of
- * each red widget. Then this stream is summed to produce a total weight.
- *
- * <p>To perform a computation, stream
- * <a href="package-summary.html#StreamOps">operations</a> are composed into a
- * <em>stream pipeline</em>.  A stream pipeline consists of a source (which
- * might be an array, a collection, a generator function, an IO channel,
- * etc), zero or more <em>intermediate operations</em> (which transform a
- * stream into another stream, such as {@link Stream#filter(Predicate)}), and a
- * <em>terminal operation</em> (which produces a result or side-effect, such
- * as {@link IntStream#sum()} or {@link IntStream#forEach(IntConsumer)}).
- * Streams are lazy; computation on the source data is only performed when the
- * terminal operation is initiated, and source elements are consumed only
- * as needed.
- *
- * <p>Collections and streams, while bearing some superficial similarities,
- * have different goals.  Collections are primarily concerned with the efficient
- * management of, and access to, their elements.  By contrast, streams do not
- * provide a means to directly access or manipulate their elements, and are
- * instead concerned with declaratively describing their source and the
- * computational operations which will be performed in aggregate on that source.
- * However, if the provided stream operations do not offer the desired
- * functionality, the {@link #iterator()} and {@link #spliterator()} operations
- * can be used to perform a controlled traversal.
- *
- * <p>A stream pipeline, like the "widgets" example above, can be viewed as
- * a <em>query</em> on the stream source.  Unless the source was explicitly
- * designed for concurrent modification (such as a {@link ConcurrentHashMap}),
- * unpredictable or erroneous behavior may result from modifying the stream
- * source while it is being queried.
- *
- * <p>Most stream operations accept parameters that describe user-specified
- * behavior, such as the lambda expression {@code w -> w.getWeight()} passed to
- * {@code mapToInt} in the example above.  Such parameters are always instances
- * of a <a href="../function/package-summary.html">functional interface</a> such
- * as {@link java.util.function.Function}, and are often lambda expressions or
- * method references.  These parameters can never be null, should not modify the
- * stream source, and should be
- * <a href="package-summary.html#NonInterference">effectively stateless</a>
- * (their result should not depend on any state that might change during
- * execution of the stream pipeline.)
- *
- * <p>A stream should be operated on (invoking an intermediate or terminal stream
- * operation) only once.  This rules out, for example, "forked" streams, where
- * the same source feeds two or more pipelines, or multiple traversals of the
- * same stream.  A stream implementation may throw {@link IllegalStateException}
- * if it detects that the stream is being reused. However, since some stream
- * operations may return their receiver rather than a new stream object, it may
- * not be possible to detect reuse in all cases.
- *
- * <p>Streams have a {@link #close()} method and implement {@link AutoCloseable},
- * but nearly all stream instances do not actually need to be closed after use.
- * Generally, only streams whose source is an IO channel (such as those returned
- * by {@link Files#lines(Path, Charset)}) will require closing.  Most streams
- * are backed by collections, arrays, or generating functions, which require no
- * special resource management.  (If a stream does require closing, it can be
- * declared as a resource in a {@code try}-with-resources statement.)
- *
- * <p>Stream pipelines may execute either sequentially or in
- * <a href="package-summary.html#Parallelism">parallel</a>.  This
- * execution mode is a property of the stream.  Streams are created
- * with an initial choice of sequential or parallel execution.  (For example,
- * {@link Collection#stream() Collection.stream()} creates a sequential stream,
- * and {@link Collection#parallelStream() Collection.parallelStream()} creates
- * a parallel one.)  This choice of execution mode may be modified by the
- * {@link #sequential()} or {@link #parallel()} methods, and may be queried with
- * the {@link #isParallel()} method.
+ * See the class documentation for {@link Stream} and the package documentation
+ * for <a href="package-summary.html">java.util.stream</a> for additional
+ * specification of streams, stream operations, stream pipelines, and
+ * parallelism, which governs the behavior of all stream types.
  *
  * @param <T> the type of the stream elements
  * @param <S> the type of of the stream implementing {@code BaseStream}
  * @since 1.8
+ * @see Stream
+ * @see IntStream
+ * @see LongStream
+ * @see DoubleStream
  * @see <a href="package-summary.html">java.util.stream</a>
  */
 public interface BaseStream<T, S extends BaseStream<T, S>>
--- a/src/share/classes/java/util/stream/Collectors.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/Collectors.java	Wed Oct 30 18:38:20 2013 +0000
@@ -462,7 +462,7 @@
      */
     public static <T> Collector<T, ?, Integer>
     summingInt(ToIntFunction<? super T> mapper) {
-        return new CollectorImpl<T, int[], Integer>(
+        return new CollectorImpl<>(
                 () -> new int[1],
                 (a, t) -> { a[0] += mapper.applyAsInt(t); },
                 (a, b) -> { a[0] += b[0]; return a; },
@@ -480,7 +480,7 @@
      */
     public static <T> Collector<T, ?, Long>
     summingLong(ToLongFunction<? super T> mapper) {
-        return new CollectorImpl<T, long[], Long>(
+        return new CollectorImpl<>(
                 () -> new long[1],
                 (a, t) -> { a[0] += mapper.applyAsLong(t); },
                 (a, b) -> { a[0] += b[0]; return a; },
@@ -505,7 +505,7 @@
      */
     public static <T> Collector<T, ?, Double>
     summingDouble(ToDoubleFunction<? super T> mapper) {
-        return new CollectorImpl<T, double[], Double>(
+        return new CollectorImpl<>(
                 () -> new double[1],
                 (a, t) -> { a[0] += mapper.applyAsDouble(t); },
                 (a, b) -> { a[0] += b[0]; return a; },
@@ -523,7 +523,7 @@
      */
     public static <T> Collector<T, ?, Double>
     averagingInt(ToIntFunction<? super T> mapper) {
-        return new CollectorImpl<T, long[], Double>(
+        return new CollectorImpl<>(
                 () -> new long[2],
                 (a, t) -> { a[0] += mapper.applyAsInt(t); a[1]++; },
                 (a, b) -> { a[0] += b[0]; a[1] += b[1]; return a; },
@@ -541,7 +541,7 @@
      */
     public static <T> Collector<T, ?, Double>
     averagingLong(ToLongFunction<? super T> mapper) {
-        return new CollectorImpl<T, long[], Double>(
+        return new CollectorImpl<>(
                 () -> new long[2],
                 (a, t) -> { a[0] += mapper.applyAsLong(t); a[1]++; },
                 (a, b) -> { a[0] += b[0]; a[1] += b[1]; return a; },
@@ -566,7 +566,7 @@
      */
     public static <T> Collector<T, ?, Double>
     averagingDouble(ToDoubleFunction<? super T> mapper) {
-        return new CollectorImpl<T, double[], Double>(
+        return new CollectorImpl<>(
                 () -> new double[2],
                 (a, t) -> { a[0] += mapper.applyAsDouble(t); a[1]++; },
                 (a, b) -> { a[0] += b[0]; a[1] += b[1]; return a; },
@@ -723,6 +723,14 @@
      *     groupingBy(classifier, toList());
      * }</pre>
      *
+     * @implNote
+     * The returned {@code Collector} is not concurrent.  For parallel stream
+     * pipelines, the {@code combiner} function operates by merging the keys
+     * from one map into another, which can be an expensive operation.  If
+     * preservation of the order in which elements appear in the resulting {@code Map}
+     * collector is not required, using {@link #groupingByConcurrent(Function)}
+     * may offer better parallel performance.
+     *
      * @param <T> the type of the input elements
      * @param <K> the type of the keys
      * @param classifier the classifier function mapping input elements to keys
@@ -759,6 +767,14 @@
      *                                              mapping(Person::getLastName, toSet())));
      * }</pre>
      *
+     * @implNote
+     * The returned {@code Collector} is not concurrent.  For parallel stream
+     * pipelines, the {@code combiner} function operates by merging the keys
+     * from one map into another, which can be an expensive operation.  If
+     * preservation of the order in which elements are presented to the downstream
+     * collector is not required, using {@link #groupingByConcurrent(Function, Collector)}
+     * may offer better parallel performance.
+     *
      * @param <T> the type of the input elements
      * @param <K> the type of the keys
      * @param <A> the intermediate accumulation type of the downstream collector
@@ -798,6 +814,14 @@
      *                                              mapping(Person::getLastName, toSet())));
      * }</pre>
      *
+     * @implNote
+     * The returned {@code Collector} is not concurrent.  For parallel stream
+     * pipelines, the {@code combiner} function operates by merging the keys
+     * from one map into another, which can be an expensive operation.  If
+     * preservation of the order in which elements are presented to the downstream
+     * collector is not required, using {@link #groupingByConcurrent(Function, Supplier, Collector)}
+     * may offer better parallel performance.
+     *
      * @param <T> the type of the input elements
      * @param <K> the type of the keys
      * @param <A> the intermediate accumulation type of the downstream collector
@@ -871,7 +895,7 @@
      * @param <T> the type of the input elements
      * @param <K> the type of the keys
      * @param classifier a classifier function mapping input elements to keys
-     * @return a {@code Collector} implementing the group-by operation
+     * @return a concurrent, unordered {@code Collector} implementing the group-by operation
      *
      * @see #groupingBy(Function)
      * @see #groupingByConcurrent(Function, Collector)
@@ -912,7 +936,7 @@
      * @param <D> the result type of the downstream reduction
      * @param classifier a classifier function mapping input elements to keys
      * @param downstream a {@code Collector} implementing the downstream reduction
-     * @return a {@code Collector} implementing the cascaded group-by operation
+     * @return a concurrent, unordered {@code Collector} implementing the cascaded group-by operation
      *
      * @see #groupingBy(Function, Collector)
      * @see #groupingByConcurrent(Function)
@@ -958,7 +982,7 @@
      * @param downstream a {@code Collector} implementing the downstream reduction
      * @param mapFactory a function which, when called, produces a new empty
      *                   {@code ConcurrentMap} of the desired type
-     * @return a {@code Collector} implementing the cascaded group-by operation
+     * @return a concurrent, unordered {@code Collector} implementing the cascaded group-by operation
      *
      * @see #groupingByConcurrent(Function)
      * @see #groupingByConcurrent(Function, Collector)
@@ -1072,7 +1096,7 @@
     }
 
     /**
-     * Returns a {@code Collector} that accumulate elements into a
+     * Returns a {@code Collector} that accumulates elements into a
      * {@code Map} whose keys and values are the result of applying the provided
      * mapping functions to the input elements.
      *
@@ -1101,6 +1125,14 @@
      *                                         Functions.identity());
      * }</pre>
      *
+     * @implNote
+     * The returned {@code Collector} is not concurrent.  For parallel stream
+     * pipelines, the {@code combiner} function operates by merging the keys
+     * from one map into another, which can be an expensive operation.  If it is
+     * not required that results are inserted into the {@code Map} in encounter
+     * order, using {@link #toConcurrentMap(Function, Function)}
+     * may offer better parallel performance.
+     *
      * @param <T> the type of the input elements
      * @param <K> the output type of the key mapping function
      * @param <U> the output type of the value mapping function
@@ -1121,7 +1153,7 @@
     }
 
     /**
-     * Returns a {@code Collector} that accumulate elements into a
+     * Returns a {@code Collector} that accumulates elements into a
      * {@code Map} whose keys and values are the result of applying the provided
      * mapping functions to the input elements.
      *
@@ -1146,6 +1178,14 @@
      *                                       (s, a) -> s + ", " + a));
      * }</pre>
      *
+     * @implNote
+     * The returned {@code Collector} is not concurrent.  For parallel stream
+     * pipelines, the {@code combiner} function operates by merging the keys
+     * from one map into another, which can be an expensive operation.  If it is
+     * not required that results are merged into the {@code Map} in encounter
+     * order, using {@link #toConcurrentMap(Function, Function, BinaryOperator)}
+     * may offer better parallel performance.
+     *
      * @param <T> the type of the input elements
      * @param <K> the output type of the key mapping function
      * @param <U> the output type of the value mapping function
@@ -1172,7 +1212,7 @@
     }
 
     /**
-     * Returns a {@code Collector} that accumulate elements into a
+     * Returns a {@code Collector} that accumulates elements into a
      * {@code Map} whose keys and values are the result of applying the provided
      * mapping functions to the input elements.
      *
@@ -1182,6 +1222,14 @@
      * results are merged using the provided merging function.  The {@code Map}
      * is created by a provided supplier function.
      *
+     * @implNote
+     * The returned {@code Collector} is not concurrent.  For parallel stream
+     * pipelines, the {@code combiner} function operates by merging the keys
+     * from one map into another, which can be an expensive operation.  If it is
+     * not required that results are merged into the {@code Map} in encounter
+     * order, using {@link #toConcurrentMap(Function, Function, BinaryOperator, Supplier)}
+     * may offer better parallel performance.
+     *
      * @param <T> the type of the input elements
      * @param <K> the output type of the key mapping function
      * @param <U> the output type of the value mapping function
@@ -1215,7 +1263,7 @@
     }
 
     /**
-     * Returns a {@code Collector} that accumulate elements into a
+     * Returns a concurrent {@code Collector} that accumulates elements into a
      * {@code ConcurrentMap} whose keys and values are the result of applying
      * the provided mapping functions to the input elements.
      *
@@ -1252,7 +1300,7 @@
      * @param <U> the output type of the value mapping function
      * @param keyMapper the mapping function to produce keys
      * @param valueMapper the mapping function to produce values
-     * @return a concurrent {@code Collector} which collects elements into a
+     * @return a concurrent, unordered {@code Collector} which collects elements into a
      * {@code ConcurrentMap} whose keys are the result of applying a key mapping
      * function to the input elements, and whose values are the result of
      * applying a value mapping function to the input elements
@@ -1268,7 +1316,7 @@
     }
 
     /**
-     * Returns a {@code Collector} that accumulate elements into a
+     * Returns a concurrent {@code Collector} that accumulates elements into a
      * {@code ConcurrentMap} whose keys and values are the result of applying
      * the provided mapping functions to the input elements.
      *
@@ -1303,7 +1351,7 @@
      * @param mergeFunction a merge function, used to resolve collisions between
      *                      values associated with the same key, as supplied
      *                      to {@link Map#merge(Object, Object, BiFunction)}
-     * @return a concurrent {@code Collector} which collects elements into a
+     * @return a concurrent, unordered {@code Collector} which collects elements into a
      * {@code ConcurrentMap} whose keys are the result of applying a key mapping
      * function to the input elements, and whose values are the result of
      * applying a value mapping function to all input elements equal to the key
@@ -1322,7 +1370,7 @@
     }
 
     /**
-     * Returns a {@code Collector} that accumulate elements into a
+     * Returns a concurrent {@code Collector} that accumulates elements into a
      * {@code ConcurrentMap} whose keys and values are the result of applying
      * the provided mapping functions to the input elements.
      *
@@ -1345,7 +1393,7 @@
      *                      to {@link Map#merge(Object, Object, BiFunction)}
      * @param mapSupplier a function which returns a new, empty {@code Map} into
      *                    which the results will be inserted
-     * @return a concurrent {@code Collector} which collects elements into a
+     * @return a concurrent, unordered {@code Collector} which collects elements into a
      * {@code ConcurrentMap} whose keys are the result of applying a key mapping
      * function to the input elements, and whose values are the result of
      * applying a value mapping function to all input elements equal to the key
--- a/src/share/classes/java/util/stream/DoublePipeline.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/DoublePipeline.java	Wed Oct 30 18:38:20 2013 +0000
@@ -340,25 +340,18 @@
     }
 
     @Override
-    public final DoubleStream substream(long startingOffset) {
-        if (startingOffset < 0)
-            throw new IllegalArgumentException(Long.toString(startingOffset));
-        if (startingOffset == 0)
+    public final DoubleStream skip(long n) {
+        if (n < 0)
+            throw new IllegalArgumentException(Long.toString(n));
+        if (n == 0)
             return this;
         else {
             long limit = -1;
-            return SliceOps.makeDouble(this, startingOffset, limit);
+            return SliceOps.makeDouble(this, n, limit);
         }
     }
 
     @Override
-    public final DoubleStream substream(long startingOffset, long endingOffset) {
-        if (startingOffset < 0 || endingOffset < startingOffset)
-            throw new IllegalArgumentException(String.format("substream(%d, %d)", startingOffset, endingOffset));
-        return SliceOps.makeDouble(this, startingOffset, endingOffset - startingOffset);
-    }
-
-    @Override
     public final DoubleStream sorted() {
         return SortedOps.makeDouble(this);
     }
--- a/src/share/classes/java/util/stream/DoubleStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/DoubleStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -50,9 +50,13 @@
 import java.util.function.Supplier;
 
 /**
- * A sequence of elements supporting sequential and parallel aggregate
- * operations.  The following example illustrates an aggregate operation using
- * {@link Stream} and {@link DoubleStream}:
+ * A sequence of primitive double-valued elements supporting sequential and parallel
+ * aggregate operations.  This is the {@code double} primitive specialization of
+ * {@link Stream}.
+ *
+ * <p>The following example illustrates an aggregate operation using
+ * {@link Stream} and {@link DoubleStream}, computing the sum of the weights of the
+ * red widgets:
  *
  * <pre>{@code
  *     double sum = widgets.stream()
@@ -61,78 +65,13 @@
  *                         .sum();
  * }</pre>
  *
- * In this example, {@code widgets} is a {@code Collection<Widget>}.  We create
- * a stream of {@code Widget} objects via {@link Collection#stream Collection.stream()},
- * filter it to produce a stream containing only the red widgets, and then
- * transform it into a stream of {@code double} values representing the weight of
- * each red widget. Then this stream is summed to produce a total weight.
- *
- * <p>To perform a computation, stream
- * <a href="package-summary.html#StreamOps">operations</a> are composed into a
- * <em>stream pipeline</em>.  A stream pipeline consists of a source (which
- * might be an array, a collection, a generator function, an IO channel,
- * etc), zero or more <em>intermediate operations</em> (which transform a
- * stream into another stream, such as {@link DoubleStream#filter(DoublePredicate)}), and a
- * <em>terminal operation</em> (which produces a result or side-effect, such
- * as {@link DoubleStream#sum()} or {@link DoubleStream#forEach(DoubleConsumer)}.
- * Streams are lazy; computation on the source data is only performed when the
- * terminal operation is initiated, and source elements are consumed only
- * as needed.
- *
- * <p>Collections and streams, while bearing some superficial similarities,
- * have different goals.  Collections are primarily concerned with the efficient
- * management of, and access to, their elements.  By contrast, streams do not
- * provide a means to directly access or manipulate their elements, and are
- * instead concerned with declaratively describing their source and the
- * computational operations which will be performed in aggregate on that source.
- * However, if the provided stream operations do not offer the desired
- * functionality, the {@link #iterator()} and {@link #spliterator()} operations
- * can be used to perform a controlled traversal.
- *
- * <p>A stream pipeline, like the "widgets" example above, can be viewed as
- * a <em>query</em> on the stream source.  Unless the source was explicitly
- * designed for concurrent modification (such as a {@link ConcurrentHashMap}),
- * unpredictable or erroneous behavior may result from modifying the stream
- * source while it is being queried.
- *
- * <p>Most stream operations accept parameters that describe user-specified
- * behavior, such as the lambda expression {@code w -> w.getWeight()} passed to
- * {@code mapToDouble} in the example above.  Such parameters are always instances
- * of a <a href="../function/package-summary.html">functional interface</a> such
- * as {@link java.util.function.Function}, and are often lambda expressions or
- * method references.  These parameters can never be null, should not modify the
- * stream source, and should be
- * <a href="package-summary.html#NonInterference">effectively stateless</a>
- * (their result should not depend on any state that might change during
- * execution of the stream pipeline.)
- *
- * <p>A stream should be operated on (invoking an intermediate or terminal stream
- * operation) only once.  This rules out, for example, "forked" streams, where
- * the same source feeds two or more pipelines, or multiple traversals of the
- * same stream.  A stream implementation may throw {@link IllegalStateException}
- * if it detects that the stream is being reused. However, since some stream
- * operations may return their receiver rather than a new stream object, it may
- * not be possible to detect reuse in all cases.
- *
- * <p>Streams have a {@link #close()} method and implement {@link AutoCloseable},
- * but nearly all stream instances do not actually need to be closed after use.
- * Generally, only streams whose source is an IO channel (such as those returned
- * by {@link Files#lines(Path, Charset)}) will require closing.  Most streams
- * are backed by collections, arrays, or generating functions, which require no
- * special resource management.  (If a stream does require closing, it can be
- * declared as a resource in a {@code try}-with-resources statement.)
- *
- * <p>Stream pipelines may execute either sequentially or in
- * <a href="package-summary.html#Parallelism">parallel</a>.  This
- * execution mode is a property of the stream.  Streams are created
- * with an initial choice of sequential or parallel execution.  (For example,
- * {@link Collection#stream() Collection.stream()} creates a sequential stream,
- * and {@link Collection#parallelStream() Collection.parallelStream()} creates
- * a parallel one.)  This choice of execution mode may be modified by the
- * {@link #sequential()} or {@link #parallel()} methods, and may be queried with
- * the {@link #isParallel()} method.
+ * See the class documentation for {@link Stream} and the package documentation
+ * for <a href="package-summary.html">java.util.stream</a> for additional
+ * specification of streams, stream operations, stream pipelines, and
+ * parallelism.
  *
  * @since 1.8
+ * @see Stream
  * @see <a href="package-summary.html">java.util.stream</a>
  */
 public interface DoubleStream extends BaseStream<Double, DoubleStream> {
@@ -144,9 +83,10 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">
-     *                  non-interfering, stateless</a> predicate to apply to
-     *                  each element to determine if it should be included
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to each element to determine if it
+     *                  should be included
      * @return the new stream
      */
     DoubleStream filter(DoublePredicate predicate);
@@ -158,9 +98,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to
-     *               each element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     DoubleStream map(DoubleUnaryOperator mapper);
@@ -173,9 +113,9 @@
      *     intermediate operation</a>.
      *
      * @param <U> the element type of the new stream
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper);
@@ -187,9 +127,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     IntStream mapToInt(DoubleToIntFunction mapper);
@@ -201,9 +141,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     LongStream mapToLong(DoubleToLongFunction mapper);
@@ -218,10 +158,10 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to
-     *               each element which produces an {@code DoubleStream} of new
-     *               values
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element which produces a
+     *               {@code DoubleStream} of new values
      * @return the new stream
      * @see Stream#flatMap(Function)
      */
@@ -276,8 +216,8 @@
      * }</pre>
      *
      * @param action a <a href="package-summary.html#NonInterference">
-     *                 non-interfering</a> action to perform on the elements as
-     *                 they are consumed from the stream
+     *               non-interfering</a> action to perform on the elements as
+     *               they are consumed from the stream
      * @return the new stream
      */
     DoubleStream peek(DoubleConsumer action);
@@ -289,6 +229,20 @@
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * stateful intermediate operation</a>.
      *
+     * @apiNote
+     * While {@code limit()} is generally a cheap operation on sequential
+     * stream pipelines, it can be quite expensive on ordered parallel pipelines,
+     * especially for large values of {@code maxSize}, since {@code limit(n)}
+     * is constrained to return not just any <em>n</em> elements, but the
+     * <em>first n</em> elements in the encounter order.  Using an unordered
+     * stream source (such as {@link #generate(DoubleSupplier)}) or removing the
+     * ordering constraint with {@link #unordered()} may result in significant
+     * speedups of {@code limit()} in parallel pipelines, if the semantics of
+     * your situation permit.  If consistency with encounter order is required,
+     * and you are experiencing poor performance or memory utilization with
+     * {@code limit()} in parallel pipelines, switching to sequential execution
+     * with {@link #sequential()} may improve performance.
+     *
      * @param maxSize the number of elements the stream should be limited to
      * @return the new stream
      * @throws IllegalArgumentException if {@code maxSize} is negative
@@ -297,37 +251,32 @@
 
     /**
      * Returns a stream consisting of the remaining elements of this stream
-     * after discarding the first {@code startInclusive} elements of the stream.
-     * If this stream contains fewer than {@code startInclusive} elements then an
+     * after discarding the first {@code n} elements of the stream.
+     * If this stream contains fewer than {@code n} elements then an
      * empty stream will be returned.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">stateful
      * intermediate operation</a>.
      *
-     * @param startInclusive the number of leading elements to skip
+     * @apiNote
+     * While {@code skip()} is generally a cheap operation on sequential
+     * stream pipelines, it can be quite expensive on ordered parallel pipelines,
+     * especially for large values of {@code n}, since {@code skip(n)}
+     * is constrained to skip not just any <em>n</em> elements, but the
+     * <em>first n</em> elements in the encounter order.  Using an unordered
+     * stream source (such as {@link #generate(DoubleSupplier)}) or removing the
+     * ordering constraint with {@link #unordered()} may result in significant
+     * speedups of {@code skip()} in parallel pipelines, if the semantics of
+     * your situation permit.  If consistency with encounter order is required,
+     * and you are experiencing poor performance or memory utilization with
+     * {@code skip()} in parallel pipelines, switching to sequential execution
+     * with {@link #sequential()} may improve performance.
+     *
+     * @param n the number of leading elements to skip
      * @return the new stream
-     * @throws IllegalArgumentException if {@code startInclusive} is negative
+     * @throws IllegalArgumentException if {@code n} is negative
      */
-    DoubleStream substream(long startInclusive);
-
-    /**
-     * Returns a stream consisting of the remaining elements of this stream
-     * after discarding the first {@code startInclusive} elements and truncating
-     * the result to be no longer than {@code endExclusive - startInclusive}
-     * elements in length. If this stream contains fewer than
-     * {@code startInclusive} elements then an empty stream will be returned.
-     *
-     * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
-     * stateful intermediate operation</a>.
-     *
-     * @param startInclusive the starting position of the substream, inclusive
-     * @param endExclusive the ending position of the substream, exclusive
-     * @return the new stream
-     * @throws IllegalArgumentException if {@code startInclusive} or
-     * {@code endExclusive} is negative or {@code startInclusive} is greater
-     * than {@code endExclusive}
-     */
-    DoubleStream substream(long startInclusive, long endExclusive);
+    DoubleStream skip(long n);
 
     /**
      * Performs an action for each element of this stream.
@@ -414,9 +363,10 @@
      * synchronization and with greatly reduced risk of data races.
      *
      * @param identity the identity value for the accumulating function
-     * @param op an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for combining two values
+     * @param op an <a href="package-summary.html#Associativity">associative</a>,
+     *           <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *           <a href="package-summary.html#Statelessness">stateless</a>
+     *           function for combining two values
      * @return the result of the reduction
      * @see #sum()
      * @see #min()
@@ -453,9 +403,10 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param op an <a href="package-summary.html#Associativity">associative</a>
-     *           <a href="package-summary.html#NonInterference">non-interfering,
-     *           stateless</a> function for combining two values
+     * @param op an <a href="package-summary.html#Associativity">associative</a>,
+     *           <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *           <a href="package-summary.html#Statelessness">stateless</a>
+     *           function for combining two values
      * @return the result of the reduction
      * @see #reduce(double, DoubleBinaryOperator)
      */
@@ -486,14 +437,15 @@
      * @param supplier a function that creates a new result container. For a
      *                 parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
-     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for incorporating an additional
-     *                    element into a result
-     * @param combiner an <a href="package-summary.html#Associativity">associative</a>
-     *                 <a href="package-summary.html#NonInterference">non-interfering,
-     *                 stateless</a> function for combining two values, which
-     *                 must be compatible with the accumulator function
+     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for incorporating an additional element into a result
+     * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for combining two values, which must be
+     *                    compatible with the accumulator function
      * @return the result of the reduction
      * @see Stream#collect(Supplier, BiConsumer, BiConsumer)
      */
@@ -535,8 +487,8 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @apiNote Sorting values by increasing absolute magnitude tends to yield
-     * more accurate results.
+     * @apiNote Elements sorted by increasing absolute magnitude tend
+     * to yield more accurate results.
      *
      * @return the sum of elements in this stream
      */
@@ -642,48 +594,67 @@
     /**
      * Returns whether any elements of this stream match the provided
      * predicate.  May not evaluate the predicate on all elements if not
-     * necessary for determining the result.
+     * necessary for determining the result.  If the stream is empty then
+     * {@code false} is returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
+     * @apiNote
+     * This method evaluates the <em>existential quantification</em> of the
+     * predicate over the elements of the stream (for some x P(x)).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
      * @return {@code true} if any elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * predicate, otherwise {@code false}
      */
     boolean anyMatch(DoublePredicate predicate);
 
     /**
      * Returns whether all elements of this stream match the provided predicate.
      * May not evaluate the predicate on all elements if not necessary for
-     * determining the result.
+     * determining the result.  If the stream is empty then {@code true} is
+     * returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
-     * @return {@code true} if all elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * @apiNote
+     * This method evaluates the <em>universal quantification</em> of the
+     * predicate over the elements of the stream (for all x P(x)).  If the
+     * stream is empty, the quantification is said to be <em>vacuously
+     * satisfied</em> and is always {@code true} (regardless of P(x)).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
+     * @return {@code true} if either all elements of the stream match the
+     * provided predicate or the stream is empty, otherwise {@code false}
      */
     boolean allMatch(DoublePredicate predicate);
 
     /**
      * Returns whether no elements of this stream match the provided predicate.
      * May not evaluate the predicate on all elements if not necessary for
-     * determining the result.
+     * determining the result.  If the stream is empty then {@code true} is
+     * returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
-     * @return {@code true} if no elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * @apiNote
+     * This method evaluates the <em>universal quantification</em> of the
+     * negated predicate over the elements of the stream (for all x ~P(x)).  If
+     * the stream is empty, the quantification is said to be vacuously satisfied
+     * and is always {@code true}, regardless of P(x).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
+     * @return {@code true} if either no elements of the stream match the
+     * provided predicate or the stream is empty, otherwise {@code false}
      */
     boolean noneMatch(DoublePredicate predicate);
 
@@ -823,12 +794,12 @@
     }
 
     /**
-     * Returns a sequential stream where each element is generated by
-     * the provided {@code DoubleSupplier}.  This is suitable for generating
-     * constant streams, streams of random elements, etc.
+     * Returns an infinite sequential unordered stream where each element is
+     * generated by the provided {@code DoubleSupplier}.  This is suitable for
+     * generating constant streams, streams of random elements, etc.
      *
      * @param s the {@code DoubleSupplier} for generated elements
-     * @return a new sequential {@code DoubleStream}
+     * @return a new infinite sequential unordered {@code DoubleStream}
      */
     public static DoubleStream generate(DoubleSupplier s) {
         Objects.requireNonNull(s);
@@ -839,11 +810,16 @@
     /**
      * Creates a lazily concatenated stream whose elements are all the
      * elements of the first stream followed by all the elements of the
-     * second stream. The resulting stream is ordered if both
+     * second stream.  The resulting stream is ordered if both
      * of the input streams are ordered, and parallel if either of the input
      * streams is parallel.  When the resulting stream is closed, the close
      * handlers for both input streams are invoked.
      *
+     * @implNote
+     * Use caution when constructing streams from repeated concatenation.
+     * Accessing an element of a deeply concatenated stream can result in deep
+     * call chains, or even {@code StackOverflowException}.
+     *
      * @param a the first stream
      * @param b the second stream
      * @return the concatenation of the two input streams
--- a/src/share/classes/java/util/stream/IntPipeline.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/IntPipeline.java	Wed Oct 30 18:38:20 2013 +0000
@@ -368,32 +368,21 @@
 
     // Stateful intermediate ops from IntStream
 
-    private IntStream slice(long skip, long limit) {
-        return SliceOps.makeInt(this, skip, limit);
-    }
-
     @Override
     public final IntStream limit(long maxSize) {
         if (maxSize < 0)
             throw new IllegalArgumentException(Long.toString(maxSize));
-        return slice(0, maxSize);
+        return SliceOps.makeInt(this, 0, maxSize);
     }
 
     @Override
-    public final IntStream substream(long startingOffset) {
-        if (startingOffset < 0)
-            throw new IllegalArgumentException(Long.toString(startingOffset));
-        if (startingOffset == 0)
+    public final IntStream skip(long n) {
+        if (n < 0)
+            throw new IllegalArgumentException(Long.toString(n));
+        if (n == 0)
             return this;
         else
-            return slice(startingOffset, -1);
-    }
-
-    @Override
-    public final IntStream substream(long startingOffset, long endingOffset) {
-        if (startingOffset < 0 || endingOffset < startingOffset)
-            throw new IllegalArgumentException(String.format("substream(%d, %d)", startingOffset, endingOffset));
-        return slice(startingOffset, endingOffset - startingOffset);
+            return SliceOps.makeInt(this, n, -1);
     }
 
     @Override
--- a/src/share/classes/java/util/stream/IntStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/IntStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -24,11 +24,7 @@
  */
 package java.util.stream;
 
-import java.nio.charset.Charset;
-import java.nio.file.Files;
-import java.nio.file.Path;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.IntSummaryStatistics;
 import java.util.Objects;
 import java.util.OptionalDouble;
@@ -36,7 +32,6 @@
 import java.util.PrimitiveIterator;
 import java.util.Spliterator;
 import java.util.Spliterators;
-import java.util.concurrent.ConcurrentHashMap;
 import java.util.function.BiConsumer;
 import java.util.function.Function;
 import java.util.function.IntBinaryOperator;
@@ -51,9 +46,13 @@
 import java.util.function.Supplier;
 
 /**
- * A sequence of elements supporting sequential and parallel aggregate
- * operations.  The following example illustrates an aggregate operation using
- * {@link Stream} and {@link IntStream}:
+ * A sequence of primitive int-valued elements supporting sequential and parallel
+ * aggregate operations.  This is the {@code int} primitive specialization of
+ * {@link Stream}.
+ *
+ * <p>The following example illustrates an aggregate operation using
+ * {@link Stream} and {@link IntStream}, computing the sum of the weights of the
+ * red widgets:
  *
  * <pre>{@code
  *     int sum = widgets.stream()
@@ -62,78 +61,13 @@
  *                      .sum();
  * }</pre>
  *
- * In this example, {@code widgets} is a {@code Collection<Widget>}.  We create
- * a stream of {@code Widget} objects via {@link Collection#stream Collection.stream()},
- * filter it to produce a stream containing only the red widgets, and then
- * transform it into a stream of {@code int} values representing the weight of
- * each red widget. Then this stream is summed to produce a total weight.
- *
- * <p>To perform a computation, stream
- * <a href="package-summary.html#StreamOps">operations</a> are composed into a
- * <em>stream pipeline</em>.  A stream pipeline consists of a source (which
- * might be an array, a collection, a generator function, an IO channel,
- * etc), zero or more <em>intermediate operations</em> (which transform a
- * stream into another stream, such as {@link IntStream#filter(IntPredicate)}), and a
- * <em>terminal operation</em> (which produces a result or side-effect, such
- * as {@link IntStream#sum()} or {@link IntStream#forEach(IntConsumer)}).
- * Streams are lazy; computation on the source data is only performed when the
- * terminal operation is initiated, and source elements are consumed only
- * as needed.
- *
- * <p>Collections and streams, while bearing some superficial similarities,
- * have different goals.  Collections are primarily concerned with the efficient
- * management of, and access to, their elements.  By contrast, streams do not
- * provide a means to directly access or manipulate their elements, and are
- * instead concerned with declaratively describing their source and the
- * computational operations which will be performed in aggregate on that source.
- * However, if the provided stream operations do not offer the desired
- * functionality, the {@link #iterator()} and {@link #spliterator()} operations
- * can be used to perform a controlled traversal.
- *
- * <p>A stream pipeline, like the "widgets" example above, can be viewed as
- * a <em>query</em> on the stream source.  Unless the source was explicitly
- * designed for concurrent modification (such as a {@link ConcurrentHashMap}),
- * unpredictable or erroneous behavior may result from modifying the stream
- * source while it is being queried.
- *
- * <p>Most stream operations accept parameters that describe user-specified
- * behavior, such as the lambda expression {@code w -> w.getWeight()} passed to
- * {@code mapToInt} in the example above.  Such parameters are always instances
- * of a <a href="../function/package-summary.html">functional interface</a> such
- * as {@link java.util.function.Function}, and are often lambda expressions or
- * method references.  These parameters can never be null, should not modify the
- * stream source, and should be
- * <a href="package-summary.html#NonInterference">effectively stateless</a>
- * (their result should not depend on any state that might change during
- * execution of the stream pipeline.)
- *
- * <p>A stream should be operated on (invoking an intermediate or terminal stream
- * operation) only once.  This rules out, for example, "forked" streams, where
- * the same source feeds two or more pipelines, or multiple traversals of the
- * same stream.  A stream implementation may throw {@link IllegalStateException}
- * if it detects that the stream is being reused. However, since some stream
- * operations may return their receiver rather than a new stream object, it may
- * not be possible to detect reuse in all cases.
- *
- * <p>Streams have a {@link #close()} method and implement {@link AutoCloseable},
- * but nearly all stream instances do not actually need to be closed after use.
- * Generally, only streams whose source is an IO channel (such as those returned
- * by {@link Files#lines(Path, Charset)}) will require closing.  Most streams
- * are backed by collections, arrays, or generating functions, which require no
- * special resource management.  (If a stream does require closing, it can be
- * declared as a resource in a {@code try}-with-resources statement.)
- *
- * <p>Stream pipelines may execute either sequentially or in
- * <a href="package-summary.html#Parallelism">parallel</a>.  This
- * execution mode is a property of the stream.  Streams are created
- * with an initial choice of sequential or parallel execution.  (For example,
- * {@link Collection#stream() Collection.stream()} creates a sequential stream,
- * and {@link Collection#parallelStream() Collection.parallelStream()} creates
- * a parallel one.)  This choice of execution mode may be modified by the
- * {@link #sequential()} or {@link #parallel()} methods, and may be queried with
- * the {@link #isParallel()} method.
+ * See the class documentation for {@link Stream} and the package documentation
+ * for <a href="package-summary.html">java.util.stream</a> for additional
+ * specification of streams, stream operations, stream pipelines, and
+ * parallelism.
  *
  * @since 1.8
+ * @see Stream
  * @see <a href="package-summary.html">java.util.stream</a>
  */
 public interface IntStream extends BaseStream<Integer, IntStream> {
@@ -145,9 +79,10 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">
-     *                  non-interfering, stateless</a> predicate to apply to
-     *                  each element to determine if it should be included
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to each element to determine if it
+     *                  should be included
      * @return the new stream
      */
     IntStream filter(IntPredicate predicate);
@@ -159,9 +94,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     IntStream map(IntUnaryOperator mapper);
@@ -174,9 +109,9 @@
      *     intermediate operation</a>.
      *
      * @param <U> the element type of the new stream
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     <U> Stream<U> mapToObj(IntFunction<? extends U> mapper);
@@ -188,9 +123,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     LongStream mapToLong(IntToLongFunction mapper);
@@ -202,9 +137,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     DoubleStream mapToDouble(IntToDoubleFunction mapper);
@@ -219,10 +154,10 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to
-     *               each element which produces an {@code IntStream} of new
-     *               values
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element which produces an
+     *               {@code IntStream} of new values
      * @return the new stream
      * @see Stream#flatMap(Function)
      */
@@ -287,6 +222,20 @@
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * stateful intermediate operation</a>.
      *
+     * @apiNote
+     * While {@code limit()} is generally a cheap operation on sequential
+     * stream pipelines, it can be quite expensive on ordered parallel pipelines,
+     * especially for large values of {@code maxSize}, since {@code limit(n)}
+     * is constrained to return not just any <em>n</em> elements, but the
+     * <em>first n</em> elements in the encounter order.  Using an unordered
+     * stream source (such as {@link #generate(IntSupplier)}) or removing the
+     * ordering constraint with {@link #unordered()} may result in significant
+     * speedups of {@code limit()} in parallel pipelines, if the semantics of
+     * your situation permit.  If consistency with encounter order is required,
+     * and you are experiencing poor performance or memory utilization with
+     * {@code limit()} in parallel pipelines, switching to sequential execution
+     * with {@link #sequential()} may improve performance.
+     *
      * @param maxSize the number of elements the stream should be limited to
      * @return the new stream
      * @throws IllegalArgumentException if {@code maxSize} is negative
@@ -295,37 +244,32 @@
 
     /**
      * Returns a stream consisting of the remaining elements of this stream
-     * after discarding the first {@code startInclusive} elements of the stream.
-     * If this stream contains fewer than {@code startInclusive} elements then an
+     * after discarding the first {@code n} elements of the stream.
+     * If this stream contains fewer than {@code n} elements then an
      * empty stream will be returned.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">stateful
      * intermediate operation</a>.
      *
-     * @param startInclusive the number of leading elements to skip
+     * @apiNote
+     * While {@code skip()} is generally a cheap operation on sequential
+     * stream pipelines, it can be quite expensive on ordered parallel pipelines,
+     * especially for large values of {@code n}, since {@code skip(n)}
+     * is constrained to skip not just any <em>n</em> elements, but the
+     * <em>first n</em> elements in the encounter order.  Using an unordered
+     * stream source (such as {@link #generate(IntSupplier)}) or removing the
+     * ordering constraint with {@link #unordered()} may result in significant
+     * speedups of {@code skip()} in parallel pipelines, if the semantics of
+     * your situation permit.  If consistency with encounter order is required,
+     * and you are experiencing poor performance or memory utilization with
+     * {@code skip()} in parallel pipelines, switching to sequential execution
+     * with {@link #sequential()} may improve performance.
+     *
+     * @param n the number of leading elements to skip
      * @return the new stream
-     * @throws IllegalArgumentException if {@code startInclusive} is negative
+     * @throws IllegalArgumentException if {@code n} is negative
      */
-    IntStream substream(long startInclusive);
-
-    /**
-     * Returns a stream consisting of the remaining elements of this stream
-     * after discarding the first {@code startInclusive} elements and truncating
-     * the result to be no longer than {@code endExclusive - startInclusive}
-     * elements in length. If this stream contains fewer than
-     * {@code startInclusive} elements then an empty stream will be returned.
-     *
-     * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
-     * stateful intermediate operation</a>.
-     *
-     * @param startInclusive the starting position of the substream, inclusive
-     * @param endExclusive the ending position of the substream, exclusive
-     * @return the new stream
-     * @throws IllegalArgumentException if {@code startInclusive} or
-     * {@code endExclusive} is negative or {@code startInclusive} is greater
-     * than {@code endExclusive}
-     */
-    IntStream substream(long startInclusive, long endExclusive);
+    IntStream skip(long n);
 
     /**
      * Performs an action for each element of this stream.
@@ -412,9 +356,10 @@
      * synchronization and with greatly reduced risk of data races.
      *
      * @param identity the identity value for the accumulating function
-     * @param op an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for combining two values
+     * @param op an <a href="package-summary.html#Associativity">associative</a>,
+     *           <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *           <a href="package-summary.html#Statelessness">stateless</a>
+     *           function for combining two values
      * @return the result of the reduction
      * @see #sum()
      * @see #min()
@@ -451,9 +396,10 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param op an <a href="package-summary.html#Associativity">associative</a>
-     *           <a href="package-summary.html#NonInterference">non-interfering,
-     *           stateless</a> function for combining two values
+     * @param op an <a href="package-summary.html#Associativity">associative</a>,
+     *           <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *           <a href="package-summary.html#Statelessness">stateless</a>
+     *           function for combining two values
      * @return the result of the reduction
      * @see #reduce(int, IntBinaryOperator)
      */
@@ -483,14 +429,15 @@
      * @param supplier a function that creates a new result container. For a
      *                 parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
-     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for incorporating an additional
-     *                    element into a result
-     * @param combiner an <a href="package-summary.html#Associativity">associative</a>
-     *                 <a href="package-summary.html#NonInterference">non-interfering,
-     *                 stateless</a> function for combining two values, which
-     *                 must be compatible with the accumulator function
+     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for incorporating an additional element into a result
+     * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for combining two values, which must be
+     *                    compatible with the accumulator function
      * @return the result of the reduction
      * @see Stream#collect(Supplier, BiConsumer, BiConsumer)
      */
@@ -590,48 +537,67 @@
     /**
      * Returns whether any elements of this stream match the provided
      * predicate.  May not evaluate the predicate on all elements if not
-     * necessary for determining the result.
+     * necessary for determining the result.  If the stream is empty then
+     * {@code false} is returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
+     * @apiNote
+     * This method evaluates the <em>existential quantification</em> of the
+     * predicate over the elements of the stream (for some x P(x)).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
      * @return {@code true} if any elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * predicate, otherwise {@code false}
      */
     boolean anyMatch(IntPredicate predicate);
 
     /**
      * Returns whether all elements of this stream match the provided predicate.
      * May not evaluate the predicate on all elements if not necessary for
-     * determining the result.
+     * determining the result.  If the stream is empty then {@code true} is
+     * returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
-     * @return {@code true} if all elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * @apiNote
+     * This method evaluates the <em>universal quantification</em> of the
+     * predicate over the elements of the stream (for all x P(x)).  If the
+     * stream is empty, the quantification is said to be <em>vacuously
+     * satisfied</em> and is always {@code true} (regardless of P(x)).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
+     * @return {@code true} if either all elements of the stream match the
+     * provided predicate or the stream is empty, otherwise {@code false}
      */
     boolean allMatch(IntPredicate predicate);
 
     /**
      * Returns whether no elements of this stream match the provided predicate.
      * May not evaluate the predicate on all elements if not necessary for
-     * determining the result.
+     * determining the result.  If the stream is empty then {@code true} is
+     * returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
-     * @return {@code true} if no elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * @apiNote
+     * This method evaluates the <em>universal quantification</em> of the
+     * negated predicate over the elements of the stream (for all x ~P(x)).  If
+     * the stream is empty, the quantification is said to be vacuously satisfied
+     * and is always {@code true}, regardless of P(x).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
+     * @return {@code true} if either no elements of the stream match the
+     * provided predicate or the stream is empty, otherwise {@code false}
      */
     boolean noneMatch(IntPredicate predicate);
 
@@ -794,12 +760,12 @@
     }
 
     /**
-     * Returns a sequential stream where each element is generated by
-     * the provided {@code IntSupplier}.  This is suitable for generating
-     * constant streams, streams of random elements, etc.
+     * Returns an infinite sequential unordered stream where each element is
+     * generated by the provided {@code IntSupplier}.  This is suitable for
+     * generating constant streams, streams of random elements, etc.
      *
      * @param s the {@code IntSupplier} for generated elements
-     * @return a new sequential {@code IntStream}
+     * @return a new infinite sequential unordered {@code IntStream}
      */
     public static IntStream generate(IntSupplier s) {
         Objects.requireNonNull(s);
@@ -862,11 +828,16 @@
     /**
      * Creates a lazily concatenated stream whose elements are all the
      * elements of the first stream followed by all the elements of the
-     * second stream. The resulting stream is ordered if both
+     * second stream.  The resulting stream is ordered if both
      * of the input streams are ordered, and parallel if either of the input
      * streams is parallel.  When the resulting stream is closed, the close
      * handlers for both input streams are invoked.
      *
+     * @implNote
+     * Use caution when constructing streams from repeated concatenation.
+     * Accessing an element of a deeply concatenated stream can result in deep
+     * call chains, or even {@code StackOverflowException}.
+     *
      * @param a the first stream
      * @param b the second stream
      * @return the concatenation of the two input streams
--- a/src/share/classes/java/util/stream/LongPipeline.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/LongPipeline.java	Wed Oct 30 18:38:20 2013 +0000
@@ -349,32 +349,21 @@
 
     // Stateful intermediate ops from LongStream
 
-    private LongStream slice(long skip, long limit) {
-        return SliceOps.makeLong(this, skip, limit);
-    }
-
     @Override
     public final LongStream limit(long maxSize) {
         if (maxSize < 0)
             throw new IllegalArgumentException(Long.toString(maxSize));
-        return slice(0, maxSize);
+        return SliceOps.makeLong(this, 0, maxSize);
     }
 
     @Override
-    public final LongStream substream(long startingOffset) {
-        if (startingOffset < 0)
-            throw new IllegalArgumentException(Long.toString(startingOffset));
-        if (startingOffset == 0)
+    public final LongStream skip(long n) {
+        if (n < 0)
+            throw new IllegalArgumentException(Long.toString(n));
+        if (n == 0)
             return this;
         else
-            return slice(startingOffset, -1);
-    }
-
-    @Override
-    public final LongStream substream(long startingOffset, long endingOffset) {
-        if (startingOffset < 0 || endingOffset < startingOffset)
-            throw new IllegalArgumentException(String.format("substream(%d, %d)", startingOffset, endingOffset));
-        return slice(startingOffset, endingOffset - startingOffset);
+            return SliceOps.makeLong(this, n, -1);
     }
 
     @Override
--- a/src/share/classes/java/util/stream/LongStream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/LongStream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -51,9 +51,13 @@
 import java.util.function.Supplier;
 
 /**
- * A sequence of elements supporting sequential and parallel aggregate
- * operations.  The following example illustrates an aggregate operation using
- * {@link Stream} and {@link LongStream}:
+ * A sequence of primitive long-valued elements supporting sequential and parallel
+ * aggregate operations.  This is the {@code long} primitive specialization of
+ * {@link Stream}.
+ *
+ * <p>The following example illustrates an aggregate operation using
+ * {@link Stream} and {@link LongStream}, computing the sum of the weights of the
+ * red widgets:
  *
  * <pre>{@code
  *     long sum = widgets.stream()
@@ -62,78 +66,13 @@
  *                       .sum();
  * }</pre>
  *
- * In this example, {@code widgets} is a {@code Collection<Widget>}.  We create
- * a stream of {@code Widget} objects via {@link Collection#stream Collection.stream()},
- * filter it to produce a stream containing only the red widgets, and then
- * transform it into a stream of {@code long} values representing the weight of
- * each red widget. Then this stream is summed to produce a total weight.
- *
- * <p>To perform a computation, stream
- * <a href="package-summary.html#StreamOps">operations</a> are composed into a
- * <em>stream pipeline</em>.  A stream pipeline consists of a source (which
- * might be an array, a collection, a generator function, an IO channel,
- * etc), zero or more <em>intermediate operations</em> (which transform a
- * stream into another stream, such as {@link LongStream#filter(LongPredicate)}), and a
- * <em>terminal operation</em> (which produces a result or side-effect, such
- * as {@link LongStream#sum()} or {@link LongStream#forEach(LongConsumer)}).
- * Streams are lazy; computation on the source data is only performed when the
- * terminal operation is initiated, and source elements are consumed only
- * as needed.
- *
- * <p>Collections and streams, while bearing some superficial similarities,
- * have different goals.  Collections are primarily concerned with the efficient
- * management of, and access to, their elements.  By contrast, streams do not
- * provide a means to directly access or manipulate their elements, and are
- * instead concerned with declaratively describing their source and the
- * computational operations which will be performed in aggregate on that source.
- * However, if the provided stream operations do not offer the desired
- * functionality, the {@link #iterator()} and {@link #spliterator()} operations
- * can be used to perform a controlled traversal.
- *
- * <p>A stream pipeline, like the "widgets" example above, can be viewed as
- * a <em>query</em> on the stream source.  Unless the source was explicitly
- * designed for concurrent modification (such as a {@link ConcurrentHashMap}),
- * unpredictable or erroneous behavior may result from modifying the stream
- * source while it is being queried.
- *
- * <p>Most stream operations accept parameters that describe user-specified
- * behavior, such as the lambda expression {@code w -> w.getWeight()} passed to
- * {@code mapToLong} in the example above.  Such parameters are always instances
- * of a <a href="../function/package-summary.html">functional interface</a> such
- * as {@link java.util.function.Function}, and are often lambda expressions or
- * method references.  These parameters can never be null, should not modify the
- * stream source, and should be
- * <a href="package-summary.html#NonInterference">effectively stateless</a>
- * (their result should not depend on any state that might change during
- * execution of the stream pipeline.)
- *
- * <p>A stream should be operated on (invoking an intermediate or terminal stream
- * operation) only once.  This rules out, for example, "forked" streams, where
- * the same source feeds two or more pipelines, or multiple traversals of the
- * same stream.  A stream implementation may throw {@link IllegalStateException}
- * if it detects that the stream is being reused. However, since some stream
- * operations may return their receiver rather than a new stream object, it may
- * not be possible to detect reuse in all cases.
- *
- * <p>Streams have a {@link #close()} method and implement {@link AutoCloseable},
- * but nearly all stream instances do not actually need to be closed after use.
- * Generally, only streams whose source is an IO channel (such as those returned
- * by {@link Files#lines(Path, Charset)}) will require closing.  Most streams
- * are backed by collections, arrays, or generating functions, which require no
- * special resource management.  (If a stream does require closing, it can be
- * declared as a resource in a {@code try}-with-resources statement.)
- *
- * <p>Stream pipelines may execute either sequentially or in
- * <a href="package-summary.html#Parallelism">parallel</a>.  This
- * execution mode is a property of the stream.  Streams are created
- * with an initial choice of sequential or parallel execution.  (For example,
- * {@link Collection#stream() Collection.stream()} creates a sequential stream,
- * and {@link Collection#parallelStream() Collection.parallelStream()} creates
- * a parallel one.)  This choice of execution mode may be modified by the
- * {@link #sequential()} or {@link #parallel()} methods, and may be queried with
- * the {@link #isParallel()} method.
+ * See the class documentation for {@link Stream} and the package documentation
+ * for <a href="package-summary.html">java.util.stream</a> for additional
+ * specification of streams, stream operations, stream pipelines, and
+ * parallelism.
  *
  * @since 1.8
+ * @see Stream
  * @see <a href="package-summary.html">java.util.stream</a>
  */
 public interface LongStream extends BaseStream<Long, LongStream> {
@@ -145,9 +84,10 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">
-     *                  non-interfering, stateless</a> predicate to apply to
-     *                  each element to determine if it should be included
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to each element to determine if it
+     *                  should be included
      * @return the new stream
      */
     LongStream filter(LongPredicate predicate);
@@ -159,9 +99,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     LongStream map(LongUnaryOperator mapper);
@@ -174,9 +114,9 @@
      *     intermediate operation</a>.
      *
      * @param <U> the element type of the new stream
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     <U> Stream<U> mapToObj(LongFunction<? extends U> mapper);
@@ -188,9 +128,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     IntStream mapToInt(LongToIntFunction mapper);
@@ -202,9 +142,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     DoubleStream mapToDouble(LongToDoubleFunction mapper);
@@ -219,10 +159,10 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to
-     *               each element which produces an {@code LongStream} of new
-     *               values
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element which produces a
+     *               {@code LongStream} of new values
      * @return the new stream
      * @see Stream#flatMap(Function)
      */
@@ -287,6 +227,20 @@
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * stateful intermediate operation</a>.
      *
+     * @apiNote
+     * While {@code limit()} is generally a cheap operation on sequential
+     * stream pipelines, it can be quite expensive on ordered parallel pipelines,
+     * especially for large values of {@code maxSize}, since {@code limit(n)}
+     * is constrained to return not just any <em>n</em> elements, but the
+     * <em>first n</em> elements in the encounter order.  Using an unordered
+     * stream source (such as {@link #generate(LongSupplier)}) or removing the
+     * ordering constraint with {@link #unordered()} may result in significant
+     * speedups of {@code limit()} in parallel pipelines, if the semantics of
+     * your situation permit.  If consistency with encounter order is required,
+     * and you are experiencing poor performance or memory utilization with
+     * {@code limit()} in parallel pipelines, switching to sequential execution
+     * with {@link #sequential()} may improve performance.
+     *
      * @param maxSize the number of elements the stream should be limited to
      * @return the new stream
      * @throws IllegalArgumentException if {@code maxSize} is negative
@@ -295,37 +249,32 @@
 
     /**
      * Returns a stream consisting of the remaining elements of this stream
-     * after discarding the first {@code startInclusive} elements of the stream.
-     * If this stream contains fewer than {@code startInclusive} elements then an
+     * after discarding the first {@code n} elements of the stream.
+     * If this stream contains fewer than {@code n} elements then an
      * empty stream will be returned.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">stateful
      * intermediate operation</a>.
      *
-     * @param startInclusive the number of leading elements to skip
+     * @apiNote
+     * While {@code skip()} is generally a cheap operation on sequential
+     * stream pipelines, it can be quite expensive on ordered parallel pipelines,
+     * especially for large values of {@code n}, since {@code skip(n)}
+     * is constrained to skip not just any <em>n</em> elements, but the
+     * <em>first n</em> elements in the encounter order.  Using an unordered
+     * stream source (such as {@link #generate(LongSupplier)}) or removing the
+     * ordering constraint with {@link #unordered()} may result in significant
+     * speedups of {@code skip()} in parallel pipelines, if the semantics of
+     * your situation permit.  If consistency with encounter order is required,
+     * and you are experiencing poor performance or memory utilization with
+     * {@code skip()} in parallel pipelines, switching to sequential execution
+     * with {@link #sequential()} may improve performance.
+     *
+     * @param n the number of leading elements to skip
      * @return the new stream
-     * @throws IllegalArgumentException if {@code startInclusive} is negative
+     * @throws IllegalArgumentException if {@code n} is negative
      */
-    LongStream substream(long startInclusive);
-
-    /**
-     * Returns a stream consisting of the remaining elements of this stream
-     * after discarding the first {@code startInclusive} elements and truncating
-     * the result to be no longer than {@code endExclusive - startInclusive}
-     * elements in length. If this stream contains fewer than
-     * {@code startInclusive} elements then an empty stream will be returned.
-     *
-     * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
-     * stateful intermediate operation</a>.
-     *
-     * @param startInclusive the starting position of the substream, inclusive
-     * @param endExclusive the ending position of the substream, exclusive
-     * @return the new stream
-     * @throws IllegalArgumentException if {@code startInclusive} or
-     * {@code endExclusive} is negative or {@code startInclusive} is greater
-     * than {@code endExclusive}
-     */
-    LongStream substream(long startInclusive, long endExclusive);
+    LongStream skip(long n);
 
     /**
      * Performs an action for each element of this stream.
@@ -412,9 +361,10 @@
      * synchronization and with greatly reduced risk of data races.
      *
      * @param identity the identity value for the accumulating function
-     * @param op an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for combining two values
+     * @param op an <a href="package-summary.html#Associativity">associative</a>,
+     *           <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *           <a href="package-summary.html#Statelessness">stateless</a>
+     *           function for combining two values
      * @return the result of the reduction
      * @see #sum()
      * @see #min()
@@ -451,9 +401,10 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param op an <a href="package-summary.html#Associativity">associative</a>
-     *           <a href="package-summary.html#NonInterference">non-interfering,
-     *           stateless</a> function for combining two values
+     * @param op an <a href="package-summary.html#Associativity">associative</a>,
+     *           <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *           <a href="package-summary.html#Statelessness">stateless</a>
+     *           function for combining two values
      * @return the result of the reduction
      * @see #reduce(long, LongBinaryOperator)
      */
@@ -483,14 +434,15 @@
      * @param supplier a function that creates a new result container. For a
      *                 parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
-     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for incorporating an additional
-     *                    element into a result
-     * @param combiner an <a href="package-summary.html#Associativity">associative</a>
-     *                 <a href="package-summary.html#NonInterference">non-interfering,
-     *                 stateless</a> function for combining two values, which
-     *                 must be compatible with the accumulator function
+     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for incorporating an additional element into a result
+     * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for combining two values, which must be
+     *                    compatible with the accumulator function
      * @return the result of the reduction
      * @see Stream#collect(Supplier, BiConsumer, BiConsumer)
      */
@@ -590,48 +542,67 @@
     /**
      * Returns whether any elements of this stream match the provided
      * predicate.  May not evaluate the predicate on all elements if not
-     * necessary for determining the result.
+     * necessary for determining the result.  If the stream is empty then
+     * {@code false} is returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
+     * @apiNote
+     * This method evaluates the <em>existential quantification</em> of the
+     * predicate over the elements of the stream (for some x P(x)).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
      * @return {@code true} if any elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * predicate, otherwise {@code false}
      */
     boolean anyMatch(LongPredicate predicate);
 
     /**
      * Returns whether all elements of this stream match the provided predicate.
      * May not evaluate the predicate on all elements if not necessary for
-     * determining the result.
+     * determining the result.  If the stream is empty then {@code true} is
+     * returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
-     * @return {@code true} if all elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * @apiNote
+     * This method evaluates the <em>universal quantification</em> of the
+     * predicate over the elements of the stream (for all x P(x)).  If the
+     * stream is empty, the quantification is said to be <em>vacuously
+     * satisfied</em> and is always {@code true} (regardless of P(x)).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
+     * @return {@code true} if either all elements of the stream match the
+     * provided predicate or the stream is empty, otherwise {@code false}
      */
     boolean allMatch(LongPredicate predicate);
 
     /**
-     * Returns whether no elements of this stream match the provided  predicate.
+     * Returns whether no elements of this stream match the provided predicate.
      * May not evaluate the predicate on all elements if not necessary for
-     * determining the result.
+     * determining the result.  If the stream is empty then {@code true} is
+     * returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
-     * @return {@code true} if no elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * @apiNote
+     * This method evaluates the <em>universal quantification</em> of the
+     * negated predicate over the elements of the stream (for all x ~P(x)).  If
+     * the stream is empty, the quantification is said to be vacuously satisfied
+     * and is always {@code true}, regardless of P(x).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
+     * @return {@code true} if either no elements of the stream match the
+     * provided predicate or the stream is empty, otherwise {@code false}
      */
     boolean noneMatch(LongPredicate predicate);
 
@@ -782,12 +753,12 @@
     }
 
     /**
-     * Returns a sequential stream where each element is generated by
-     * the provided {@code LongSupplier}.  This is suitable for generating
-     * constant streams, streams of random elements, etc.
+     * Returns an infinite sequential unordered stream where each element is
+     * generated by the provided {@code LongSupplier}.  This is suitable for
+     * generating constant streams, streams of random elements, etc.
      *
      * @param s the {@code LongSupplier} for generated elements
-     * @return a new sequential {@code LongStream}
+     * @return a new infinite sequential unordered {@code LongStream}
      */
     public static LongStream generate(LongSupplier s) {
         Objects.requireNonNull(s);
@@ -865,11 +836,16 @@
     /**
      * Creates a lazily concatenated stream whose elements are all the
      * elements of the first stream followed by all the elements of the
-     * second stream. The resulting stream is ordered if both
+     * second stream.  The resulting stream is ordered if both
      * of the input streams are ordered, and parallel if either of the input
      * streams is parallel.  When the resulting stream is closed, the close
      * handlers for both input streams are invoked.
      *
+     * @implNote
+     * Use caution when constructing streams from repeated concatenation.
+     * Accessing an element of a deeply concatenated stream can result in deep
+     * call chains, or even {@code StackOverflowException}.
+     *
      * @param a the first stream
      * @param b the second stream
      * @return the concatenation of the two input streams
--- a/src/share/classes/java/util/stream/Node.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/Node.java	Wed Oct 30 18:38:20 2013 +0000
@@ -241,6 +241,7 @@
          * @param action a consumer that is to be invoked with each
          *        element in this {@code Node.OfPrimitive}
          */
+        @SuppressWarnings("overloads")
         void forEach(T_CONS action);
 
         @Override
--- a/src/share/classes/java/util/stream/ReferencePipeline.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/ReferencePipeline.java	Wed Oct 30 18:38:20 2013 +0000
@@ -394,32 +394,21 @@
         return SortedOps.makeRef(this, comparator);
     }
 
-    private Stream<P_OUT> slice(long skip, long limit) {
-        return SliceOps.makeRef(this, skip, limit);
-    }
-
     @Override
     public final Stream<P_OUT> limit(long maxSize) {
         if (maxSize < 0)
             throw new IllegalArgumentException(Long.toString(maxSize));
-        return slice(0, maxSize);
+        return SliceOps.makeRef(this, 0, maxSize);
     }
 
     @Override
-    public final Stream<P_OUT> substream(long startingOffset) {
-        if (startingOffset < 0)
-            throw new IllegalArgumentException(Long.toString(startingOffset));
-        if (startingOffset == 0)
+    public final Stream<P_OUT> skip(long n) {
+        if (n < 0)
+            throw new IllegalArgumentException(Long.toString(n));
+        if (n == 0)
             return this;
         else
-            return slice(startingOffset, -1);
-    }
-
-    @Override
-    public final Stream<P_OUT> substream(long startingOffset, long endingOffset) {
-        if (startingOffset < 0 || endingOffset < startingOffset)
-            throw new IllegalArgumentException(String.format("substream(%d, %d)", startingOffset, endingOffset));
-        return slice(startingOffset, endingOffset - startingOffset);
+            return SliceOps.makeRef(this, n, -1);
     }
 
     // Terminal operations from Stream
--- a/src/share/classes/java/util/stream/SpinedBuffer.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/SpinedBuffer.java	Wed Oct 30 18:38:20 2013 +0000
@@ -579,6 +579,7 @@
             spineIndex = 0;
         }
 
+        @SuppressWarnings("overloads")
         public void forEach(T_CONS consumer) {
             // completed chunks, if any
             for (int j = 0; j < spineIndex; j++)
--- a/src/share/classes/java/util/stream/Stream.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/Stream.java	Wed Oct 30 18:38:20 2013 +0000
@@ -67,6 +67,11 @@
  * transform it into a stream of {@code int} values representing the weight of
  * each red widget. Then this stream is summed to produce a total weight.
  *
+ * <p>In addition to {@code Stream}, which is a stream of object references,
+ * there are primitive specializations for {@link IntStream}, {@link LongStream},
+ * and {@link DoubleStream}, all of which are referred to as "streams" and
+ * conform to the characteristics and restrictions described here.
+ *
  * <p>To perform a computation, stream
  * <a href="package-summary.html#StreamOps">operations</a> are composed into a
  * <em>stream pipeline</em>.  A stream pipeline consists of a source (which
@@ -97,14 +102,21 @@
  *
  * <p>Most stream operations accept parameters that describe user-specified
  * behavior, such as the lambda expression {@code w -> w.getWeight()} passed to
- * {@code mapToInt} in the example above.  Such parameters are always instances
- * of a <a href="../function/package-summary.html">functional interface</a> such
+ * {@code mapToInt} in the example above.  To preserve correct behavior,
+ * these <em>behavioral parameters</em>:
+ * <ul>
+ * <li>must be <a href="package-summary.html#NonInterference">non-interfering</a>
+ * (they do not modify the stream source); and</li>
+ * <li>in most cases must be <a href="package-summary.html#Statelessness">stateless</a>
+ * (their result should not depend on any state that might change during execution
+ * of the stream pipeline).</li>
+ * </ul>
+ *
+ * <p>Such parameters are always instances of a
+ * <a href="../function/package-summary.html">functional interface</a> such
  * as {@link java.util.function.Function}, and are often lambda expressions or
- * method references.  These parameters can never be null, should not modify the
- * stream source, and should be
- * <a href="package-summary.html#NonInterference">effectively stateless</a>
- * (their result should not depend on any state that might change during
- * execution of the stream pipeline.)
+ * method references.  Unless otherwise specified these parameters must be
+ * <em>non-null</em>.
  *
  * <p>A stream should be operated on (invoking an intermediate or terminal stream
  * operation) only once.  This rules out, for example, "forked" streams, where
@@ -134,6 +146,9 @@
  *
  * @param <T> the type of the stream elements
  * @since 1.8
+ * @see IntStream
+ * @see LongStream
+ * @see DoubleStream
  * @see <a href="package-summary.html">java.util.stream</a>
  */
 public interface Stream<T> extends BaseStream<T, Stream<T>> {
@@ -145,9 +160,10 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">
-     *                  non-interfering, stateless</a> predicate to apply to
-     *                  each element to determine if it should be included
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to each element to determine if it
+     *                  should be included
      * @return the new stream
      */
     Stream<T> filter(Predicate<? super T> predicate);
@@ -160,9 +176,9 @@
      * operation</a>.
      *
      * @param <R> The element type of the new stream
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     <R> Stream<R> map(Function<? super T, ? extends R> mapper);
@@ -174,9 +190,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">
      *     intermediate operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     IntStream mapToInt(ToIntFunction<? super T> mapper);
@@ -188,9 +204,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     LongStream mapToLong(ToLongFunction<? super T> mapper);
@@ -202,9 +218,9 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element
      * @return the new stream
      */
     DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper);
@@ -221,19 +237,33 @@
      *
      * @apiNote
      * The {@code flatMap()} operation has the effect of applying a one-to-many
-     * tranformation to the elements of the stream, and then flattening the
-     * resulting elements into a new stream. For example, if {@code orders}
-     * is a stream of purchase orders, and each purchase order contains a
-     * collection of line items, then the following produces a stream of line
-     * items:
+     * transformation to the elements of the stream, and then flattening the
+     * resulting elements into a new stream.
+     *
+     * <p><b>Examples.</b>
+     *
+     * <p>If {@code orders} is a stream of purchase orders, and each purchase
+     * order contains a collection of line items, then the following produces a
+     * stream containing all the line items in all the orders:
      * <pre>{@code
-     *     orderStream.flatMap(order -> order.getLineItems().stream())...
+     *     orders.flatMap(order -> order.getLineItems().stream())...
      * }</pre>
      *
+     * <p>If {@code path} is the path to a file, then the following produces a
+     * stream of the {@code words} contained in that file:
+     * <pre>{@code
+     *     Stream<String> lines = Files.lines(path, StandardCharsets.UTF_8);
+     *     Stream<String> words = lines.flatMap(line -> Stream.of(line.split(" +")));
+     * }</pre>
+     * The {@code mapper} function passed to {@code flatMap} splits a line,
+     * using a simple regular expression, into an array of words, and then
+     * creates a stream of words from that array.
+     *
      * @param <R> The element type of the new stream
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element which produces a stream of new values
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element which produces a stream
+     *               of new values
      * @return the new stream
      */
     <R> Stream<R> flatMap(Function<? super T, ? extends Stream<? extends R>> mapper);
@@ -248,10 +278,12 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element which produces a stream of new values
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element which produces a stream
+     *               of new values
      * @return the new stream
+     * @see #flatMap(Function)
      */
     IntStream flatMapToInt(Function<? super T, ? extends IntStream> mapper);
 
@@ -265,10 +297,12 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to
-     *               each element which produces a stream of new values
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element which produces a stream
+     *               of new values
      * @return the new stream
+     * @see #flatMap(Function)
      */
     LongStream flatMapToLong(Function<? super T, ? extends LongStream> mapper);
 
@@ -282,10 +316,12 @@
      * <p>This is an <a href="package-summary.html#StreamOps">intermediate
      * operation</a>.
      *
-     * @param mapper a <a href="package-summary.html#NonInterference">
-     *               non-interfering, stateless</a> function to apply to each
-     *               element which produces a stream of new values
+     * @param mapper a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *               <a href="package-summary.html#Statelessness">stateless</a>
+     *               function to apply to each element which produces a stream
+     *               of new values
      * @return the new stream
+     * @see #flatMap(Function)
      */
     DoubleStream flatMapToDouble(Function<? super T, ? extends DoubleStream> mapper);
 
@@ -293,9 +329,27 @@
      * Returns a stream consisting of the distinct elements (according to
      * {@link Object#equals(Object)}) of this stream.
      *
+     * <p>For ordered streams, the selection of distinct elements is stable
+     * (for duplicated elements, the element appearing first in the encounter
+     * order is preserved.)  For unordered streams, no stability guarantees
+     * are made.
+     *
      * <p>This is a <a href="package-summary.html#StreamOps">stateful
      * intermediate operation</a>.
      *
+     * @apiNote
+     * Preserving stability for {@code distinct()} in parallel pipelines is
+     * relatively expensive (requires that the operation act as a full barrier,
+     * with substantial buffering overhead), and stability is often not needed.
+     * Using an unordered stream source (such as {@link #generate(Supplier)})
+     * or removing the ordering constraint with {@link #unordered()} may result
+     * in significantly more efficient execution for {@code distinct()} in parallel
+     * pipelines, if the semantics of your situation permit.  If consistency
+     * with encounter order is required, and you are experiencing poor performance
+     * or memory utilization with {@code distinct()} in parallel pipelines,
+     * switching to sequential execution with {@link #sequential()} may improve
+     * performance.
+     *
      * @return the new stream
      */
     Stream<T> distinct();
@@ -306,6 +360,9 @@
      * {@code Comparable}, a {@code java.lang.ClassCastException} may be thrown
      * when the terminal operation is executed.
      *
+     * <p>For ordered streams, the sort is stable.  For unordered streams, no
+     * stability guarantees are made.
+     *
      * <p>This is a <a href="package-summary.html#StreamOps">stateful
      * intermediate operation</a>.
      *
@@ -317,12 +374,15 @@
      * Returns a stream consisting of the elements of this stream, sorted
      * according to the provided {@code Comparator}.
      *
+     * <p>For ordered streams, the sort is stable.  For unordered streams, no
+     * stability guarantees are made.
+     *
      * <p>This is a <a href="package-summary.html#StreamOps">stateful
      * intermediate operation</a>.
      *
-     * @param comparator a <a href="package-summary.html#NonInterference">
-     *                   non-interfering, stateless</a> {@code Comparator} to
-     *                   be used to compare stream elements
+     * @param comparator a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                   <a href="package-summary.html#Statelessness">stateless</a>
+     *                   {@code Comparator} to be used to compare stream elements
      * @return the new stream
      */
     Stream<T> sorted(Comparator<? super T> comparator);
@@ -365,6 +425,20 @@
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * stateful intermediate operation</a>.
      *
+     * @apiNote
+     * While {@code limit()} is generally a cheap operation on sequential
+     * stream pipelines, it can be quite expensive on ordered parallel pipelines,
+     * especially for large values of {@code maxSize}, since {@code limit(n)}
+     * is constrained to return not just any <em>n</em> elements, but the
+     * <em>first n</em> elements in the encounter order.  Using an unordered
+     * stream source (such as {@link #generate(Supplier)}) or removing the
+     * ordering constraint with {@link #unordered()} may result in significant
+     * speedups of {@code limit()} in parallel pipelines, if the semantics of
+     * your situation permit.  If consistency with encounter order is required,
+     * and you are experiencing poor performance or memory utilization with
+     * {@code limit()} in parallel pipelines, switching to sequential execution
+     * with {@link #sequential()} may improve performance.
+     *
      * @param maxSize the number of elements the stream should be limited to
      * @return the new stream
      * @throws IllegalArgumentException if {@code maxSize} is negative
@@ -373,37 +447,32 @@
 
     /**
      * Returns a stream consisting of the remaining elements of this stream
-     * after discarding the first {@code startInclusive} elements of the stream.
-     * If this stream contains fewer than {@code startInclusive} elements then an
+     * after discarding the first {@code n} elements of the stream.
+     * If this stream contains fewer than {@code n} elements then an
      * empty stream will be returned.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">stateful
      * intermediate operation</a>.
      *
-     * @param startInclusive the number of leading elements to skip
+     * @apiNote
+     * While {@code skip()} is generally a cheap operation on sequential
+     * stream pipelines, it can be quite expensive on ordered parallel pipelines,
+     * especially for large values of {@code n}, since {@code skip(n)}
+     * is constrained to skip not just any <em>n</em> elements, but the
+     * <em>first n</em> elements in the encounter order.  Using an unordered
+     * stream source (such as {@link #generate(Supplier)}) or removing the
+     * ordering constraint with {@link #unordered()} may result in significant
+     * speedups of {@code skip()} in parallel pipelines, if the semantics of
+     * your situation permit.  If consistency with encounter order is required,
+     * and you are experiencing poor performance or memory utilization with
+     * {@code skip()} in parallel pipelines, switching to sequential execution
+     * with {@link #sequential()} may improve performance.
+     *
+     * @param n the number of leading elements to skip
      * @return the new stream
-     * @throws IllegalArgumentException if {@code startInclusive} is negative
+     * @throws IllegalArgumentException if {@code n} is negative
      */
-    Stream<T> substream(long startInclusive);
-
-    /**
-     * Returns a stream consisting of the remaining elements of this stream
-     * after discarding the first {@code startInclusive} elements and truncating
-     * the result to be no longer than {@code endExclusive - startInclusive}
-     * elements in length. If this stream contains fewer than
-     * {@code startInclusive} elements then an empty stream will be returned.
-     *
-     * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
-     * stateful intermediate operation</a>.
-     *
-     * @param startInclusive the starting position of the substream, inclusive
-     * @param endExclusive the ending position of the substream, exclusive
-     * @return the new stream
-     * @throws IllegalArgumentException if {@code startInclusive} or
-     * {@code endExclusive} is negative or {@code startInclusive} is greater
-     * than {@code endExclusive}
-     */
-    Stream<T> substream(long startInclusive, long endExclusive);
+    Stream<T> skip(long n);
 
     /**
      * Performs an action for each element of this stream.
@@ -411,7 +480,8 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * <p>For parallel stream pipelines, this operation does <em>not</em>
+     * <p>The behavior of this operation is explicitly nondeterministic.
+     * For parallel stream pipelines, this operation does <em>not</em>
      * guarantee to respect the encounter order of the stream, as doing so
      * would sacrifice the benefit of parallelism.  For any given element, the
      * action may be performed at whatever time and in whatever thread the
@@ -424,13 +494,18 @@
     void forEach(Consumer<? super T> action);
 
     /**
-     * Performs an action for each element of this stream, guaranteeing that
-     * each element is processed in encounter order for streams that have a
-     * defined encounter order.
+     * Performs an action for each element of this stream, in the encounter
+     * order of the stream if the stream has a defined encounter order.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
+     * <p>This operation processes the elements one at a time, in encounter
+     * order if one exists.  Performing the action for one element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * performing the action for subsequent elements, but for any given element,
+     * the action may be performed in whatever thread the library chooses.
+     *
      * @param action a <a href="package-summary.html#NonInterference">
      *               non-interfering</a> action to perform on the elements
      * @see #forEach(Consumer)
@@ -519,9 +594,10 @@
      * synchronization and with greatly reduced risk of data races.
      *
      * @param identity the identity value for the accumulating function
-     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for combining two values
+     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for combining two values
      * @return the result of the reduction
      */
     T reduce(T identity, BinaryOperator<T> accumulator);
@@ -554,14 +630,15 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for combining two values
+     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for combining two values
      * @return an {@link Optional} describing the result of the reduction
      * @throws NullPointerException if the result of the reduction is null
      * @see #reduce(Object, BinaryOperator)
-     * @see #min(java.util.Comparator)
-     * @see #max(java.util.Comparator)
+     * @see #min(Comparator)
+     * @see #max(Comparator)
      */
     Optional<T> reduce(BinaryOperator<T> accumulator);
 
@@ -599,14 +676,15 @@
      *
      * @param <U> The type of the result
      * @param identity the identity value for the combiner function
-     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for incorporating an additional
-     *                    element into a result
-     * @param combiner an <a href="package-summary.html#Associativity">associative</a>
-     *                 <a href="package-summary.html#NonInterference">non-interfering,
-     *                 stateless</a> function for combining two values, which
-     *                 must be compatible with the accumulator function
+     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for incorporating an additional element into a result
+     * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for combining two values, which must be
+     *                    compatible with the accumulator function
      * @return the result of the reduction
      * @see #reduce(BinaryOperator)
      * @see #reduce(Object, BinaryOperator)
@@ -655,14 +733,15 @@
      * @param supplier a function that creates a new result container. For a
      *                 parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
-     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>
-     *                    <a href="package-summary.html#NonInterference">non-interfering,
-     *                    stateless</a> function for incorporating an additional
-     *                    element into a result
-     * @param combiner an <a href="package-summary.html#Associativity">associative</a>
-     *                 <a href="package-summary.html#NonInterference">non-interfering,
-     *                 stateless</a> function for combining two values, which
-     *                 must be compatible with the accumulator function
+     * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for incorporating an additional element into a result
+     * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
+     *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                    <a href="package-summary.html#Statelessness">stateless</a>
+     *                    function for combining two values, which must be
+     *                    compatible with the accumulator function
      * @return the result of the reduction
      */
     <R> R collect(Supplier<R> supplier,
@@ -678,6 +757,13 @@
      * collection strategies and composition of collect operations such as
      * multiple-level grouping or partitioning.
      *
+     * <p>If the stream is parallel, and the {@code Collector}
+     * is {@link Collector.Characteristics#CONCURRENT concurrent}, and
+     * either the stream is unordered or the collector is
+     * {@link Collector.Characteristics#UNORDERED unordered},
+     * then a concurrent reduction will be performed (see {@link Collector} for
+     * details on concurrent reduction.)
+     *
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
@@ -723,9 +809,9 @@
      *
      * <p>This is a <a href="package-summary.html#StreamOps">terminal operation</a>.
      *
-     * @param comparator a <a href="package-summary.html#NonInterference">non-interfering,
-     *                   stateless</a> {@code Comparator} to use to compare
-     *                   elements of this stream
+     * @param comparator a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                   <a href="package-summary.html#Statelessness">stateless</a>
+     *                   {@code Comparator} to compare elements of this stream
      * @return an {@code Optional} describing the minimum element of this stream,
      * or an empty {@code Optional} if the stream is empty
      * @throws NullPointerException if the minimum element is null
@@ -740,9 +826,9 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param comparator a <a href="package-summary.html#NonInterference">non-interfering,
-     *                   stateless</a> {@code Comparator} to use to compare
-     *                   elements of this stream
+     * @param comparator a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                   <a href="package-summary.html#Statelessness">stateless</a>
+     *                   {@code Comparator} to compare elements of this stream
      * @return an {@code Optional} describing the maximum element of this stream,
      * or an empty {@code Optional} if the stream is empty
      * @throws NullPointerException if the maximum element is null
@@ -766,48 +852,67 @@
     /**
      * Returns whether any elements of this stream match the provided
      * predicate.  May not evaluate the predicate on all elements if not
-     * necessary for determining the result.
+     * necessary for determining the result.  If the stream is empty then
+     * {@code false} is returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
+     * @apiNote
+     * This method evaluates the <em>existential quantification</em> of the
+     * predicate over the elements of the stream (for some x P(x)).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
      * @return {@code true} if any elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * predicate, otherwise {@code false}
      */
     boolean anyMatch(Predicate<? super T> predicate);
 
     /**
      * Returns whether all elements of this stream match the provided predicate.
      * May not evaluate the predicate on all elements if not necessary for
-     * determining the result.
+     * determining the result.  If the stream is empty then {@code true} is
+     * returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
-     * @return {@code true} if all elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * @apiNote
+     * This method evaluates the <em>universal quantification</em> of the
+     * predicate over the elements of the stream (for all x P(x)).  If the
+     * stream is empty, the quantification is said to be <em>vacuously
+     * satisfied</em> and is always {@code true} (regardless of P(x)).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
+     * @return {@code true} if either all elements of the stream match the
+     * provided predicate or the stream is empty, otherwise {@code false}
      */
     boolean allMatch(Predicate<? super T> predicate);
 
     /**
      * Returns whether no elements of this stream match the provided predicate.
      * May not evaluate the predicate on all elements if not necessary for
-     * determining the result.
+     * determining the result.  If the stream is empty then {@code true} is
+     * returned and the predicate is not evaluated.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">short-circuiting
      * terminal operation</a>.
      *
-     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering,
-     *                  stateless</a> predicate to apply to elements of this
-     *                  stream
-     * @return {@code true} if no elements of the stream match the provided
-     * predicate otherwise {@code false}
+     * @apiNote
+     * This method evaluates the <em>universal quantification</em> of the
+     * negated predicate over the elements of the stream (for all x ~P(x)).  If
+     * the stream is empty, the quantification is said to be vacuously satisfied
+     * and is always {@code true}, regardless of P(x).
+     *
+     * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>,
+     *                  <a href="package-summary.html#Statelessness">stateless</a>
+     *                  predicate to apply to elements of this stream
+     * @return {@code true} if either no elements of the stream match the
+     * provided predicate or the stream is empty, otherwise {@code false}
      */
     boolean noneMatch(Predicate<? super T> predicate);
 
@@ -930,13 +1035,13 @@
     }
 
     /**
-     * Returns a sequential stream where each element is generated by
-     * the provided {@code Supplier}.  This is suitable for generating
-     * constant streams, streams of random elements, etc.
+     * Returns an infinite sequential unordered stream where each element is
+     * generated by the provided {@code Supplier}.  This is suitable for
+     * generating constant streams, streams of random elements, etc.
      *
      * @param <T> the type of stream elements
      * @param s the {@code Supplier} of generated elements
-     * @return a new sequential {@code Stream}
+     * @return a new infinite sequential unordered {@code Stream}
      */
     public static<T> Stream<T> generate(Supplier<T> s) {
         Objects.requireNonNull(s);
@@ -947,11 +1052,16 @@
     /**
      * Creates a lazily concatenated stream whose elements are all the
      * elements of the first stream followed by all the elements of the
-     * second stream. The resulting stream is ordered if both
+     * second stream.  The resulting stream is ordered if both
      * of the input streams are ordered, and parallel if either of the input
      * streams is parallel.  When the resulting stream is closed, the close
      * handlers for both input streams are invoked.
      *
+     * @implNote
+     * Use caution when constructing streams from repeated concatenation.
+     * Accessing an element of a deeply concatenated stream can result in deep
+     * call chains, or even {@code StackOverflowException}.
+     *
      * @param <T> The type of stream elements
      * @param a the first stream
      * @param b the second stream
--- a/src/share/classes/java/util/stream/StreamSupport.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/StreamSupport.java	Wed Oct 30 18:38:20 2013 +0000
@@ -96,7 +96,8 @@
      * @param supplier a {@code Supplier} of a {@code Spliterator}
      * @param characteristics Spliterator characteristics of the supplied
      *        {@code Spliterator}.  The characteristics must be equal to
-     *        {@code supplier.get().characteristics()}.
+     *        {@code supplier.get().characteristics()}, otherwise undefined
+     *        behavior may occur when terminal operation commences.
      * @param parallel if {@code true} then the returned stream is a parallel
      *        stream; if {@code false} the returned stream is a sequential
      *        stream.
@@ -163,7 +164,8 @@
      * @param supplier a {@code Supplier} of a {@code Spliterator.OfInt}
      * @param characteristics Spliterator characteristics of the supplied
      *        {@code Spliterator.OfInt}.  The characteristics must be equal to
-     *        {@code supplier.get().characteristics()}
+     *        {@code supplier.get().characteristics()}, otherwise undefined
+     *        behavior may occur when terminal operation commences.
      * @param parallel if {@code true} then the returned stream is a parallel
      *        stream; if {@code false} the returned stream is a sequential
      *        stream.
@@ -230,7 +232,8 @@
      * @param supplier a {@code Supplier} of a {@code Spliterator.OfLong}
      * @param characteristics Spliterator characteristics of the supplied
      *        {@code Spliterator.OfLong}.  The characteristics must be equal to
-     *        {@code supplier.get().characteristics()}
+     *        {@code supplier.get().characteristics()}, otherwise undefined
+     *        behavior may occur when terminal operation commences.
      * @param parallel if {@code true} then the returned stream is a parallel
      *        stream; if {@code false} the returned stream is a sequential
      *        stream.
@@ -297,7 +300,8 @@
      * @param supplier A {@code Supplier} of a {@code Spliterator.OfDouble}
      * @param characteristics Spliterator characteristics of the supplied
      *        {@code Spliterator.OfDouble}.  The characteristics must be equal to
-     *        {@code supplier.get().characteristics()}
+     *        {@code supplier.get().characteristics()}, otherwise undefined
+     *        behavior may occur when terminal operation commences.
      * @param parallel if {@code true} then the returned stream is a parallel
      *        stream; if {@code false} the returned stream is a sequential
      *        stream.
--- a/src/share/classes/java/util/stream/package-info.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/java/util/stream/package-info.java	Wed Oct 30 18:38:20 2013 +0000
@@ -219,31 +219,18 @@
  * <em>not modified at all</em> during the execution of the stream pipeline.
  * The notable exception to this are streams whose sources are concurrent
  * collections, which are specifically designed to handle concurrent modification.
+ * Concurrent stream sources are those whose {@code Spliterator} reports the
+ * {@code CONCURRENT} characteristic.
  *
- * <p>Accordingly, behavioral parameters passed to stream methods should never
- * modify the stream's data source.  An implementation is said to
- * <em>interfere</em> with the data source if it modifies, or causes to be
+ * <p>Accordingly, behavioral parameters in stream pipelines whose source might
+ * not be concurrent should never modify the stream's data source.
+ * A behavioral parameter is said to <em>interfere</em> with a non-concurrent
+ * data source if it modifies, or causes to be
  * modified, the stream's data source.  The need for non-interference applies
  * to all pipelines, not just parallel ones.  Unless the stream source is
  * concurrent, modifying a stream's data source during execution of a stream
  * pipeline can cause exceptions, incorrect answers, or nonconformant behavior.
  *
- * <p>Results may be nondeterministic or incorrect if the behavioral
- * parameters of stream operations are <em>stateful</em>.  A stateful lambda
- * (or other object implementing the appropriate functional interface) is one
- * whose result depends on any state which might change during the execution
- * of the stream pipeline.  An example of a stateful lambda is:
- *
- * <pre>{@code
- *     Set<Integer> seen = Collections.synchronizedSet(new HashSet<>());
- *     stream.parallel().map(e -> { if (seen.add(e)) return 0; else return e; })...
- * }</pre>
- *
- * Here, if the mapping operation is performed in parallel, the results for the
- * same input could vary from run to run, due to thread scheduling differences,
- * whereas, with a stateless lambda expression the results would always be the
- * same.
- *
  * For well-behaved stream sources, the source can be modified before the
  * terminal operation commences and those modifications will be reflected in
  * the covered elements.  For example, consider the following code:
@@ -265,26 +252,54 @@
  * <a href="package-summary.html#StreamSources">Low-level stream
  * construction</a> for requirements for building well-behaved streams.
  *
- * <p>Some streams, particularly those whose stream sources are concurrent, can
- * tolerate concurrent modification during execution of a stream pipeline.
- * However, in no case -- even if the stream source is concurrent -- should
- * behavioral parameters to stream operations modify the stream source.  Modifying
- * the stream source from within the stream source may cause pipeline execution
- * to fail to terminate, produce inaccurate results, or throw exceptions.
- * The following example shows inappropriate interference with the source:
+ * <h3><a name="Statelessness">Stateless behaviors</a></h3>
+ *
+ * Stream pipeline results may be nondeterministic or incorrect if the behavioral
+ * parameters to the stream operations are <em>stateful</em>.  A stateful lambda
+ * (or other object implementing the appropriate functional interface) is one
+ * whose result depends on any state which might change during the execution
+ * of the stream pipeline.  An example of a stateful lambda is the parameter
+ * to {@code map()} in:
+ *
  * <pre>{@code
- *     // Don't do this!
- *     List<String> l = new ArrayList(Arrays.asList("one", "two"));
- *     Stream<String> sl = l.stream();
- *     String s = sl.peek(s -> l.add("BAD LAMBDA")).collect(joining(" "));
+ *     Set<Integer> seen = Collections.synchronizedSet(new HashSet<>());
+ *     stream.parallel().map(e -> { if (seen.add(e)) return 0; else return e; })...
  * }</pre>
  *
+ * Here, if the mapping operation is performed in parallel, the results for the
+ * same input could vary from run to run, due to thread scheduling differences,
+ * whereas, with a stateless lambda expression the results would always be the
+ * same.
+ *
+ * <p>Note also that attempting to access mutable state from behavioral parameters
+ * presents you with a bad choice with respect to safety and performance; if
+ * you do not synchronize access to that state, you have a data race and
+ * therefore your code is broken, but if you do synchronize access to that
+ * state, you risk having contention undermine the parallelism you are seeking
+ * to benefit from.  The best approach is to avoid stateful behavioral
+ * parameters to stream operations entirely; there is usually a way to
+ * restructure the stream pipeline to avoid statefulness.
+ *
  * <h3>Side-effects</h3>
  *
  * Side-effects in behavioral parameters to stream operations are, in general,
  * discouraged, as they can often lead to unwitting violations of the
- * statelessness requirement, as well as other thread-safety hazards.  Many
- * computations where one might be tempted to use side effects can be more
+ * statelessness requirement, as well as other thread-safety hazards.
+ *
+ * <p>If the behavioral parameters do have side-effects, unless explicitly
+ * stated, there are no guarantees as to the
+ * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>visibility</i></a>
+ * of those side-effects to other threads, nor are there any guarantees that
+ * different operations on the "same" element within the same stream pipeline
+ * are executed in the same thread.  Further, the ordering of those effects
+ * may be surprising.  Even when a pipeline is constrained to produce a
+ * <em>result</em> that is consistent with the encounter order of the stream
+ * source (for example, {@code IntStream.range(0,5).parallel().map(x -> x*2).toArray()}
+ * must produce {@code [0, 2, 4, 6, 8]}), no guarantees are made as to the order
+ * in which the mapper function is applied to individual elements, or in what
+ * thread any behavioral parameter is executed for a given element.
+ *
+ * <p>Many computations where one might be tempted to use side effects can be more
  * safely and efficiently expressed without side-effects, such as using
  * <a href="package-summary.html#Reduction">reduction</a> instead of mutable
  * accumulators. However, side-effects such as using {@code println()} for debugging
--- a/src/share/classes/javax/management/BadAttributeValueExpException.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/BadAttributeValueExpException.java	Wed Oct 30 18:38:20 2013 +0000
@@ -25,6 +25,9 @@
 
 package javax.management;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
 
 /**
  * Thrown when an invalid MBean attribute is passed to a query
@@ -41,17 +44,19 @@
     private static final long serialVersionUID = -3105272988410493376L;
 
     /**
-     * @serial The attribute value that originated this exception
+     * @serial A string representation of the attribute that originated this exception.
+     * for example, the string value can be the return of {@code attribute.toString()}
      */
     private Object val;
 
     /**
-     * Constructs an <CODE>BadAttributeValueExpException</CODE> with the specified Object.
+     * Constructs a BadAttributeValueExpException using the specified Object to
+     * create the toString() value.
      *
      * @param val the inappropriate value.
      */
     public BadAttributeValueExpException (Object val) {
-        this.val = val;
+        this.val = val == null ? null : val.toString();
     }
 
 
@@ -62,4 +67,25 @@
         return "BadAttributeValueException: " + val;
     }
 
+    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
+        ObjectInputStream.GetField gf = ois.readFields();
+        Object valObj = gf.get("val", null);
+
+        if (valObj == null) {
+            val = null;
+        } else if (valObj instanceof String) {
+            val= valObj;
+        } else if (System.getSecurityManager() == null
+                || valObj instanceof Long
+                || valObj instanceof Integer
+                || valObj instanceof Float
+                || valObj instanceof Double
+                || valObj instanceof Byte
+                || valObj instanceof Short
+                || valObj instanceof Boolean) {
+            val = valObj.toString();
+        } else { // the serialized object is from a version without JDK-8019292 fix
+            val = System.identityHashCode(valObj) + "@" + valObj.getClass().getName();
+        }
+    }
  }
--- a/src/share/classes/javax/management/MBeanNotificationInfo.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/MBeanNotificationInfo.java	Wed Oct 30 18:38:20 2013 +0000
@@ -25,6 +25,9 @@
 
 package javax.management;
 
+import java.io.IOException;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
 import java.util.Arrays;
 import java.util.Objects;
 
@@ -68,7 +71,7 @@
     /**
      * @serial The different types of the notification.
      */
-    private final String[] types;
+    private String[] types;
 
     /** @see MBeanInfo#arrayGettersSafe */
     private final transient boolean arrayGettersSafe;
@@ -115,9 +118,8 @@
            notifType, though it doesn't explicitly allow it
            either.  */
 
-        if (notifTypes == null)
-            notifTypes = NO_TYPES;
-        this.types = notifTypes;
+        this.types = (notifTypes != null && notifTypes.length > 0) ?
+                        notifTypes.clone() : NO_TYPES;
         this.arrayGettersSafe =
             MBeanInfo.arrayGettersSafe(this.getClass(),
                                        MBeanNotificationInfo.class);
@@ -204,4 +206,11 @@
             hash ^= types[i].hashCode();
         return hash;
     }
+
+    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
+        ObjectInputStream.GetField gf = ois.readFields();
+        String[] t = (String[])gf.get("types", null);
+
+        types = (t != null && t.length != 0) ? t.clone() : NO_TYPES;
+    }
 }
--- a/src/share/classes/javax/management/MBeanTrustPermission.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/MBeanTrustPermission.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,6 +26,9 @@
 package javax.management;
 
 import java.security.BasicPermission;
+import java.io.IOException;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
 
 /**
  * This permission represents "trust" in a signer or codebase.
@@ -75,15 +78,31 @@
      */
     public MBeanTrustPermission(String name, String actions) {
         super(name, actions);
+        validate(name,actions);
+    }
+
+    private static void validate(String name, String actions) {
         /* Check that actions is a null empty string */
-        if (actions != null && actions.length() > 0)
-            throw new IllegalArgumentException("MBeanTrustPermission " +
-                                               "actions must be null: " +
+        if (actions != null && actions.length() > 0) {
+            throw new IllegalArgumentException("MBeanTrustPermission actions must be null: " +
                                                actions);
+        }
 
-        if (!name.equals("register") && !name.equals("*"))
-            throw new IllegalArgumentException("MBeanTrustPermission: " +
-                                               "Unknown target name " +
+        if (!name.equals("register") && !name.equals("*")) {
+            throw new IllegalArgumentException("MBeanTrustPermission: Unknown target name " +
                                                "[" + name + "]");
+        }
+    }
+
+    private void readObject(ObjectInputStream in)
+         throws IOException, ClassNotFoundException {
+
+        // Reading private fields of base class
+        in.defaultReadObject();
+        try {
+            validate(super.getName(),super.getActions());
+        } catch (IllegalArgumentException e) {
+            throw new InvalidObjectException(e.getMessage());
+        }
     }
 }
--- a/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -298,11 +298,15 @@
                     RequiredModelMBean.class.getName(),
                 "setModelMBeanInfo(ModelMBeanInfo)",
                 "Setting ModelMBeanInfo to " + printModelMBeanInfo(mbi));
+            int noOfNotifications = 0;
+            if (mbi.getNotifications() != null) {
+                noOfNotifications = mbi.getNotifications().length;
+            }
             MODELMBEAN_LOGGER.logp(Level.FINER,
                     RequiredModelMBean.class.getName(),
                 "setModelMBeanInfo(ModelMBeanInfo)",
                 "ModelMBeanInfo notifications has " +
-                (mbi.getNotifications()).length + " elements");
+                noOfNotifications + " elements");
         }
 
         modelMBeanInfo = (ModelMBeanInfo)mbi.clone();
--- a/src/share/classes/javax/management/remote/JMXPrincipal.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/remote/JMXPrincipal.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,6 +26,9 @@
 
 package javax.management.remote;
 
+import java.io.IOException;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
 import java.io.Serializable;
 import java.security.Principal;
 
@@ -64,9 +67,7 @@
      * <code>null</code>.
      */
     public JMXPrincipal(String name) {
-        if (name == null)
-            throw new NullPointerException("illegal null input");
-
+        validate(name);
         this.name = name;
     }
 
@@ -130,4 +131,20 @@
     public int hashCode() {
         return name.hashCode();
     }
+
+    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
+        ObjectInputStream.GetField gf = ois.readFields();
+        String principalName = (String)gf.get("name", null);
+        try {
+            validate(principalName);
+            this.name = principalName;
+        } catch (NullPointerException e) {
+            throw new InvalidObjectException(e.getMessage());
+        }
+    }
+
+    private static void validate(String name) throws NullPointerException {
+        if (name == null)
+            throw new NullPointerException("illegal null input");
+    }
 }
--- a/src/share/classes/javax/management/remote/JMXServiceURL.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/remote/JMXServiceURL.java	Wed Oct 30 18:38:20 2013 +0000
@@ -29,6 +29,9 @@
 
 import com.sun.jmx.remote.util.ClassLogger;
 import com.sun.jmx.remote.util.EnvHelp;
+import java.io.IOException;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
 
 import java.io.Serializable;
 import java.net.InetAddress;
@@ -297,7 +300,7 @@
                If we're given an explicit host name that is illegal we
                have to reject it.  (Bug 5057532.)  */
             try {
-                validateHost(host);
+                validateHost(host, port);
             } catch (MalformedURLException e) {
                 if (logger.fineOn()) {
                     logger.fine("JMXServiceURL",
@@ -336,36 +339,82 @@
         validate();
     }
 
-    private void validate() throws MalformedURLException {
-
-        // Check protocol
+    private static final String INVALID_INSTANCE_MSG =
+            "Trying to deserialize an invalid instance of JMXServiceURL";
+    private void readObject(ObjectInputStream  inputStream) throws IOException, ClassNotFoundException {
+        ObjectInputStream.GetField gf = inputStream.readFields();
+        String h = (String)gf.get("host", null);
+        int p = (int)gf.get("port", -1);
+        String proto = (String)gf.get("protocol", null);
+        String url = (String)gf.get("urlPath", null);
 
-        final int protoEnd = indexOfFirstNotInSet(protocol, protocolBitSet, 0);
-        if (protoEnd == 0 || protoEnd < protocol.length()
-            || !alphaBitSet.get(protocol.charAt(0))) {
+        if (proto == null || url == null || h == null) {
+            StringBuilder sb = new StringBuilder(INVALID_INSTANCE_MSG).append('[');
+            boolean empty = true;
+            if (proto == null) {
+                sb.append("protocol=null");
+                empty = false;
+            }
+            if (h == null) {
+                sb.append(empty ? "" : ",").append("host=null");
+                empty = false;
+            }
+            if (url == null) {
+                sb.append(empty ? "" : ",").append("urlPath=null");
+            }
+            sb.append(']');
+            throw new InvalidObjectException(sb.toString());
+        }
+
+        if (h.contains("[") || h.contains("]")) {
+            throw new InvalidObjectException("Invalid host name: " + h);
+        }
+
+        try {
+            validate(proto, h, p, url);
+            this.protocol = proto;
+            this.host = h;
+            this.port = p;
+            this.urlPath = url;
+        } catch (MalformedURLException e) {
+            throw new InvalidObjectException(INVALID_INSTANCE_MSG + ": " +
+                                             e.getMessage());
+        }
+
+    }
+
+    private void validate(String proto, String h, int p, String url)
+        throws MalformedURLException {
+        // Check protocol
+        final int protoEnd = indexOfFirstNotInSet(proto, protocolBitSet, 0);
+        if (protoEnd == 0 || protoEnd < proto.length()
+            || !alphaBitSet.get(proto.charAt(0))) {
             throw new MalformedURLException("Missing or invalid protocol " +
-                                            "name: \"" + protocol + "\"");
+                                            "name: \"" + proto + "\"");
         }
 
         // Check host
-
-        validateHost();
+        validateHost(h, p);
 
         // Check port
-
-        if (port < 0)
-            throw new MalformedURLException("Bad port: " + port);
+        if (p < 0)
+            throw new MalformedURLException("Bad port: " + p);
 
         // Check URL path
-
-        if (urlPath.length() > 0) {
-            if (!urlPath.startsWith("/") && !urlPath.startsWith(";"))
-                throw new MalformedURLException("Bad URL path: " + urlPath);
+        if (url.length() > 0) {
+            if (!url.startsWith("/") && !url.startsWith(";"))
+                throw new MalformedURLException("Bad URL path: " + url);
         }
     }
 
-    private void validateHost() throws MalformedURLException {
-        if (host.length() == 0) {
+    private void validate() throws MalformedURLException {
+        validate(this.protocol, this.host, this.port, this.urlPath);
+    }
+
+    private static void validateHost(String h, int port)
+            throws MalformedURLException {
+
+        if (h.length() == 0) {
             if (port != 0) {
                 throw new MalformedURLException("Cannot give port number " +
                                                 "without host name");
@@ -373,12 +422,6 @@
             return;
         }
 
-        validateHost(host);
-    }
-
-    private static void validateHost(String h)
-            throws MalformedURLException {
-
         if (isNumericIPv6Address(h)) {
             /* We assume J2SE >= 1.4 here.  Otherwise you can't
                use the address anyway.  We can't call
@@ -663,22 +706,22 @@
     /**
      * The value returned by {@link #getProtocol()}.
      */
-    private final String protocol;
+    private String protocol;
 
     /**
      * The value returned by {@link #getHost()}.
      */
-    private final String host;
+    private String host;
 
     /**
      * The value returned by {@link #getPort()}.
      */
-    private final int port;
+    private int port;
 
     /**
      * The value returned by {@link #getURLPath()}.
      */
-    private final String urlPath;
+    private String urlPath;
 
     /**
      * Cached result of {@link #toString()}.
--- a/src/share/classes/javax/management/remote/NotificationResult.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/remote/NotificationResult.java	Wed Oct 30 18:38:20 2013 +0000
@@ -25,6 +25,9 @@
 
 package javax.management.remote;
 
+import java.io.IOException;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
 import java.io.Serializable;
 
 /**
@@ -76,17 +79,7 @@
     public NotificationResult(long earliestSequenceNumber,
                               long nextSequenceNumber,
                               TargetedNotification[] targetedNotifications) {
-        if (targetedNotifications == null) {
-            final String msg = "Notifications null";
-            throw new IllegalArgumentException(msg);
-        }
-
-        if (earliestSequenceNumber < 0 || nextSequenceNumber < 0)
-            throw new IllegalArgumentException("Bad sequence numbers");
-        /* We used to check nextSequenceNumber >= earliestSequenceNumber
-           here.  But in fact the opposite can legitimately be true if
-           notifications have been lost.  */
-
+        validate(targetedNotifications, earliestSequenceNumber, nextSequenceNumber);
         this.earliestSequenceNumber = earliestSequenceNumber;
         this.nextSequenceNumber = nextSequenceNumber;
         this.targetedNotifications = (targetedNotifications.length == 0 ? targetedNotifications : targetedNotifications.clone());
@@ -138,7 +131,40 @@
             getTargetedNotifications().length;
     }
 
-    private final long earliestSequenceNumber;
-    private final long nextSequenceNumber;
-    private final TargetedNotification[] targetedNotifications;
+    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
+        ois.defaultReadObject();
+        try {
+            validate(
+                this.targetedNotifications,
+                this.earliestSequenceNumber,
+                this.nextSequenceNumber
+            );
+
+            this.targetedNotifications = this.targetedNotifications.length == 0 ?
+                                            this.targetedNotifications :
+                                            this.targetedNotifications.clone();
+        } catch (IllegalArgumentException e) {
+            throw new InvalidObjectException(e.getMessage());
+        }
+    }
+
+    private long earliestSequenceNumber;
+    private long nextSequenceNumber;
+    private TargetedNotification[] targetedNotifications;
+
+    private static void validate(TargetedNotification[] targetedNotifications,
+                                 long earliestSequenceNumber,
+                                 long nextSequenceNumber)
+        throws IllegalArgumentException {
+        if (targetedNotifications == null) {
+            final String msg = "Notifications null";
+            throw new IllegalArgumentException(msg);
+        }
+
+        if (earliestSequenceNumber < 0 || nextSequenceNumber < 0)
+            throw new IllegalArgumentException("Bad sequence numbers");
+        /* We used to check nextSequenceNumber >= earliestSequenceNumber
+           here.  But in fact the opposite can legitimately be true if
+           notifications have been lost.  */
+    }
 }
--- a/src/share/classes/javax/management/remote/TargetedNotification.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/remote/TargetedNotification.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,6 +26,9 @@
 
 package javax.management.remote;
 
+import java.io.IOException;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
 import java.io.Serializable;
 import javax.management.Notification;
 
@@ -73,12 +76,9 @@
      */
     public TargetedNotification(Notification notification,
                                 Integer listenerID) {
+        validate(notification, listenerID);
         // If we replace integer with int...
         // this(notification,intValue(listenerID));
-        if (notification == null) throw new
-            IllegalArgumentException("Invalid notification: null");
-        if (listenerID == null) throw new
-            IllegalArgumentException("Invalid listener ID: null");
         this.notif = notification;
         this.id = listenerID;
     }
@@ -115,13 +115,13 @@
      * @serial A notification to transmit to the other side.
      * @see #getNotification()
      **/
-    private final Notification notif;
+    private Notification notif;
     /**
      * @serial The ID of the listener to which the notification is
      *         targeted.
      * @see #getListenerID()
      **/
-    private final Integer id;
+    private Integer id;
     //private final int id;
 
 // Needed if we use int instead of Integer...
@@ -130,4 +130,22 @@
 //          IllegalArgumentException("Invalid listener ID: null");
 //      return id.intValue();
 //     }
+
+    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
+        ois.defaultReadObject();
+        try {
+            validate(this.notif, this.id);
+        } catch (IllegalArgumentException e) {
+            throw new InvalidObjectException(e.getMessage());
+        }
+    }
+
+    private static void validate(Notification notif, Integer id) throws IllegalArgumentException {
+        if (notif == null) {
+            throw new IllegalArgumentException("Invalid notification: null");
+        }
+        if (id == null) {
+            throw new IllegalArgumentException("Invalid listener ID: null");
+        }
+    }
 }
--- a/src/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java	Wed Oct 30 18:38:20 2013 +0000
@@ -120,6 +120,7 @@
      */
     @Override
     protected Class<?> findClass(String name) throws ClassNotFoundException {
+        // Note: classNames is guaranteed by the constructor to be non-null.
         for (int i = 0; i < classNames.length; i++) {
             if (name.equals(classNames[i])) {
                 return defineClass(classNames[i], byteCodes[i], 0,
--- a/src/share/classes/javax/management/remote/rmi/RMIConnector.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/management/remote/rmi/RMIConnector.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -61,6 +61,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.security.PrivilegedExceptionAction;
+import java.security.PrivilegedActionException;
 import java.security.ProtectionDomain;
 import java.util.Arrays;
 import java.util.Collections;
@@ -128,7 +129,6 @@
             Map<String, ?> environment) {
         if (rmiServer == null && address == null) throw new
                 IllegalArgumentException("rmiServer and jmxServiceURL both null");
-
         initTransients();
 
         this.rmiServer = rmiServer;
@@ -2382,13 +2382,21 @@
         }
     }
 
-    private static RMIConnection shadowIiopStub(Object stub)
+  private static RMIConnection shadowIiopStub(Object stub)
     throws InstantiationException, IllegalAccessException {
-        Object proxyStub = proxyStubClass.newInstance();
+        Object proxyStub = null;
+        try {
+            proxyStub = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+                public Object run() throws Exception {
+                    return proxyStubClass.newInstance();
+                }
+            });
+        } catch (PrivilegedActionException e) {
+            throw new InternalError();
+        }
         IIOPHelper.setDelegate(proxyStub, IIOPHelper.getDelegate(stub));
         return (RMIConnection) proxyStub;
     }
-
     private static RMIConnection getConnection(RMIServer server,
             Object credentials,
             boolean checkStub)
--- a/src/share/classes/javax/naming/CompositeName.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/CompositeName.java	Wed Oct 30 18:38:20 2013 +0000
@@ -41,7 +41,7 @@
  * This range may be written as [0,N).
  * The most significant component is at index 0.
  * An empty composite name has no components.
- *<p>
+ *
  * <h1>JNDI Composite Name Syntax</h1>
  * JNDI defines a standard string representation for composite names. This
  * representation is the concatenation of the components of a composite name
@@ -72,12 +72,12 @@
  * A trailing component separator (the composite name string ends with
  * a separator) denotes a trailing empty component.
  * Adjacent component separators denote an empty component.
- *<p>
+ *
  *<h1>Composite Name Examples</h1>
  *This table shows examples of some composite names. Each row shows
  *the string form of a composite name and its corresponding structural form
  *(<tt>CompositeName</tt>).
- *<p>
+ *
 <table border="1" cellpadding=3 summary="examples showing string form of composite name and its corresponding structural form (CompositeName)">
 
 <tr>
@@ -136,7 +136,7 @@
 <td>{"x", "", "y"}</td>
 </tr>
 </table>
- * <p>
+ *
  *<h1>Composition Examples</h1>
  * Here are some composition examples.  The right column shows composing
  * string composite names while the left column shows composing the
@@ -144,7 +144,7 @@
  * string forms of two composite names simply involves concatenating
  * their string forms together.
 
-<p> <table border="1" cellpadding=3 summary="composition examples showing string names and composite names">
+<table border="1" cellpadding=3 summary="composition examples showing string names and composite names">
 
 <tr>
 <th>String Names</th>
@@ -188,7 +188,7 @@
 </tr>
 
 </table>
- *<p>
+ *
  *<h1>Multithreaded Access</h1>
  * A <tt>CompositeName</tt> instance is not synchronized against concurrent
  * multithreaded access. Multiple threads trying to access and modify a
--- a/src/share/classes/javax/naming/CompoundName.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/CompoundName.java	Wed Oct 30 18:38:20 2013 +0000
@@ -38,7 +38,7 @@
  * This range may be written as [0,N).
  * The most significant component is at index 0.
  * An empty compound name has no components.
- *<p>
+ *
  * <h1>Compound Name Syntax</h1>
  * The syntax of a compound name is specified using a set of properties:
  *<dl>
@@ -135,7 +135,7 @@
  * applied (e.g. embedded separators are escaped or quoted)
  * so that when the same string is parsed, it will yield the same components
  * of the original compound name.
- *<p>
+ *
  *<h1>Multithreaded Access</h1>
  * A <tt>CompoundName</tt> instance is not synchronized against concurrent
  * multithreaded access. Multiple threads trying to access and modify a
--- a/src/share/classes/javax/naming/Context.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/Context.java	Wed Oct 30 18:38:20 2013 +0000
@@ -31,7 +31,7 @@
  * This interface represents a naming context, which
  * consists of a set of name-to-object bindings.
  * It contains methods for examining and updating these bindings.
- * <p>
+ *
  * <h1>Names</h1>
  * Each name passed as an argument to a <tt>Context</tt> method is relative
  * to that context.  The empty name is used to name the context itself.
@@ -68,12 +68,12 @@
  * <tt>NamingEnumeration</tt> may be names in their own namespace rather than
  * names in a composite namespace, at the discretion of the service
  * provider.
- *<p>
+ *
  *<h1>Exceptions</h1>
  * All the methods in this interface can throw a <tt>NamingException</tt> or
  * any of its subclasses. See <tt>NamingException</tt> and their subclasses
  * for details on each exception.
- *<p>
+ *
  *<h1>Concurrent Access</h1>
  * A Context instance is not guaranteed to be synchronized against
  * concurrent access by multiple threads.  Threads that need to access
@@ -90,7 +90,7 @@
  * use, or while any referrals generated by that operation are still
  * being followed.
  *
- *<p>
+ *
  *<h1>Parameters</h1>
  * A <tt>Name</tt> parameter passed to any method of the
  * <tt>Context</tt> interface or one of its subinterfaces
@@ -102,7 +102,7 @@
  * A <tt>Name</tt> returned by any such method is owned by the caller.
  * The caller may subsequently modify it; the service provider may not.
  *
- *<p>
+ *
  *<h1>Environment Properties</h1>
  *<p>
  * JNDI applications need a way to communicate various preferences
--- a/src/share/classes/javax/naming/InitialContext.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/InitialContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -361,7 +361,7 @@
      * follows.
      * Define a new method that uses this method to get an initial
      * context of the desired subclass.
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      * protected XXXContext getURLOrDefaultInitXXXCtx(Name name)
      * throws NamingException {
      *  Context answer = getURLOrDefaultInitCtx(name);
@@ -377,7 +377,7 @@
      * </pre></blockquote>
      * When providing implementations for the new methods in the subclass,
      * use this newly defined method to get the initial context.
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      * public Object XXXMethod1(Name name, ...) {
      *  throws NamingException {
      *    return getURLOrDefaultInitXXXCtx(name).XXXMethod1(name, ...);
--- a/src/share/classes/javax/naming/ReferralException.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/ReferralException.java	Wed Oct 30 18:38:20 2013 +0000
@@ -156,7 +156,7 @@
      * <code>getReferralContext</code> to allow the processing of
      * other referrals to continue.
      * The following code fragment shows a typical usage pattern.
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      *  } catch (ReferralException e) {
      *      if (!shallIFollow(e.getReferralInfo())) {
      *          if (!e.skipReferral()) {
@@ -177,7 +177,7 @@
      * <code>getReferralContext</code> to allow the current
      * referral to be retried.
      * The following code fragment shows a typical usage pattern.
-     * <p><blockquote><pre>
+     * <blockquote><pre>
      *  } catch (ReferralException e) {
      *      while (true) {
      *          try {
--- a/src/share/classes/javax/naming/directory/DirContext.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/directory/DirContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -31,7 +31,7 @@
  * The directory service interface, containing
  * methods for examining and updating attributes
  * associated with objects, and for searching the directory.
- * <p>
+ *
  * <h1>Names</h1>
  * Each name passed as an argument to a <tt>DirContext</tt> method is relative
  * to that context.  The empty name is used to name the context itself.
@@ -50,7 +50,7 @@
  * See <tt>Context</tt> for a discussion on the interpretation of the
  * name argument to the <tt>Context</tt> methods. These same rules
  * apply to the name argument to the <tt>DirContext</tt> methods.
- * <p>
+ *
  * <h1>Attribute Models</h1>
  * There are two basic models of what attributes should be
  * associated with.  First, attributes may be directly associated with a
@@ -80,7 +80,7 @@
  * JNDI clients are safest when they do not make assumptions about
  * whether an object's attributes are stored as part of the object, or stored
  * within the parent object and associated with the object's name.
- * <p>
+ *
  * <h1>Attribute Type Names</h1>
  * In the <tt>getAttributes()</tt> and <tt>search()</tt> methods,
  * you can supply the attributes to return by supplying a list of
@@ -112,7 +112,7 @@
  * <li>description;lang-fr
  * </ul>
  *
- * <p>
+ *
  *<h1>Operational Attributes</h1>
  *<p>
  * Some directories have the notion of "operational attributes" which are
@@ -126,7 +126,7 @@
  * The attributes returned do <em>not</em> include operational attributes.
  * In order to retrieve operational attributes, you must name them explicitly.
  *
- * <p>
+ *
  * <h1>Named Context</h1>
  * <p>
  * There are certain methods in which the name must resolve to a context
@@ -137,7 +137,7 @@
  * <code>NotContextException</code> is thrown.
  * Aside from these methods, there is no requirement that the
  * <em>named object</em> be a DirContext.
- *<p>
+ *
  *<h1>Parameters</h1>
  *<p>
  * An <tt>Attributes</tt>, <tt>SearchControls</tt>, or array object
@@ -149,7 +149,7 @@
  * An <tt>Attributes</tt> object returned by any method is owned by
  * the caller.  The caller may subsequently modify it; the service
  * provider will not.
- *<p>
+ *
  *<h1>Exceptions</h1>
  *<p>
  * All the methods in this interface can throw a NamingException or
--- a/src/share/classes/javax/naming/event/EventContext.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/event/EventContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -33,7 +33,7 @@
 /**
  * Contains methods for registering/deregistering listeners to be notified of
  * events fired when objects named in a context changes.
- *<p>
+ *
  *<h1>Target</h1>
  * The name parameter in the <tt>addNamingListener()</tt> methods is referred
  * to as the <em>target</em>. The target, along with the scope, identify
@@ -58,7 +58,7 @@
  * An application can use the method <tt>targetMustExist()</tt> to check
  * whether a <tt>EventContext</tt> supports registration
  * of nonexistent targets.
- *<p>
+ *
  *<h1>Event Source</h1>
  * The <tt>EventContext</tt> instance on which you invoke the
  * registration methods is the <em>event source</em> of the events that are
--- a/src/share/classes/javax/naming/ldap/LdapContext.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/ldap/LdapContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -338,7 +338,7 @@
      * parameter, a system property, or one or more resource files.
      *<p>
      * The value of this constant is "java.naming.factory.control".
-     *<p>
+     *
      * @see ControlFactory
      * @see javax.naming.Context#addToEnvironment
      * @see javax.naming.Context#removeFromEnvironment
--- a/src/share/classes/javax/naming/ldap/Rdn.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/naming/ldap/Rdn.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -315,7 +315,6 @@
      * @return  A negative integer, zero, or a positive integer as this Rdn
      *          is less than, equal to, or greater than the given Object.
      * @exception ClassCastException if obj is null or not a Rdn.
-     * <p>
      */
     public int compareTo(Object obj) {
         if (!(obj instanceof Rdn)) {
--- a/src/share/classes/javax/security/auth/Subject.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/security/auth/Subject.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1315,8 +1315,14 @@
         {
             ObjectInputStream.GetField fields = ois.readFields();
             subject = (Subject) fields.get("this$0", null);
-            elements = (LinkedList<E>) fields.get("elements", null);
             which = fields.get("which", 0);
+
+            LinkedList<E> tmp = (LinkedList<E>) fields.get("elements", null);
+            if (tmp.getClass() != LinkedList.class) {
+                elements = new LinkedList<E>(tmp);
+            } else {
+                elements = tmp;
+            }
         }
     }
 
--- a/src/share/classes/javax/security/auth/kerberos/KeyTab.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/security/auth/kerberos/KeyTab.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,6 +26,7 @@
 package javax.security.auth.kerberos;
 
 import java.io.File;
+import java.security.AccessControlException;
 import java.util.Objects;
 import sun.security.krb5.EncryptionKey;
 import sun.security.krb5.KerberosSecrets;
@@ -214,9 +215,22 @@
         return new KeyTab(princ, null, true);
     }
 
-    //Takes a snapshot of the keytab content
+    // Takes a snapshot of the keytab content. This method is called by
+    // JavaxSecurityAuthKerberosAccessImpl so no more private
     sun.security.krb5.internal.ktab.KeyTab takeSnapshot() {
-        return sun.security.krb5.internal.ktab.KeyTab.getInstance(file);
+        try {
+            return sun.security.krb5.internal.ktab.KeyTab.getInstance(file);
+        } catch (AccessControlException ace) {
+            if (file != null) {
+                // It's OK to show the name if caller specified it
+                throw ace;
+            } else {
+                AccessControlException ace2 = new AccessControlException(
+                        "Access to default keytab denied (modified exception)");
+                ace2.setStackTrace(ace.getStackTrace());
+                throw ace2;
+            }
+        }
     }
 
     /**
--- a/src/share/classes/javax/sql/CommonDataSource.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/CommonDataSource.java	Wed Oct 30 18:38:20 2013 +0000
@@ -33,7 +33,7 @@
 /**
  * Interface that defines the methods which are common between <code>DataSource</code>,
  * <code>XADataSource</code> and <code>ConnectionPoolDataSource</code>.
- *<p>
+ *
  */
 public interface CommonDataSource {
 
--- a/src/share/classes/javax/sql/RowSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/RowSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1214,7 +1214,7 @@
    *  <code>Struct</code>, <code>java.net.URL</code>,
    * or <code>Array</code>, the driver should pass it to the database as a
    * value of the corresponding SQL type.
-   * <P>
+   *
    *
    * <p>Note that this method may be used to pass datatabase-specific
    * abstract data types.
@@ -1384,7 +1384,7 @@
    *  <code>Struct</code>, <code>java.net.URL</code>,
    * or <code>Array</code>, the driver should pass it to the database as a
    * value of the corresponding SQL type.
-   * <P>
+   *
    * <P>
    * An exception is thrown if there is an ambiguity, for example, if the
    * object is of a class implementing more than one of these interfaces.
--- a/src/share/classes/javax/sql/rowset/BaseRowSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/BaseRowSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -38,7 +38,7 @@
  * An abstract class providing a <code>RowSet</code> object with its basic functionality.
  * The basic functions include having properties and sending event notifications,
  * which all JavaBeans&trade; components must implement.
- * <P>
+ *
  * <h3>1.0 Overview</h3>
  * The <code>BaseRowSet</code> class provides the core functionality
  * for all <code>RowSet</code> implementations,
@@ -52,19 +52,19 @@
  * interfaces.
  * <p>
  * The <code>BaseRowSet</code> class provides the following:
- * <p>
+ *
  * <UL>
  * <LI><b>Properties</b>
  *     <ul>
  *     <li>Fields for storing current properties
  *     <li>Methods for getting and setting properties
  *     </ul>
- *  <p>
+ *
  * <LI><b>Event notification</b>
- * <P>
+ *
  * <LI><b>A complete set of setter methods</b> for setting the parameters in a
  *      <code>RowSet</code> object's command
- *  <p>
+ *
  * <LI> <b>Streams</b>
  *  <ul>
  *  <li>Fields for storing stream instances
@@ -95,7 +95,7 @@
  * with a naming service that uses the Java Naming and Directory
  * Interface&trade; (JNDI) API.  This registration
  * is usually done by a person acting in the capacity of a system administrator.
- * <P>
+ *
  * <h3>3.0 Setting the Command and Its Parameters</h3>
  * When a rowset gets its data from a relational database, it executes a command (a query)
  * that produces a <code>ResultSet</code> object.  This query is the command that is set
@@ -255,7 +255,7 @@
 * identify the <code>RowSet</code> object on which the event occurred.
 * What the listener does with this information, which may be nothing, depends on how it was
 * implemented.
-* <p>
+*
 * <h3>6.0 Default Behavior</h3>
 * A default <code>BaseRowSet</code> object is initialized with many starting values.
 *
@@ -2530,7 +2530,7 @@
      * <code>Struct</code>, or <code>Array</code>,
      * the driver should pass it to the database as a value of the
      * corresponding SQL type.
-     * <P>
+     *
      * <p>Note that this method may be used to pass database-
      * specific abstract data types.
      * <P>
--- a/src/share/classes/javax/sql/rowset/CachedRowSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/CachedRowSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -66,7 +66,7 @@
  * object much leaner and therefore much easier to pass to another component.  For
  * example, a disconnected <code>RowSet</code> object can be serialized and passed
  * over the wire to a thin client such as a personal digital assistant (PDA).
- * <P>
+ *
  *
  * <h3>1.0 Creating a <code>CachedRowSet</code> Object</h3>
  * The following line of code uses the default constructor for
@@ -139,7 +139,7 @@
  * See the comments for <code>SyncFactory</code> and <code>SyncProvider</code> for
  * more details.
  *
- * <P>
+ *
  * <h3>2.0 Retrieving Data from a <code>CachedRowSet</code> Object</h3>
  * Data is retrieved from a <code>CachedRowSet</code> object by using the
  * getter methods inherited from the <code>ResultSet</code>
@@ -195,7 +195,7 @@
  *   <LI><i>It includes <code>setter</code> methods:</i> A <code>RowSet</code>
  *   object uses these methods internally when it is populated with data from a
  *   different <code>ResultSet</code> object.
- *   <P>
+ *
  *   <LI><i>It contains fewer <code>getter</code> methods:</i> Some
  *   <code>ResultSetMetaData</code> methods to not apply to a <code>RowSet</code>
  *   object. For example, methods retrieving whether a column value is writable
@@ -260,7 +260,7 @@
  * <code>acceptChanges</code> after all calls to <code>updateRow</code>
  * and <code>insertRow</code> have been made.  If <code>acceptChanges</code>
  * is called only once, only one connection needs to be established.
- * <P>
+ *
  * <h3>4.0 Updating the Underlying Data Source</h3>
  * When the method <code>acceptChanges</code> is executed, the
  * <code>CachedRowSet</code> object's writer, a <code>RowSetWriterImpl</code>
@@ -304,7 +304,7 @@
  * the values in the database have been changed, there is a conflict.
  * Whether a writer checks for conflicts, what degree of checking it does, and how
  * it handles conflicts all depend on how it is implemented.
- * <P>
+ *
  * <h3>5.0 Registering and Notifying Listeners</h3>
  * Being JavaBeans components, all rowsets participate in the JavaBeans event
  * model, inheriting methods for registering listeners and notifying them of
@@ -327,7 +327,7 @@
  * data also notifies registered listeners of the changes, so
  * <code>table</code> and <code>barGraph</code> will be notified when there is
  * a change in <code>crs</code>.
- * <P>
+ *
  * <h3>6.0 Passing Data to Thin Clients</h3>
  * One of the main reasons to use a <code>CachedRowSet</code> object is to
  * pass data between different components of an application. Because it is
@@ -343,7 +343,7 @@
  * due to resource limitations or security considerations.
  * Thus, a <code>CachedRowSet</code> object provides a means to "get rows in"
  * without the need to implement the full JDBC API.
- * <P>
+ *
  * <h3>7.0 Scrolling and Updating</h3>
  * A second major use for <code>CachedRowSet</code> objects is to provide
  * scrolling and updating for <code>ResultSet</code> objects that
@@ -377,7 +377,7 @@
  * and it is well suited to sending data to a thin client. However, a
  * <code>CachedRowSet</code> object does have a limitation: It is limited in
  * size by the amount of data it can store in memory at one time.
- * <P>
+ *
  * <h3>8.0 Getting Universal Data Access</h3>
  * Another advantage of the <code>CachedRowSet</code> class is that it makes it
  * possible to retrieve and store data from sources other than a relational
@@ -390,7 +390,7 @@
  * non-SQL data sources. Nevertheless, it is expected that most of the time,
  * <code>CachedRowSet</code> objects will contain data that was fetched
  * from an SQL database using the JDBC API.
- * <P>
+ *
  * <h3>9.0 Setting Properties</h3>
  * All rowsets maintain a set of properties, which will usually be set using
  * a tool.  The number and kinds of properties a rowset has will vary,
--- a/src/share/classes/javax/sql/rowset/FilteredRowSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/FilteredRowSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -68,7 +68,7 @@
  * By implementing a <code>Predicate</code> (see example in <a href="Predicate.html">Predicate</a>
  * class JavaDoc), a <code>FilteredRowSet</code> could then be used as described
  * below.
- * <P>
+ *
  * <pre>
  * {@code
  *     FilteredRowSet frs = new FilteredRowSetImpl();
@@ -91,7 +91,7 @@
  * This framework allows multiple classes implementing predicates to be
  * used in combination to achieved the required filtering result with
  * out the need for query language processing.
- * <p>
+ *
  * <h3>4.0 Updating a <code>FilteredRowSet</code> Object</h3>
  * The predicate set on a <code>FilteredRowSet</code> object
  * applies a criterion on all rows in a
@@ -112,7 +112,7 @@
  * immediate effect on criterion enforcement within the
  * <code>FilteredRowSet</code> object, and all subsequent views and updates will be
  * subject to similar enforcement.
- * <p>
+ *
  * <h3>5.0 Behavior of Rows Outside the Filter</h3>
  * Rows that fall outside of the filter set on a <code>FilteredRowSet</code>
  * object cannot be modified until the filter is removed or a
--- a/src/share/classes/javax/sql/rowset/JdbcRowSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/JdbcRowSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -59,7 +59,7 @@
  * with the data of a <code>ResultSet</code> object and then operate on the
  * <code>JdbcRowSet</code> object as if it were the <code>ResultSet</code>
  * object.
- * <P>
+ *
  * <h3>2.0 Creating a <code>JdbcRowSet</code> Object</h3>
  * The reference implementation of the <code>JdbcRowSet</code> interface,
  * <code>JdbcRowSetImpl</code>, provides an implementation of
--- a/src/share/classes/javax/sql/rowset/JoinRowSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/JoinRowSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -47,8 +47,7 @@
  * establishing an SQL <code>JOIN</code> relationship. The match column may
  * alternatively be set by supplying it to the appropriate version of the
  * <code>JointRowSet</code> method <code>addRowSet</code>.
- * <P>
- * <p>
+ *
  * <h3>1.0 Overview</h3>
  * Disconnected <code>RowSet</code> objects (<code>CachedRowSet</code> objects
  * and implementations extending the <code>CachedRowSet</code> interface)
@@ -98,7 +97,7 @@
  * inner join. The comments for the fields in the
  * <code>JoinRowSet</code> interface explain these <code>JOIN</code> types, which are
  * standard SQL <code>JOIN</code> types.
- * <P>
+ *
  * <h3>2.0 Using a <code>JoinRowSet</code> Object for Creating a <code>JOIN</code></h3>
  * When a <code>JoinRowSet</code> object is created, it is empty.
  * The first <code>RowSet</code> object to be added becomes the basis for the
@@ -193,7 +192,7 @@
  * tables. The data in each row in <i>four01k</i> in which the value for the
  * <code>EMP_ID</code> column matches a value for the <code>EMP_ID</code> column
  * in <i>jrs</i> has been added to <i>jrs</i>.
- * <P>
+ *
  * <h3>4.0 <code>JoinRowSet</code> Methods</h3>
  * The <code>JoinRowSet</code> interface supplies several methods for adding
  * <code>RowSet</code> objects and for getting information about the
@@ -217,7 +216,7 @@
  *   <LI>A method to make a separate copy of the <code>JoinRowSet</code> object<BR>
  *       This method creates a copy that can be persisted to the data source.
  * </UL>
- * <P>
+ *
  */
 
 public interface JoinRowSet extends WebRowSet {
--- a/src/share/classes/javax/sql/rowset/Joinable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/Joinable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -57,7 +57,7 @@
  *         :
  *     }
  * </pre>
- * <P>
+ *
  * <h3>2.0 Usage Guidelines</h3>
  * <P>
  * The methods in the <code>Joinable</code> interface allow a <code>RowSet</code> object
@@ -66,7 +66,7 @@
  * An instance of a class that implements these methods can be added to a
  * <code>JoinRowSet</code> object to allow an SQL <code>JOIN</code> relationship to
  *  be established.
- * <p>
+ *
  * <pre>
  *     CachedRowSet crs = new MyRowSetImpl();
  *     crs.populate((ResultSet)rs);
@@ -97,7 +97,7 @@
  * <code>JdbcRowSet</code> object, being always connected to its data source, can
  * become part of an SQL <code>JOIN</code> directly without having to become part
  * of a <code>JoinRowSet</code> object.
- * <P>
+ *
  * <h3>3.0 Managing Multiple Match Columns</h3>
  * The index array passed into the <code>setMatchColumn</code> methods indicates
  * how many match columns are being set (the length of the array) in addition to
--- a/src/share/classes/javax/sql/rowset/Predicate.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/Predicate.java	Wed Oct 30 18:38:20 2013 +0000
@@ -31,7 +31,7 @@
 /**
  * The standard interface that provides the framework for all
  * <code>FilteredRowSet</code> objects to describe their filters.
- * <p>
+ *
  * <h3>1.0 Background</h3>
  * The <code>Predicate</code> interface is a standard interface that
  * applications can implement to define the filter they wish to apply to a
--- a/src/share/classes/javax/sql/rowset/WebRowSet.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/WebRowSet.java	Wed Oct 30 18:38:20 2013 +0000
@@ -35,7 +35,7 @@
 /**
  * The standard interface that all implementations of a {@code WebRowSet}
  * must implement.
- * <P>
+ *
  * <h3>1.0 Overview</h3>
  * The {@code WebRowSetImpl} provides the standard
  * reference implementation, which may be extended if required.
@@ -77,12 +77,12 @@
  * in its data back to the originating data source.
  * </li>
  * </ul>
- * <P>
+ *
  * <h3>2.0 WebRowSet States</h3>
  * The following sections demonstrates how a {@code WebRowSet} implementation
  * should use the XML Schema to describe update, insert, and delete operations
  * and to describe the state of a {@code WebRowSet} object in XML.
- * <p>
+ *
  * <h4>2.1 State 1 - Outputting a {@code WebRowSet} Object to XML</h4>
  * In this example, a {@code WebRowSet} object is created and populated with a simple 2 column,
  * 5 row table from a data source. Having the 5 rows in a {@code WebRowSet} object
--- a/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -53,7 +53,7 @@
  * per Java VM at any one time. This ensures that there is a single source from which a
  * <code>RowSet</code> implementation can obtain its <code>SyncProvider</code>
  * implementation.
- * <p>
+ *
  * <h3>1.0 Overview</h3>
  * The <code>SyncFactory</code> class provides an internal registry of available
  * synchronization provider implementations (<code>SyncProvider</code> objects).
@@ -92,12 +92,12 @@
  * the <code>SyncFactory</code> does not contain a reference to this provider,
  * a <code>SyncFactoryException</code> is thrown stating that the synchronization
  * provider could not be found.
- * <p>
+ *
  * <li>If a <code>RowSet</code> implementation is instantiated with a specified
  * provider and the specified provider has been properly registered, the
  * requested provider is supplied. Otherwise a <code>SyncFactoryException</code>
  * is thrown.
- * <p>
+ *
  * <li>If a <code>RowSet</code> object does not specify a
  * <code>SyncProvider</code> implementation and no additional
  * <code>SyncProvider</code> implementations are available, the reference
@@ -143,7 +143,7 @@
  *     rowset.provider.vendor.2=Fred, Inc.
  *     rowset.provider.version.2=1.0
  * </PRE>
- * <p>
+ *
  * <li><b>Using a JNDI Context</b><BR>
  * Available providers can be registered on a JNDI
  * context, and the <code>SyncFactory</code> will attempt to load
--- a/src/share/classes/javax/sql/rowset/spi/SyncProvider.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/spi/SyncProvider.java	Wed Oct 30 18:38:20 2013 +0000
@@ -54,7 +54,7 @@
  * <code>XmlReader</code> object to read data in XML format to populate itself with that
  * data.  It uses the <code>XmlWriter</code> object to write itself to a stream or
  * <code>java.io.Writer</code> object in XML format.
- * <P>
+ *
  * <h3>1.0 Naming Convention for Implementations</h3>
  * As a guide  to naming <code>SyncProvider</code>
  * implementations, the following should be noted:
@@ -129,7 +129,7 @@
  * registered with the <code>SyncFactory</code> instance, <i>crs</i> will be
  * assigned the default provider in the reference implementation, which is
  * <code>com.sun.rowset.providers.RIOptimisticProvider</code>.
- * <p>
+ *
  * <h3>3.0 Violations and Synchronization Issues</h3>
  * If an update between a disconnected <code>RowSet</code> object
  * and a data source violates
@@ -147,7 +147,7 @@
  * violation is not handled by the <code>SyncProvider</code> implementation,
  * all <code>SyncProvider</code>
  * objects must throw a <code>SyncProviderException</code>.
- * <p>
+ *
  * <h3>4.0 Updatable SQL VIEWs</h3>
  * It is possible for any disconnected or connected <code>RowSet</code> object to be populated
  * from an SQL query that is formulated originally from an SQL <code>VIEW</code>.
@@ -167,7 +167,7 @@
  * <P>
  * The default is for a <code>RowSet</code> object not to be updatable if it was
  * populated with data from an SQL <code>VIEW</code>.
- * <P>
+ *
  * <h3>5.0 <code>SyncProvider</code> Constants</h3>
  * The <code>SyncProvider</code> class provides three sets of constants that
  * are used as return values or parameters for <code>SyncProvider</code> methods.
--- a/src/share/classes/javax/sql/rowset/spi/SyncResolver.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/sql/rowset/spi/SyncResolver.java	Wed Oct 30 18:38:20 2013 +0000
@@ -41,7 +41,7 @@
  * the data source row has been modified since the last synchronization. Note also that
  * a <code>RowSet</code> object's original values are the values it had just prior to the
  * the last synchronization, which are not necessarily its initial values.
- * <p>
+ *
  *
  * <H2>Description of a <code>SyncResolver</code> Object</H2>
  *
@@ -68,7 +68,7 @@
  * <code>SyncResolver</code> object contains the values from the data source that caused
  * the conflict(s) and <code>null</code> for all other values.
  * In addition, it contains information about each conflict.
- * <P>
+ *
  *
  * <H2>Getting and Using a <code>SyncResolver</code> Object</H2>
  *
@@ -99,7 +99,7 @@
  * <P>
  * The following kinds of information can be obtained from a <code>SyncResolver</code>
  * object:
- * <P>
+ *
  *    <h3>What operation was being attempted when a conflict occurred</h3>
  * The <code>SyncProvider</code> interface defines four constants
  * describing states that may occur. Three
@@ -111,7 +111,7 @@
  * <PRE>
  *     {@code int operation = resolver.getStatus(); }
  * </PRE>
- * <P>
+ *
  *    <h3>The value in the data source that caused a conflict</h3>
  * A conflict exists when a value that a <code>RowSet</code> object has changed
  * and is attempting to write to the data source
@@ -142,7 +142,7 @@
  * An application calls the method <code>setResolvedValue</code> after it has
  * resolved all of the conflicts in the current conflict row and repeats this process
  * for each conflict row in the <code>SyncResolver</code> object.
- * <P>
+ *
  *
  * <H2>Navigating a <code>SyncResolver</code> Object</H2>
  *
--- a/src/share/classes/javax/swing/JTable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/swing/JTable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -52,6 +52,7 @@
 
 import javax.print.attribute.*;
 import javax.print.PrintService;
+import sun.reflect.misc.ReflectUtil;
 
 import sun.swing.SwingUtilities2;
 import sun.swing.SwingUtilities2.Section;
@@ -5462,14 +5463,15 @@
             // they have the option to replace the value with
             // null or use escape to restore the original.
             // For Strings, return "" for backward compatibility.
-            if ("".equals(s)) {
-                if (constructor.getDeclaringClass() == String.class) {
-                    value = s;
-                }
-                return super.stopCellEditing();
-            }
-
             try {
+                if ("".equals(s)) {
+                    if (constructor.getDeclaringClass() == String.class) {
+                        value = s;
+                    }
+                    return super.stopCellEditing();
+                }
+
+                SwingUtilities2.checkAccess(constructor.getModifiers());
                 value = constructor.newInstance(new Object[]{s});
             }
             catch (Exception e) {
@@ -5493,6 +5495,8 @@
                 if (type == Object.class) {
                     type = String.class;
                 }
+                ReflectUtil.checkPackageAccess(type);
+                SwingUtilities2.checkAccess(type.getModifiers());
                 constructor = type.getConstructor(argTypes);
             }
             catch (Exception e) {
--- a/src/share/classes/javax/swing/UIDefaults.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/swing/UIDefaults.java	Wed Oct 30 18:38:20 2013 +0000
@@ -53,6 +53,7 @@
 
 import sun.reflect.misc.MethodUtil;
 import sun.reflect.misc.ReflectUtil;
+import sun.swing.SwingUtilities2;
 import sun.util.CoreResourceBundleControl;
 
 /**
@@ -1101,7 +1102,7 @@
                         }
                         ReflectUtil.checkPackageAccess(className);
                         c = Class.forName(className, true, (ClassLoader)cl);
-                        checkAccess(c.getModifiers());
+                        SwingUtilities2.checkAccess(c.getModifiers());
                         if (methodName != null) {
                             Class[] types = getClassArray(args);
                             Method m = c.getMethod(methodName, types);
@@ -1109,7 +1110,7 @@
                         } else {
                             Class[] types = getClassArray(args);
                             Constructor constructor = c.getConstructor(types);
-                            checkAccess(constructor.getModifiers());
+                            SwingUtilities2.checkAccess(constructor.getModifiers());
                             return constructor.newInstance(args);
                         }
                     } catch(Exception e) {
@@ -1124,13 +1125,6 @@
             }, acc);
         }
 
-        private void checkAccess(int modifiers) {
-            if(System.getSecurityManager() != null &&
-                    !Modifier.isPublic(modifiers)) {
-                throw new SecurityException("Resource is not accessible");
-            }
-        }
-
         /*
          * Coerce the array of class types provided into one which
          * looks the way the Reflection APIs expect.  This is done
--- a/src/share/classes/javax/swing/text/DefaultFormatter.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/swing/text/DefaultFormatter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -24,7 +24,8 @@
  */
 package javax.swing.text;
 
-import sun.reflect.misc.ConstructorUtil;
+import sun.reflect.misc.ReflectUtil;
+import sun.swing.SwingUtilities2;
 
 import java.io.Serializable;
 import java.lang.reflect.*;
@@ -247,7 +248,9 @@
             Constructor cons;
 
             try {
-                cons = ConstructorUtil.getConstructor(vc, new Class[]{String.class});
+                ReflectUtil.checkPackageAccess(vc);
+                SwingUtilities2.checkAccess(vc.getModifiers());
+                cons = vc.getConstructor(new Class[]{String.class});
 
             } catch (NoSuchMethodException nsme) {
                 cons = null;
@@ -255,6 +258,7 @@
 
             if (cons != null) {
                 try {
+                    SwingUtilities2.checkAccess(cons.getModifiers());
                     return cons.newInstance(new Object[] { string });
                 } catch (Throwable ex) {
                     throw new ParseException("Error creating instance", 0);
--- a/src/share/classes/javax/swing/text/NumberFormatter.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/swing/text/NumberFormatter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -27,6 +27,8 @@
 import java.lang.reflect.*;
 import java.text.*;
 import java.util.*;
+import sun.reflect.misc.ReflectUtil;
+import sun.swing.SwingUtilities2;
 
 /**
  * <code>NumberFormatter</code> subclasses <code>InternationalFormatter</code>
@@ -427,10 +429,12 @@
                         valueClass = value.getClass();
                     }
                     try {
+                        ReflectUtil.checkPackageAccess(valueClass);
+                        SwingUtilities2.checkAccess(valueClass.getModifiers());
                         Constructor cons = valueClass.getConstructor(
                                               new Class[] { String.class });
-
                         if (cons != null) {
+                            SwingUtilities2.checkAccess(cons.getModifiers());
                             return cons.newInstance(new Object[]{string});
                         }
                     } catch (Throwable ex) { }
--- a/src/share/classes/javax/swing/text/html/ObjectView.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/javax/swing/text/html/ObjectView.java	Wed Oct 30 18:38:20 2013 +0000
@@ -31,6 +31,9 @@
 import java.beans.*;
 import java.lang.reflect.*;
 
+import sun.reflect.misc.MethodUtil;
+import sun.reflect.misc.ReflectUtil;
+
 /**
  * Component decorator that implements the view interface
  * for &lt;object&gt; elements.
@@ -87,6 +90,7 @@
         AttributeSet attr = getElement().getAttributes();
         String classname = (String) attr.getAttribute(HTML.Attribute.CLASSID);
         try {
+            ReflectUtil.checkPackageAccess(classname);
             Class c = Class.forName(classname, true,Thread.currentThread().
                                     getContextClassLoader());
             Object o = c.newInstance();
@@ -116,28 +120,6 @@
     }
 
     /**
-     * Get a Class object to use for loading the
-     * classid.  If possible, the Classloader
-     * used to load the associated Document is used.
-     * This would typically be the same as the ClassLoader
-     * used to load the EditorKit.  If the documents
-     * ClassLoader is null,
-     * <code>Class.forName</code> is used.
-     */
-    private Class getClass(String classname) throws ClassNotFoundException {
-        Class klass;
-
-        Class docClass = getDocument().getClass();
-        ClassLoader loader = docClass.getClassLoader();
-        if (loader != null) {
-            klass = loader.loadClass(classname);
-        } else {
-            klass = Class.forName(classname);
-        }
-        return klass;
-    }
-
-    /**
      * Initialize this component according the KEY/VALUEs passed in
      * via the &lt;param&gt; elements in the corresponding
      * &lt;object&gt; element.
@@ -170,7 +152,7 @@
                 }
                 Object [] args = { value };
                 try {
-                    writer.invoke(comp, args);
+                    MethodUtil.invoke(writer, comp, args);
                 } catch (Exception ex) {
                     System.err.println("Invocation failed");
                     // invocation code
--- a/src/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java	Wed Oct 30 18:38:20 2013 +0000
@@ -27,6 +27,7 @@
 
 import java.io.*;
 import java.util.InvalidPropertiesFormatException;
+import java.util.Map.Entry;
 import java.util.Properties;
 import jdk.internal.org.xml.sax.Attributes;
 import jdk.internal.org.xml.sax.InputSource;
@@ -107,12 +108,17 @@
                 writer.writeEndElement();
             }
 
-            for (String key : props.stringPropertyNames()) {
-                String val = props.getProperty(key);
-                writer.writeStartElement(ELEMENT_ENTRY);
-                writer.writeAttribute(ATTR_KEY, key);
-                writer.writeCharacters(val);
-                writer.writeEndElement();
+            synchronized(props) {
+                for (Entry<Object, Object> e : props.entrySet()) {
+                    final Object k = e.getKey();
+                    final Object v = e.getValue();
+                    if (k instanceof String && v instanceof String) {
+                        writer.writeStartElement(ELEMENT_ENTRY);
+                        writer.writeAttribute(ATTR_KEY, (String)k);
+                        writer.writeCharacters((String)v);
+                        writer.writeEndElement();
+                    }
+                }
             }
 
             writer.writeEndElement();
--- a/src/share/classes/sun/applet/AppletClassLoader.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/applet/AppletClassLoader.java	Wed Oct 30 18:38:20 2013 +0000
@@ -239,6 +239,7 @@
      * the "localhost".
      *
      * @param codesource the codesource
+     * @throws NullPointerException if {@code codesource} is {@code null}.
      * @return the permissions granted to the codesource
      */
     protected PermissionCollection getPermissions(CodeSource codesource)
--- a/src/share/classes/sun/awt/AppContext.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/awt/AppContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -839,6 +839,15 @@
                 return (numAppContexts.get() == 1 && mainAppContext != null);
             }
 
+            private boolean hasRootThreadGroup(final AppContext ecx) {
+                return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+                    @Override
+                    public Boolean run() {
+                        return ecx.threadGroup.getParent() == null;
+                    }
+                });
+            }
+
             /**
              * Returns the AppContext used for applet logging isolation, or null if
              * the default global context can be used.
@@ -886,7 +895,7 @@
                 // See: JDK-8023258
                 final boolean isMainAppContext = ecx == null
                     || mainAppContext == ecx
-                    || mainAppContext == null && ecx.threadGroup.getParent() == null;
+                    || mainAppContext == null && hasRootThreadGroup(ecx);
 
                 return isMainAppContext ? null : ecx;
             }
--- a/src/share/classes/sun/font/FontUtilities.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/font/FontUtilities.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -133,9 +133,9 @@
                     debugFonts = true;
                     logger = PlatformLogger.getLogger("sun.java2d");
                     if (debugLevel.equals("warning")) {
-                        logger.setLevel(PlatformLogger.WARNING);
+                        logger.setLevel(PlatformLogger.Level.WARNING);
                     } else if (debugLevel.equals("severe")) {
-                        logger.setLevel(PlatformLogger.SEVERE);
+                        logger.setLevel(PlatformLogger.Level.SEVERE);
                     }
                 }
 
--- a/src/share/classes/sun/font/GlyphLayout.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/font/GlyphLayout.java	Wed Oct 30 18:38:20 2013 +0000
@@ -468,9 +468,10 @@
                         _gvdata.grow();
                     }
                 }
-                if (_gvdata._count < 0) {
-                    break;
-                }
+            }
+            // Break out of the outer for loop if layout fails.
+            if (_gvdata._count < 0) {
+                break;
             }
         }
 
--- a/src/share/classes/sun/invoke/util/VerifyAccess.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/invoke/util/VerifyAccess.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 
 import java.lang.reflect.Modifier;
 import static java.lang.reflect.Modifier.*;
+import sun.reflect.Reflection;
 
 /**
  * This class centralizes information about the JVM's linkage access control.
@@ -140,7 +141,17 @@
     }
 
     static boolean isPublicSuperClass(Class<?> defc, Class<?> lookupClass) {
-        return isPublic(defc.getModifiers()) && defc.isAssignableFrom(lookupClass);
+        return isPublic(getClassModifiers(defc)) && defc.isAssignableFrom(lookupClass);
+    }
+
+    static int getClassModifiers(Class<?> c) {
+        // This would return the mask stored by javac for the source-level modifiers.
+        //   return c.getModifiers();
+        // But what we need for JVM access checks are the actual bits from the class header.
+        // ...But arrays and primitives are synthesized with their own odd flags:
+        if (c.isArray() || c.isPrimitive())
+            return c.getModifiers();
+        return Reflection.getClassAccessFlags(c);
     }
 
     /**
@@ -159,7 +170,7 @@
         if (allowedModes == 0)  return false;
         assert((allowedModes & PUBLIC) != 0 &&
                (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED)) == 0);
-        int mods = refc.getModifiers();
+        int mods = getClassModifiers(refc);
         if (isPublic(mods))
             return true;
         if ((allowedModes & PACKAGE_ALLOWED) != 0 &&
--- a/src/share/classes/sun/java2d/Disposer.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/java2d/Disposer.java	Wed Oct 30 18:38:20 2013 +0000
@@ -155,8 +155,7 @@
                 rec = null;
                 clearDeferredRecords();
             } catch (Exception e) {
-                System.out.println("Exception while removing reference: " + e);
-                e.printStackTrace();
+                System.out.println("Exception while removing reference.");
             }
         }
     }
@@ -182,7 +181,6 @@
                 rec.dispose();
             } catch (Exception e) {
                 System.out.println("Exception while disposing deferred rec.");
-                e.printStackTrace();
             }
         }
         deferredRecords.clear();
@@ -233,8 +231,7 @@
                 }
             }
         } catch (Exception e) {
-            System.out.println("Exception while removing reference: " + e);
-            e.printStackTrace();
+            System.out.println("Exception while removing reference.");
         } finally {
             pollingQueue = false;
         }
--- a/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -34,7 +34,7 @@
 java.launcher.ergo.message2  =\                  porque a execu\u00E7\u00E3o est\u00E1 sendo feita em uma m\u00E1quina de classe de servidor.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, archives JAR\n                  e archives ZIP nos quais ser\u00E3o procurados os arquivos de classe.\n    -D<nome>=<valor>\n                  define uma propriedade do sistema\n    -verbose:[classe|gc|jni]\n                  ativa a sa\u00EDda detalhada\n    -version      imprime a vers\u00E3o do produto e sai do programa\n    -version:<valor>\n                  requer a execu\u00E7\u00E3o da vers\u00E3o especificada\n    -showversion  imprime a vers\u00E3o do produto e continua\n    -jre-restrict-search | -no-jre-restrict-search\n                  inclui/exclui JREs privados do usu\u00E1rio na pesquisa de vers\u00E3o\n    -? -help      imprime esta mensagem de ajuda\n    -X            imprime a ajuda sobre op\u00E7\u00F5es n\u00E3o padronizadas\n    -ea[:<nome do pacote>...|:<nome da classe>]\n    -enableassertions[:<nome do pacote>...|:<nome da classe>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<nome do pacote>...|:<nome da classe>]\n    -disableassertions[:<nome do pacote>...|:<nome da classe>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es do sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es do sistema\n    -agentlib:<nome da biblioteca>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa <nome da biblioteca>, por exemplo: -agentlib:hprof\n                  consulte tamb\u00E9m: -agentlib:jdwp=help e -agentlib:hprof=help\n    -agentpath:<nome do caminho>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa com base no nome do caminho completo\n    -javaagent:<caminho do arquivo jar>[=<op\u00E7\u00F5es>]\n                  carrega o agente da linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n    -splash:<caminho da imagem>\n                  mostra a tela de abertura com a imagem especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes.
+java.launcher.opt.footer     =\    -cp <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, archives JAR\n                  e archives ZIP nos quais ser\u00E3o procurados os arquivos de classe.\n    -D<nome>=<valor>\n                  define uma propriedade do sistema\n    -verbose:[class|gc|jni]\n                  ativa a sa\u00EDda detalhada\n    -version      imprime a vers\u00E3o do produto e sai do programa\n    -version:<valor>\n                  requer a execu\u00E7\u00E3o da vers\u00E3o especificada\n    -showversion  imprime a vers\u00E3o do produto e continua\n    -jre-restrict-search | -no-jre-restrict-search\n                  inclui/exclui JREs privados do usu\u00E1rio na pesquisa de vers\u00E3o\n    -? -help      imprime esta mensagem de ajuda\n    -X            imprime a ajuda sobre op\u00E7\u00F5es n\u00E3o padronizadas\n    -ea[:<nome do pacote>...|:<nome da classe>]\n    -enableassertions[:<nome do pacote>...|:<nome da classe>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<nome do pacote>...|:<nome da classe>]\n    -disableassertions[:<nome do pacote>...|:<nome da classe>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es do sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es do sistema\n    -agentlib:<nome da biblioteca>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa <nome da biblioteca>, por exemplo: -agentlib:hprof\n                  consulte tamb\u00E9m: -agentlib:jdwp=help e -agentlib:hprof=help\n    -agentpath:<nome do caminho>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa com base no nome do caminho completo\n    -javaagent:<caminho do arquivo jar>[=<op\u00E7\u00F5es>]\n                  carrega o agente da linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n    -splash:<caminho da imagem>\n                  mostra a tela de abertura com a imagem especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes.
 
 # Translators please note do not translate the options themselves
 java.launcher.X.usage=\    -Xmixed           execu\u00E7\u00E3o no modo misto (default)\n    -Xint             execu\u00E7\u00E3o somente no modo interpretado\n    -Xbootclasspath:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      define o caminho de pesquisa para classes e recursos de inicializa\u00E7\u00E3o\n    -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa no final do caminho da classe de inicializa\u00E7\u00E3o\n    -Xbootclasspath/p:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa no in\u00EDcio do caminho da classe de inicializa\u00E7\u00E3o\n    -Xdiag            mostra mensagens de diagn\u00F3stico adicionais\n    -Xnoclassgc       desativa a coleta de lixo da classe\n    -Xincgc           ativa a coleta de lixo incremental\n    -Xloggc:<arquivo>    registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n    -Xbatch           desativa a compila\u00E7\u00E3o em segundo plano\n    -Xms<tamanho>        define o tamanho inicial do heap Java\n    -Xmx<tamanho>        define o tamanho m\u00E1ximo do heap Java\n    -Xss<tamanho>        define o tamanho da pilha de threads java\n    -Xprof            produz dados de perfil da cpu\n    -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor default futuro\n    -Xrs              reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n    -Xshare:off       n\u00E3o tenta usar dados da classe compartilhada\n    -Xshare:auto      se poss\u00EDvel, usa dados da classe compartilhada (default)\n    -Xshare:on        requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es da propriedade e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n\nAs -X options n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n
--- a/src/share/classes/sun/management/Agent.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/management/Agent.java	Wed Oct 30 18:38:20 2013 +0000
@@ -323,7 +323,7 @@
                     : String.format(
                     "service:jmx:rmi:///jndi/rmi://%s:%s/jmxrmi", hostname, jmxremotePort);
 
-            String instanceName = System.getProperty("com.sun.management.jdp.name");
+            String instanceName = props.getProperty("com.sun.management.jdp.name");
 
             try{
                JdpController.startDiscoveryService(address, port, instanceName, jmxUrlStr);
--- a/src/share/classes/sun/management/HotSpotDiagnostic.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/management/HotSpotDiagnostic.java	Wed Oct 30 18:38:20 2013 +0000
@@ -40,7 +40,17 @@
     public HotSpotDiagnostic() {
     }
 
-    public native void dumpHeap(String outputFile, boolean live) throws IOException;
+    public void dumpHeap(String outputFile, boolean live) throws IOException {
+        SecurityManager security = System.getSecurityManager();
+        if (security != null) {
+            security.checkWrite(outputFile);
+            Util.checkControlAccess();
+        }
+
+        dumpHeap0(outputFile, live);
+    }
+
+    private native void dumpHeap0(String outputFile, boolean live) throws IOException;
 
     public List<VMOption> getDiagnosticOptions() {
         List<Flag> allFlags = Flag.getAllFlags();
--- a/src/share/classes/sun/management/jdp/JdpController.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/management/jdp/JdpController.java	Wed Oct 30 18:38:20 2013 +0000
@@ -29,6 +29,12 @@
 import java.net.UnknownHostException;
 import java.util.UUID;
 
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import sun.management.VMManagement;
+
 /**
  * JdpController is responsible to create and manage a broadcast loop
  *
@@ -126,6 +132,25 @@
         }
     }
 
+    // Get the process id of the current running Java process
+    private static Integer getProcessId() {
+        try {
+            // Get the current process id using a reflection hack
+            RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
+            Field jvm = runtime.getClass().getDeclaredField("jvm");
+            jvm.setAccessible(true);
+
+            VMManagement mgmt = (sun.management.VMManagement) jvm.get(runtime);
+            Method pid_method = mgmt.getClass().getDeclaredMethod("getProcessId");
+            pid_method.setAccessible(true);
+            Integer pid = (Integer) pid_method.invoke(mgmt);
+            return pid;
+        } catch(Exception ex) {
+            return null;
+        }
+    }
+
+
     /**
      * Starts discovery service
      *
@@ -173,6 +198,20 @@
         // it the key is skipped. PacketWriter is responsible to skip keys having null value.
         packet.setInstanceName(instanceName);
 
+        // Set rmi server hostname if it explicitly specified by user with
+        // java.rmi.server.hostname
+        String rmiHostname = System.getProperty("java.rmi.server.hostname");
+        packet.setRmiHostname(rmiHostname);
+
+        // Set broadcast interval
+        packet.setBroadcastInterval(new Integer(pause).toString());
+
+        // Set process id
+        Integer pid = getProcessId();
+        if (pid != null) {
+           packet.setProcessId(pid.toString());
+        }
+
         JdpBroadcaster bcast = new JdpBroadcaster(address, sourceAddress, port, ttl);
 
         // Stop discovery service if it's already running
--- a/src/share/classes/sun/management/jdp/JdpJmxPacket.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/management/jdp/JdpJmxPacket.java	Wed Oct 30 18:38:20 2013 +0000
@@ -64,11 +64,27 @@
      * Name of Java instance
      */
     public final static String INSTANCE_NAME_KEY = "INSTANCE_NAME";
+    /**
+     * PID of java process, optional presented if it could be obtained
+     */
+    public final static String PROCESS_ID_KEY = "PROCESS_ID";
+    /**
+     * Hostname of rmi server, optional presented if user overrides rmi server
+     * hostname by java.rmi.server.hostname property
+     */
+    public final static String RMI_HOSTNAME_KEY = "RMI_HOSTNAME";
+    /**
+     * Configured broadcast interval, optional
+     */
+    public final static String BROADCAST_INTERVAL_KEY = "BROADCAST_INTERVAL";
 
     private UUID id;
     private String mainClass;
     private String jmxServiceUrl;
     private String instanceName;
+    private String processId;
+    private String rmiHostname;
+    private String broadcastInterval;
 
     /**
      * Create new instance from user provided data. Set mandatory fields
@@ -99,6 +115,9 @@
         this.jmxServiceUrl = p.get(JMX_SERVICE_URL_KEY);
         this.mainClass = p.get(MAIN_CLASS_KEY);
         this.instanceName = p.get(INSTANCE_NAME_KEY);
+        this.processId = p.get(PROCESS_ID_KEY);
+        this.rmiHostname = p.get(RMI_HOSTNAME_KEY);
+        this.broadcastInterval = p.get(BROADCAST_INTERVAL_KEY);
     }
 
     /**
@@ -150,6 +169,30 @@
         return instanceName;
     }
 
+    public String getProcessId() {
+        return processId;
+    }
+
+    public void setProcessId(String processId) {
+        this.processId = processId;
+    }
+
+    public String getRmiHostname() {
+        return rmiHostname;
+    }
+
+    public void setRmiHostname(String rmiHostname) {
+        this.rmiHostname = rmiHostname;
+    }
+
+    public String getBroadcastInterval() {
+        return broadcastInterval;
+    }
+
+    public void setBroadcastInterval(String broadcastInterval) {
+        this.broadcastInterval = broadcastInterval;
+    }
+
     /**
      *
      * @return assembled packet ready to be sent across a Net
@@ -164,6 +207,10 @@
         writer.addEntry(MAIN_CLASS_KEY, mainClass);
         writer.addEntry(JMX_SERVICE_URL_KEY, jmxServiceUrl);
         writer.addEntry(INSTANCE_NAME_KEY, instanceName);
+        writer.addEntry(PROCESS_ID_KEY, processId);
+        writer.addEntry(RMI_HOSTNAME_KEY, rmiHostname);
+        writer.addEntry(BROADCAST_INTERVAL_KEY, broadcastInterval);
+
         return writer.getPacketBytes();
     }
 
--- a/src/share/classes/sun/misc/JavaLangAccess.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/misc/JavaLangAccess.java	Wed Oct 30 18:38:20 2013 +0000
@@ -27,6 +27,9 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Executable;
+import java.security.AccessControlContext;
+import java.util.Map;
+
 import sun.reflect.ConstantPool;
 import sun.reflect.annotation.AnnotationType;
 import sun.nio.ch.Interruptible;
@@ -48,6 +51,11 @@
     AnnotationType getAnnotationType(Class<?> klass);
 
     /**
+     * Get the declared annotations for a given class, indexed by their types.
+     */
+    Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap(Class<?> klass);
+
+    /**
      * Get the array of bytes that is the class-file representation
      * of this Class' annotations.
      */
@@ -113,4 +121,10 @@
      * @return a newly created string whose content is the character array
      */
     String newStringUnsafe(char[] chars);
+
+    /**
+     * Returns a new Thread with the given Runnable and an
+     * inherited AccessControlContext.
+     */
+    Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
 }
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Oct 30 18:38:20 2013 +0000
@@ -903,6 +903,18 @@
 
     private String getHostAndPort(URL url) {
         String host = url.getHost();
+        final String hostarg = host;
+        try {
+            // lookup hostname and use IP address if available
+            host = AccessController.doPrivileged(
+                new PrivilegedExceptionAction<String>() {
+                    public String run() throws IOException {
+                            InetAddress addr = InetAddress.getByName(hostarg);
+                            return addr.getHostAddress();
+                    }
+                }
+            );
+        } catch (PrivilegedActionException e) {}
         int port = url.getPort();
         if (port == -1) {
             String scheme = url.getProtocol();
--- a/src/share/classes/sun/nio/ch/FileChannelImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/nio/ch/FileChannelImpl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -840,7 +840,15 @@
             ti = threads.add();
             if (!isOpen())
                 return null;
-            if (size() < position + size) { // Extend file size
+
+            long filesize;
+            do {
+                filesize = nd.size(fd);
+            } while ((filesize == IOStatus.INTERRUPTED) && isOpen());
+            if (!isOpen())
+                return null;
+
+            if (filesize < position + size) { // Extend file size
                 if (!writable) {
                     throw new IOException("Channel not open for writing " +
                         "- cannot extend file to required size");
@@ -849,6 +857,8 @@
                 do {
                     rv = nd.truncate(fd, position + size);
                 } while ((rv == IOStatus.INTERRUPTED) && isOpen());
+                if (!isOpen())
+                    return null;
             }
             if (size == 0) {
                 addr = 0;
--- a/src/share/classes/sun/nio/cs/ext/DoubleByte.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/nio/cs/ext/DoubleByte.java	Wed Oct 30 18:38:20 2013 +0000
@@ -111,7 +111,6 @@
     public static class Decoder extends CharsetDecoder
                                 implements DelegatableDecoder, ArrayDecoder
     {
-
         final char[][] b2c;
         final char[] b2cSB;
         final int b2Min;
@@ -122,7 +121,12 @@
             return CoderResult.UNDERFLOW;
         }
 
-        protected CoderResult crMalformedOrUnmappable(int b) {
+        protected CoderResult crMalformedOrUnmappable(int b1, int b2) {
+            if (b2c[b1] == B2C_UNMAPPABLE ||                // isNotLeadingByte(b1)
+                b2c[b2] != B2C_UNMAPPABLE ||                // isLeadingByte(b2)
+                decodeSingle(b2) != UNMAPPABLE_DECODING) {  // isSingle(b2)
+                return CoderResult.malformedForLength(1);
+            }
             return CoderResult.unmappableForLength(2);
         }
 
@@ -161,7 +165,7 @@
                         int b2 = sa[sp + 1] & 0xff;
                         if (b2 < b2Min || b2 > b2Max ||
                             (c = b2c[b1][b2 - b2Min]) == UNMAPPABLE_DECODING) {
-                            return crMalformedOrUnmappable(b1);
+                            return crMalformedOrUnmappable(b1, b2);
                         }
                         inSize++;
                     }
@@ -190,7 +194,7 @@
                         int b2 = src.get() & 0xff;
                         if (b2 < b2Min || b2 > b2Max ||
                             (c = b2c[b1][b2 - b2Min]) == UNMAPPABLE_DECODING)
-                            return crMalformedOrUnmappable(b1);
+                            return crMalformedOrUnmappable(b1, b2);
                         inSize++;
                     }
                     dst.put(c);
@@ -221,8 +225,13 @@
                 if (c == UNMAPPABLE_DECODING) {
                     if (sp < sl) {
                         int b2 = src[sp++] & 0xff;
-                        if (b2 >= b2Min && b2 <= b2Max) {
-                            c = b2c[b1][b2 - b2Min];
+                        if (b2 < b2Min || b2 > b2Max ||
+                            (c = b2c[b1][b2 - b2Min]) == UNMAPPABLE_DECODING) {
+                            if (b2c[b1] == B2C_UNMAPPABLE ||  // isNotLeadingByte
+                                b2c[b2] != B2C_UNMAPPABLE ||  // isLeadingByte
+                                decodeSingle(b2) != UNMAPPABLE_DECODING) {
+                                sp--;
+                            }
                         }
                     }
                     if (c == UNMAPPABLE_DECODING) {
@@ -466,8 +475,8 @@
             return CoderResult.UNDERFLOW;
         }
 
-        protected CoderResult crMalformedOrUnmappable(int b) {
-            if (b == SS2 || b == SS3 )
+        protected CoderResult crMalformedOrUnmappable(int b1, int b2) {
+            if (b1 == SS2 || b1 == SS3 )
                 return CoderResult.malformedForLength(1);
             return CoderResult.unmappableForLength(2);
         }
--- a/src/share/classes/sun/nio/fs/Util.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/nio/fs/Util.java	Wed Oct 30 18:38:20 2013 +0000
@@ -27,6 +27,9 @@
 
 import java.util.*;
 import java.nio.file.*;
+import java.nio.charset.Charset;
+import java.security.*;
+import sun.security.action.*;
 
 /**
  * Utility methods
@@ -35,6 +38,33 @@
 class Util {
     private Util() { }
 
+    private static final Charset jnuEncoding = Charset.forName(
+        AccessController.doPrivileged(new GetPropertyAction("sun.jnu.encoding")));
+
+    /**
+     * Returns {@code Charset} corresponding to the sun.jnu.encoding property
+     */
+    static Charset jnuEncoding() {
+        return jnuEncoding;
+    }
+
+    /**
+     * Encodes the given String into a sequence of bytes using the {@code Charset}
+     * specified by the sun.jnu.encoding property.
+     */
+    static byte[] toBytes(String s) {
+        return s.getBytes(jnuEncoding);
+    }
+
+    /**
+     * Constructs a new String by decoding the specified array of bytes using the
+     * {@code Charset} specified by the sun.jnu.encoding property.
+     */
+    static String toString(byte[] bytes) {
+        return new String(bytes, jnuEncoding);
+    }
+
+
     /**
      * Splits a string around the given character. The array returned by this
      * method contains each substring that is terminated by the character. Use
--- a/src/share/classes/sun/reflect/Reflection.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/reflect/Reflection.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -57,6 +57,14 @@
     @CallerSensitive
     public static native Class<?> getCallerClass();
 
+    /**
+     * @deprecated This method will be removed in JDK 9.
+     * This method is a private JDK API and retained temporarily for
+     * existing code to run until a replacement API is defined.
+     */
+    @Deprecated
+    public static native Class<?> getCallerClass(int depth);
+
     /** Retrieves the access flags written to the class file. For
         inner classes these flags may differ from those returned by
         Class.getModifiers(), which searches the InnerClasses
@@ -65,7 +73,7 @@
         to compatibility reasons; see 4471811. Only the values of the
         low 13 bits (i.e., a mask of 0x1FFF) are guaranteed to be
         valid. */
-    private static native int getClassAccessFlags(Class<?> c);
+    public static native int getClassAccessFlags(Class<?> c);
 
     /** A quick "fast-path" check to try to avoid getCallerClass()
         calls. */
--- a/src/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -95,6 +95,8 @@
             Class<?> clz = (Class)type;
             if (clz.getEnclosingClass() == null)
                 return addTo;
+            if (Modifier.isStatic(clz.getModifiers()))
+                return addNesting(clz.getEnclosingClass(), addTo);
             return addNesting(clz.getEnclosingClass(), addTo.pushInner());
         } else if (type instanceof ParameterizedType) {
             ParameterizedType t = (ParameterizedType)type;
@@ -166,7 +168,7 @@
 
         @Override
         public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotation) {
-            return AnnotationSupport.getMultipleAnnotations(annotations, annotation);
+            return AnnotationSupport.getDirectlyAndIndirectlyPresent(annotations, annotation);
         }
 
         // AnnotatedType
--- a/src/share/classes/sun/reflect/annotation/AnnotationSupport.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/reflect/annotation/AnnotationSupport.java	Wed Oct 30 18:38:20 2013 +0000
@@ -28,109 +28,212 @@
 import java.lang.annotation.*;
 import java.lang.reflect.*;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
+
+import sun.misc.JavaLangAccess;
 
 public final class AnnotationSupport {
+    private static final JavaLangAccess LANG_ACCESS = sun.misc.SharedSecrets.getJavaLangAccess();
+
     /**
-     * Finds and returns all annotation of the type indicated by
-     * {@code annotationClass} from the {@code Map} {@code
-     * annotationMap}. Looks into containers of the {@code
-     * annotationClass} (as specified by an the {@code
-     * annotationClass} type being meta-annotated with an {@code
-     * Repeatable} annotation).
+     * Finds and returns all annotations in {@code annotations} matching
+     * the given {@code annoClass}.
+     *
+     * Apart from annotations directly present in {@code annotations} this
+     * method searches for annotations inside containers i.e. indirectly
+     * present annotations.
      *
-     * @param annotationMap the {@code Map} used to store annotations indexed by their type
-     * @param annotationClass the type of annotation to search for
+     * The order of the elements in the array returned depends on the iteration
+     * order of the provided map. Specifically, the directly present annotations
+     * come before the indirectly present annotations if and only if the
+     * directly present annotations come before the indirectly present
+     * annotations in the map.
      *
-     * @return an array of instances of {@code annotationClass} or an empty array if none were found
+     * @param annotations the {@code Map} in which to search for annotations
+     * @param annoClass the type of annotation to search for
+     *
+     * @return an array of instances of {@code annoClass} or an empty
+     *         array if none were found
      */
-    public static  <A extends Annotation> A[] getMultipleAnnotations(
-            final Map<Class<? extends Annotation>, Annotation> annotationMap,
-            final Class<A> annotationClass) {
-        final List<A> res = new ArrayList<A>();
+    public static <A extends Annotation> A[] getDirectlyAndIndirectlyPresent(
+            Map<Class<? extends Annotation>, Annotation> annotations,
+            Class<A> annoClass) {
+        List<A> result = new ArrayList<A>();
 
         @SuppressWarnings("unchecked")
-        final A candidate = (A)annotationMap.get(annotationClass);
-        if (candidate != null) {
-            res.add(candidate);
+        A direct = (A) annotations.get(annoClass);
+        if (direct != null)
+            result.add(direct);
+
+        A[] indirect = getIndirectlyPresent(annotations, annoClass);
+        if (indirect != null && indirect.length != 0) {
+            boolean indirectFirst = direct == null ||
+                                    containerBeforeContainee(annotations, annoClass);
+
+            result.addAll((indirectFirst ? 0 : 1), Arrays.asList(indirect));
         }
 
-        final Class<? extends Annotation> containerClass = getContainer(annotationClass);
-        if (containerClass != null) {
-            res.addAll(unpackAll(annotationMap.get(containerClass), annotationClass));
-        }
+        @SuppressWarnings("unchecked")
+        A[] arr = (A[]) Array.newInstance(annoClass, result.size());
+        return result.toArray(arr);
+    }
 
-        @SuppressWarnings("unchecked") // should be safe annotationClass is a token for A
-        final A[] emptyTemplateArray = (A[])Array.newInstance(annotationClass, 0);
-        return res.isEmpty() ? emptyTemplateArray : res.toArray(emptyTemplateArray);
+    /**
+     * Finds and returns all annotations matching the given {@code annoClass}
+     * indirectly present in {@code annotations}.
+     *
+     * @param annotations annotations to search indexed by their types
+     * @param annoClass the type of annotation to search for
+     *
+     * @return an array of instances of {@code annoClass} or an empty array if no
+     *         indirectly present annotations were found
+     */
+    private static <A extends Annotation> A[] getIndirectlyPresent(
+            Map<Class<? extends Annotation>, Annotation> annotations,
+            Class<A> annoClass) {
+
+        Repeatable repeatable = annoClass.getDeclaredAnnotation(Repeatable.class);
+        if (repeatable == null)
+            return null;  // Not repeatable -> no indirectly present annotations
+
+        Class<? extends Annotation> containerClass = repeatable.value();
+
+        Annotation container = annotations.get(containerClass);
+        if (container == null)
+            return null;
+
+        // Unpack container
+        A[] valueArray = getValueArray(container);
+        checkTypes(valueArray, container, annoClass);
+
+        return valueArray;
     }
 
-    /** Helper to get the container, or null if none, of an annotation. */
-    private static <A extends Annotation> Class<? extends Annotation> getContainer(Class<A> annotationClass) {
-        Repeatable containingAnnotation = annotationClass.getDeclaredAnnotation(Repeatable.class);
-        return (containingAnnotation == null) ? null : containingAnnotation.value();
+
+    /**
+     * Figures out if conatiner class comes before containee class among the
+     * keys of the given map.
+     *
+     * @return true if container class is found before containee class when
+     *         iterating over annotations.keySet().
+     */
+    private static <A extends Annotation> boolean containerBeforeContainee(
+            Map<Class<? extends Annotation>, Annotation> annotations,
+            Class<A> annoClass) {
+
+        Class<? extends Annotation> containerClass =
+                annoClass.getDeclaredAnnotation(Repeatable.class).value();
+
+        for (Class<? extends Annotation> c : annotations.keySet()) {
+            if (c == containerClass) return true;
+            if (c == annoClass) return false;
+        }
+
+        // Neither containee nor container present
+        return false;
     }
 
-    /** Reflectively look up and get the returned array from the the
-     * invocation of the value() element on an instance of an
-     * Annotation.
+
+    /**
+     * Finds and returns all associated annotations matching the given class.
+     *
+     * The order of the elements in the array returned depends on the iteration
+     * order of the provided maps. Specifically, the directly present annotations
+     * come before the indirectly present annotations if and only if the
+     * directly present annotations come before the indirectly present
+     * annotations in the relevant map.
+     *
+     * @param declaredAnnotations the declared annotations indexed by their types
+     * @param decl the class declaration on which to search for annotations
+     * @param annoClass the type of annotation to search for
+     *
+     * @return an array of instances of {@code annoClass} or an empty array if none were found.
      */
-    private static  <A extends Annotation> A[] getValueArray(Annotation containerInstance) {
+    public static <A extends Annotation> A[] getAssociatedAnnotations(
+            Map<Class<? extends Annotation>, Annotation> declaredAnnotations,
+            Class<?> decl,
+            Class<A> annoClass) {
+        Objects.requireNonNull(decl);
+
+        // Search declared
+        A[] result = getDirectlyAndIndirectlyPresent(declaredAnnotations, annoClass);
+
+        // Search inherited
+        if(AnnotationType.getInstance(annoClass).isInherited()) {
+            Class<?> superDecl = decl.getSuperclass();
+            while (result.length == 0 && superDecl != null) {
+                result = getDirectlyAndIndirectlyPresent(LANG_ACCESS.getDeclaredAnnotationMap(superDecl), annoClass);
+                superDecl = superDecl.getSuperclass();
+            }
+        }
+
+        return result;
+    }
+
+
+    /* Reflectively invoke the values-method of the given annotation
+     * (container), cast it to an array of annotations and return the result.
+     */
+    private static <A extends Annotation> A[] getValueArray(Annotation container) {
         try {
-            // the spec tells us the container must have an array-valued
-            // value element. Get the AnnotationType, get the "value" element
-            // and invoke it to get the contents.
+            // According to JLS the container must have an array-valued value
+            // method. Get the AnnotationType, get the "value" method and invoke
+            // it to get the content.
 
-            Class<? extends Annotation> containerClass = containerInstance.annotationType();
+            Class<? extends Annotation> containerClass = container.annotationType();
             AnnotationType annoType = AnnotationType.getInstance(containerClass);
             if (annoType == null)
-                throw new AnnotationFormatError(containerInstance + " is an invalid container for repeating annotations");
+                throw invalidContainerException(container, null);
 
             Method m = annoType.members().get("value");
             if (m == null)
-                throw new AnnotationFormatError(containerInstance +
-                                                          " is an invalid container for repeating annotations");
+                throw invalidContainerException(container, null);
+
             m.setAccessible(true);
 
-            @SuppressWarnings("unchecked") // not provably safe, but we catch the ClassCastException
-            A[] a = (A[])m.invoke(containerInstance); // this will erase to (Annotation[]) but we
-                                                      // do a runtime cast on the return-value
-                                                      // in the methods that call this method
-            return a;
-        } catch (IllegalAccessException | // couldnt loosen security
-                 IllegalArgumentException | // parameters doesn't match
+            // This will erase to (Annotation[]) but we do a runtime cast on the
+            // return-value in the method that call this method.
+            @SuppressWarnings("unchecked")
+            A[] values = (A[]) m.invoke(container);
+
+            return values;
+
+        } catch (IllegalAccessException    | // couldn't loosen security
+                 IllegalArgumentException  | // parameters doesn't match
                  InvocationTargetException | // the value method threw an exception
-                 ClassCastException e) { // well, a cast failed ...
-            throw new AnnotationFormatError(
-                    containerInstance + " is an invalid container for repeating annotations",
-                    e);
+                 ClassCastException e) {
+
+            throw invalidContainerException(container, e);
+
         }
     }
 
-    /* Sanity check type of and return a list of all the annotation
-     * instances of type {@code annotationClass} from {@code
-     * containerInstance}.
-     */
-    private static <A extends Annotation> List<A> unpackAll(Annotation containerInstance,
-                                                            Class<A> annotationClass) {
-        if (containerInstance == null) {
-            return Collections.emptyList(); // container not present
-        }
+
+    private static AnnotationFormatError invalidContainerException(Annotation anno,
+                                                                   Throwable cause) {
+        return new AnnotationFormatError(
+                anno + " is an invalid container for repeating annotations",
+                cause);
+    }
+
 
-        try {
-            A[] a = getValueArray(containerInstance);
-            List<A> l = new ArrayList<>(a.length);
-            for (int i  = 0; i < a.length; i++)
-                l.add(annotationClass.cast(a[i]));
-            return l;
-        } catch (ClassCastException |
-                 NullPointerException e) {
-            throw new AnnotationFormatError(
-                    String.format("%s is an invalid container for repeating annotations of type: %s",
-                        containerInstance, annotationClass),
-                    e);
+    /* Sanity check type of all the annotation instances of type {@code annoClass}
+     * from {@code container}.
+     */
+    private static <A extends Annotation> void checkTypes(A[] annotations,
+                                                          Annotation container,
+                                                          Class<A> annoClass) {
+        for (A a : annotations) {
+            if (!annoClass.isInstance(a)) {
+                throw new AnnotationFormatError(
+                        String.format("%s is an invalid container for " +
+                                      "repeating annotations of type: %s",
+                                      container, annoClass));
+            }
         }
     }
 }
--- a/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -54,7 +54,7 @@
      *
      * @param rawAnnotations the byte[] encoding of all type annotations on this declaration
      * @param cp the ConstantPool needed to parse the embedded Annotation
-     * @param decl the dclaration this type annotation is on
+     * @param decl the declaration this type annotation is on
      * @param container the Class this type annotation is on (may be the same as decl)
      * @param type the type the AnnotatedType corresponds to
      * @param filter the type annotation targets included in this AnnotatedType
--- a/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -198,7 +198,7 @@
     @Override
     public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) {
         Objects.requireNonNull(annotationClass);
-        return AnnotationSupport.getMultipleAnnotations(mapAnnotations(getAnnotations()), annotationClass);
+        return AnnotationSupport.getDirectlyAndIndirectlyPresent(mapAnnotations(getAnnotations()), annotationClass);
     }
 
     @Override
--- a/src/share/classes/sun/reflect/misc/ReflectUtil.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/reflect/misc/ReflectUtil.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,8 +26,10 @@
 
 package sun.reflect.misc;
 
+import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Proxy;
+import java.util.Arrays;
 import sun.reflect.Reflection;
 
 public final class ReflectUtil {
@@ -250,4 +252,50 @@
         String pkg = (i != -1) ? name.substring(0, i) : "";
         return Proxy.isProxyClass(cls) && !pkg.equals(PROXY_PACKAGE);
     }
+
+    /**
+     * Check if the given method is a method declared in the proxy interface
+     * implemented by the given proxy instance.
+     *
+     * @param proxy a proxy instance
+     * @param method an interface method dispatched to a InvocationHandler
+     *
+     * @throws IllegalArgumentException if the given proxy or method is invalid.
+     */
+    public static void checkProxyMethod(Object proxy, Method method) {
+        // check if it is a valid proxy instance
+        if (proxy == null || !Proxy.isProxyClass(proxy.getClass())) {
+            throw new IllegalArgumentException("Not a Proxy instance");
 }
+        if (Modifier.isStatic(method.getModifiers())) {
+            throw new IllegalArgumentException("Can't handle static method");
+        }
+
+        Class<?> c = method.getDeclaringClass();
+        if (c == Object.class) {
+            String name = method.getName();
+            if (name.equals("hashCode") || name.equals("equals") || name.equals("toString")) {
+                return;
+            }
+        }
+
+        if (isSuperInterface(proxy.getClass(), c)) {
+            return;
+        }
+
+        // disallow any method not declared in one of the proxy intefaces
+        throw new IllegalArgumentException("Can't handle: " + method);
+    }
+
+    private static boolean isSuperInterface(Class<?> c, Class<?> intf) {
+        for (Class<?> i : c.getInterfaces()) {
+            if (i == intf) {
+                return true;
+            }
+            if (isSuperInterface(i, intf)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
--- a/src/share/classes/sun/rmi/transport/proxy/RMIMasterSocketFactory.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/rmi/transport/proxy/RMIMasterSocketFactory.java	Wed Oct 30 18:38:20 2013 +0000
@@ -34,6 +34,7 @@
 import sun.rmi.runtime.NewThreadAction;
 import sun.security.action.GetBooleanAction;
 import sun.security.action.GetLongAction;
+import sun.security.action.GetPropertyAction;
 
 /**
  * RMIMasterSocketFactory attempts to create a socket connection to the
@@ -103,22 +104,21 @@
         try {
             String proxyHost;
             proxyHost = java.security.AccessController.doPrivileged(
-                new sun.security.action.GetPropertyAction("http.proxyHost"));
+                new GetPropertyAction("http.proxyHost"));
 
             if (proxyHost == null)
                 proxyHost = java.security.AccessController.doPrivileged(
-                    new sun.security.action.GetPropertyAction("proxyHost"));
+                    new GetPropertyAction("proxyHost"));
 
-            Boolean tmp = java.security.AccessController.doPrivileged(
-                new sun.security.action.GetBooleanAction("java.rmi.server.disableHttp"));
+            boolean disable = java.security.AccessController.doPrivileged(
+                new GetPropertyAction("java.rmi.server.disableHttp", "true"))
+                .equalsIgnoreCase("true");
 
-            if (!tmp.booleanValue() &&
-                (proxyHost != null && proxyHost.length() > 0)) {
+            if (!disable && proxyHost != null && proxyHost.length() > 0) {
                 setFactories = true;
             }
         } catch (Exception e) {
-            // unable to obtain the properties, so assume default behavior.
-            setFactories = true;
+            // unable to obtain the properties, so use the default behavior.
         }
 
         if (setFactories) {
--- a/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -152,12 +152,4 @@
             throw new InvalidKeyException("Invalid EC private key", e);
         }
     }
-
-    // return a string representation of this key for debugging
-    public String toString() {
-        return "Sun EC private key, " + params.getCurve().getField().getFieldSize()
-            + " bits\n  private value:  "
-            + s + "\n  parameters: " + params;
-    }
-
 }
--- a/src/share/classes/sun/security/jgss/GSSCredentialImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/jgss/GSSCredentialImpl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -651,7 +651,7 @@
                 buffer.append(element.isAcceptorCredential() ?
                               " Accept" : "");
                 buffer.append(" [");
-                buffer.append(element.toString());
+                buffer.append(element.getClass());
                 buffer.append(']');
             } catch (GSSException e) {
                 // skip to next element
--- a/src/share/classes/sun/security/jgss/krb5/InitialToken.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/jgss/krb5/InitialToken.java	Wed Oct 30 18:38:20 2013 +0000
@@ -277,24 +277,17 @@
                 byte[] credBytes = new byte[credLen];
                 System.arraycopy(checksumBytes, 28, credBytes, 0, credLen);
 
-                CipherHelper cipherHelper = context.getCipherHelper(key);
-                if (useNullKey(cipherHelper)) {
-                    delegCreds =
-                        new KrbCred(credBytes, EncryptionKey.NULL_KEY).
-                        getDelegatedCreds()[0];
-                } else {
-                    KrbCred cred;
-                    try {
-                        cred = new KrbCred(credBytes, key);
-                    } catch (KrbException e) {
-                        if (subKey != null) {
-                            cred = new KrbCred(credBytes, subKey);
-                        } else {
-                            throw e;
-                        }
+                KrbCred cred;
+                try {
+                    cred = new KrbCred(credBytes, key);
+                } catch (KrbException ke) {
+                    if (subKey != null) {
+                        cred = new KrbCred(credBytes, subKey);
+                    } else {
+                        throw ke;
                     }
-                    delegCreds = cred.getDelegatedCreds()[0];
                 }
+                delegCreds = cred.getDelegatedCreds()[0];
             }
         }
 
--- a/src/share/classes/sun/security/krb5/KdcComm.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/krb5/KdcComm.java	Wed Oct 30 18:38:20 2013 +0000
@@ -223,16 +223,24 @@
         if (!tempKdc.hasNext()) {
             throw new KrbException("Cannot get kdc for realm " + realm);
         }
+        byte[] ibuf = null;
         try {
-            return sendIfPossible(obuf, tempKdc.next(), useTCP);
+            ibuf = sendIfPossible(obuf, tempKdc.next(), useTCP);
         } catch(Exception first) {
+            boolean ok = false;
             while(tempKdc.hasNext()) {
                 try {
-                    return sendIfPossible(obuf, tempKdc.next(), useTCP);
+                    ibuf = sendIfPossible(obuf, tempKdc.next(), useTCP);
+                    ok = true;
+                    break;
                 } catch(Exception ignore) {}
             }
-            throw first;
+            if (!ok) throw first;
         }
+        if (ibuf == null) {
+            throw new IOException("Cannot get a KDC reply");
+        }
+        return ibuf;
     }
 
     // send the AS Request to the specified KDC
--- a/src/share/classes/sun/security/krb5/KrbCred.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/krb5/KrbCred.java	Wed Oct 30 18:38:20 2013 +0000
@@ -119,7 +119,7 @@
         return credMessg;
     }
 
-         // Used in InitialToken, key always NULL_KEY
+    // Used in InitialToken, NULL_KEY might be used
     public KrbCred(byte[] asn1Message, EncryptionKey key)
         throws KrbException, IOException {
 
@@ -127,6 +127,9 @@
 
         ticket = credMessg.tickets[0];
 
+        if (credMessg.encPart.getEType() == 0) {
+            key = EncryptionKey.NULL_KEY;
+        }
         byte[] temp = credMessg.encPart.decrypt(key,
             KeyUsage.KU_ENC_KRB_CRED_PART);
         byte[] plainText = credMessg.encPart.reset(temp);
--- a/src/share/classes/sun/security/krb5/internal/NetClient.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/krb5/internal/NetClient.java	Wed Oct 30 18:38:20 2013 +0000
@@ -31,6 +31,8 @@
 
 package sun.security.krb5.internal;
 
+import sun.misc.IOUtils;
+
 import java.io.*;
 import java.net.*;
 
@@ -100,17 +102,15 @@
             return null;
         }
 
-        byte data[] = new byte[len];
-        count = readFully(data, len);
-        if (count != len) {
+        try {
+            return IOUtils.readFully(in, len, true);
+        } catch (IOException ioe) {
             if (Krb5.DEBUG) {
                 System.out.println(
                     ">>>DEBUG: TCPClient could not read complete packet (" +
                     len + "/" + count + ")");
             }
             return null;
-        } else {
-            return data;
         }
     }
 
--- a/src/share/classes/sun/security/pkcs/PKCS8Key.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/pkcs/PKCS8Key.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -304,17 +304,6 @@
         return encodedKey.clone();
     }
 
-    /*
-     * Returns a printable representation of the key
-     */
-    public String toString ()
-    {
-        HexDumpEncoder  encoder = new HexDumpEncoder ();
-
-        return "algorithm = " + algid.toString ()
-            + ", unparsed keybits = \n" + encoder.encodeBuffer (key);
-    }
-
     /**
      * Initialize an PKCS8Key object from an input stream.  The data
      * on that input stream must be encoded using DER, obeying the
--- a/src/share/classes/sun/security/pkcs11/P11Key.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/pkcs11/P11Key.java	Wed Oct 30 18:38:20 2013 +0000
@@ -554,27 +554,6 @@
             fetchValues();
             return coeff;
         }
-        public String toString() {
-            fetchValues();
-            StringBuilder sb = new StringBuilder(super.toString());
-            sb.append("\n  modulus:          ");
-            sb.append(n);
-            sb.append("\n  public exponent:  ");
-            sb.append(e);
-            sb.append("\n  private exponent: ");
-            sb.append(d);
-            sb.append("\n  prime p:          ");
-            sb.append(p);
-            sb.append("\n  prime q:          ");
-            sb.append(q);
-            sb.append("\n  prime exponent p: ");
-            sb.append(pe);
-            sb.append("\n  prime exponent q: ");
-            sb.append(qe);
-            sb.append("\n  crt coefficient:  ");
-            sb.append(coeff);
-            return sb.toString();
-        }
     }
 
     // RSA non-CRT private key
@@ -630,15 +609,6 @@
             fetchValues();
             return d;
         }
-        public String toString() {
-            fetchValues();
-            StringBuilder sb = new StringBuilder(super.toString());
-            sb.append("\n  modulus:          ");
-            sb.append(n);
-            sb.append("\n  private exponent: ");
-            sb.append(d);
-            return sb.toString();
-        }
     }
 
     private static final class P11RSAPublicKey extends P11Key
@@ -814,11 +784,6 @@
             fetchValues();
             return params;
         }
-        public String toString() {
-            fetchValues();
-            return super.toString() +  "\n  x: " + x + "\n  p: " + params.getP()
-                + "\n  q: " + params.getQ() + "\n  g: " + params.getG();
-        }
     }
 
     private static final class P11DHPrivateKey extends P11Key
@@ -878,11 +843,6 @@
             fetchValues();
             return params;
         }
-        public String toString() {
-            fetchValues();
-            return super.toString() +  "\n  x: " + x + "\n  p: " + params.getP()
-                + "\n  g: " + params.getG();
-        }
         public int hashCode() {
             if (token.isValid() == false) {
                 return 0;
@@ -1049,12 +1009,6 @@
             fetchValues();
             return params;
         }
-        public String toString() {
-            fetchValues();
-        return super.toString()
-            + "\n  private value:  " + s
-            + "\n  parameters: " + params;
-        }
     }
 
     private static final class P11ECPublicKey extends P11Key
--- a/src/share/classes/sun/security/provider/DSAPrivateKey.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/provider/DSAPrivateKey.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2002, 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
@@ -142,11 +142,6 @@
         }
     }
 
-    public String toString() {
-        return "Sun DSA Private Key \nparameters:" + algid + "\nx: " +
-            Debug.toHexString(x) + "\n";
-    }
-
     protected void parseKeyBits() throws InvalidKeyException {
         try {
             DerInputStream in = new DerInputStream(key);
--- a/src/share/classes/sun/security/provider/certpath/RevocationChecker.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/provider/certpath/RevocationChecker.java	Wed Oct 30 18:38:20 2013 +0000
@@ -307,7 +307,7 @@
                                               : anchor.getCAPublicKey();
         }
         crlSignFlag = true;
-        if (params.certPath() != null) {
+        if (params != null && params.certPath() != null) {
             certIndex = params.certPath().getCertificates().size() - 1;
         } else {
             certIndex = -1;
--- a/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -225,29 +225,4 @@
         }
         return b;
     }
-
-    // return a string representation of this key for debugging
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-        sb.append("Sun RSA private CRT key, ");
-        sb.append(n.bitLength());
-        sb.append(" bits\n  modulus:          ");
-        sb.append(n);
-        sb.append("\n  public exponent:  ");
-        sb.append(e);
-        sb.append("\n  private exponent: ");
-        sb.append(d);
-        sb.append("\n  prime p:          ");
-        sb.append(p);
-        sb.append("\n  prime q:          ");
-        sb.append(q);
-        sb.append("\n  prime exponent p: ");
-        sb.append(pe);
-        sb.append("\n  prime exponent q: ");
-        sb.append(qe);
-        sb.append("\n  crt coefficient:  ");
-        sb.append(coeff);
-        return sb.toString();
-    }
-
 }
--- a/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -98,11 +98,4 @@
     public BigInteger getPrivateExponent() {
         return d;
     }
-
-    // return a string representation of this key for debugging
-    public String toString() {
-        return "Sun RSA private key, " + n.bitLength() + " bits\n  modulus: "
-                + n + "\n  private exponent: " + d;
-    }
-
 }
--- a/src/share/classes/sun/security/tools/jarsigner/Resources_ja.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/tools/jarsigner/Resources_ja.java	Wed Oct 30 18:38:20 2013 +0000
@@ -79,7 +79,7 @@
         {".verbose.suboptions.verbose.output.when.signing.verifying.",
                 "[-verbose[:suboptions]]     \u7F72\u540D/\u691C\u8A3C\u6642\u306E\u8A73\u7D30\u51FA\u529B\u3002"},
         {".suboptions.can.be.all.grouped.or.summary",
-                "                            \u30B5\u30D6\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u3057\u3066\u3001\u3059\u3079\u3066\u3001\u30B0\u30EB\u30FC\u30D7\u307E\u305F\u306F\u30B5\u30DE\u30EA\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059"},
+                "                            \u30B5\u30D6\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u3057\u3066\u3001all\u3001grouped\u307E\u305F\u306Fsummary\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059"},
         {".certs.display.certificates.when.verbose.and.verifying",
                 "[-certs]                    \u8A73\u7D30\u51FA\u529B\u304A\u3088\u3073\u691C\u8A3C\u6642\u306B\u8A3C\u660E\u66F8\u3092\u8868\u793A"},
         {".tsa.url.location.of.the.Timestamping.Authority",
--- a/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Wed Oct 30 18:38:20 2013 +0000
@@ -37,7 +37,16 @@
 import java.text.MessageFormat;
 import sun.security.util.PropertyExpander;
 import sun.security.util.PropertyExpander.ExpandException;
-import java.awt.*;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.FileDialog;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.Point;
+import java.awt.Toolkit;
+import java.awt.Window;
 import java.awt.event.*;
 import java.security.cert.Certificate;
 import java.security.cert.CertificateException;
@@ -45,6 +54,8 @@
 import sun.security.provider.*;
 import sun.security.util.PolicyUtil;
 import javax.security.auth.x500.X500Principal;
+import javax.swing.*;
+import javax.swing.border.EmptyBorder;
 
 /**
  * PolicyTool may be used by users and administrators to configure the
@@ -66,7 +77,22 @@
     static {
         // this is for case insensitive string comparisons
         collator.setStrength(Collator.PRIMARY);
-    };
+
+        // Support for Apple menu bar
+        if (System.getProperty("apple.laf.useScreenMenuBar") == null) {
+            System.setProperty("apple.laf.useScreenMenuBar", "true");
+        }
+        System.setProperty("apple.awt.application.name", getMessage("Policy.Tool"));
+
+        // Apply the system L&F if not specified with a system property.
+        if (System.getProperty("swing.defaultlaf") == null) {
+            try {
+                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+            } catch (Exception e) {
+                // ignore
+            }
+        }
+    }
 
     // anyone can add warnings
     Vector<String> warnings;
@@ -228,7 +254,7 @@
                     PublicKey pubKey = getPublicKeyAlias(signers[i]);
                     if (pubKey == null) {
                         newWarning = true;
-                        MessageFormat form = new MessageFormat(rb.getString
+                        MessageFormat form = new MessageFormat(getMessage
                             ("Warning.A.public.key.for.alias.signers.i.does.not.exist.Make.sure.a.KeyStore.is.properly.configured."));
                         Object[] source = {signers[i]};
                         warnings.addElement(form.format(source));
@@ -246,7 +272,7 @@
                                 pe.getPrincipalName());
                 } catch (ClassNotFoundException fnfe) {
                     newWarning = true;
-                    MessageFormat form = new MessageFormat(rb.getString
+                    MessageFormat form = new MessageFormat(getMessage
                                 ("Warning.Class.not.found.class"));
                     Object[] source = {pe.getPrincipalClass()};
                     warnings.addElement(form.format(source));
@@ -262,13 +288,13 @@
                     verifyPermission(pe.permission, pe.name, pe.action);
                 } catch (ClassNotFoundException fnfe) {
                     newWarning = true;
-                    MessageFormat form = new MessageFormat(rb.getString
+                    MessageFormat form = new MessageFormat(getMessage
                                 ("Warning.Class.not.found.class"));
                     Object[] source = {pe.permission};
                     warnings.addElement(form.format(source));
                 } catch (InvocationTargetException ite) {
                     newWarning = true;
-                    MessageFormat form = new MessageFormat(rb.getString
+                    MessageFormat form = new MessageFormat(getMessage
                         ("Warning.Invalid.argument.s.for.constructor.arg"));
                     Object[] source = {pe.permission};
                     warnings.addElement(form.format(source));
@@ -283,7 +309,7 @@
                         PublicKey pubKey = getPublicKeyAlias(signers[i]);
                         if (pubKey == null) {
                             newWarning = true;
-                            MessageFormat form = new MessageFormat(rb.getString
+                            MessageFormat form = new MessageFormat(getMessage
                                 ("Warning.A.public.key.for.alias.signers.i.does.not.exist.Make.sure.a.KeyStore.is.properly.configured."));
                             Object[] source = {signers[i]};
                             warnings.addElement(form.format(source));
@@ -611,7 +637,7 @@
         Class<?> pc = Class.forName(type, true,
                 Thread.currentThread().getContextClassLoader());
         if (!PRIN.isAssignableFrom(pc)) {
-            MessageFormat form = new MessageFormat(rb.getString
+            MessageFormat form = new MessageFormat(getMessage
                         ("Illegal.Principal.Type.type"));
             Object[] source = {type};
             throw new InstantiationException(form.format(source));
@@ -690,7 +716,7 @@
                 if (++n == args.length) usage();
                 policyFileName = args[n];
             } else {
-                MessageFormat form = new MessageFormat(rb.getString
+                MessageFormat form = new MessageFormat(getMessage
                                 ("Illegal.option.option"));
                 Object[] source = { flags };
                 System.err.println(form.format(source));
@@ -700,9 +726,9 @@
     }
 
     static void usage() {
-        System.out.println(rb.getString("Usage.policytool.options."));
+        System.out.println(getMessage("Usage.policytool.options."));
         System.out.println();
-        System.out.println(rb.getString
+        System.out.println(getMessage
                 (".file.file.policy.file.location"));
         System.out.println();
 
@@ -714,8 +740,12 @@
      */
     public static void main(String args[]) {
         parseArgs(args);
-        ToolWindow tw = new ToolWindow(new PolicyTool());
-        tw.displayToolWindow(args);
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                ToolWindow tw = new ToolWindow(new PolicyTool());
+                tw.displayToolWindow(args);
+            }
+        });
     }
 
     // split instr to words according to capitalization,
@@ -725,6 +755,108 @@
         return instr.replaceAll("([A-Z])", " $1");
     }
 
+    /**
+     * Returns the message corresponding to the key in the bundle.
+     * This is preferred over {@link #getString} because it removes
+     * any mnemonic '&' character in the string.
+     *
+     * @param key the key
+     *
+     * @return the message
+     */
+    static String getMessage(String key) {
+        return removeMnemonicAmpersand(rb.getString(key));
+    }
+
+
+    /**
+     * Returns the mnemonic for a message.
+     *
+     * @param key the key
+     *
+     * @return the mnemonic <code>int</code>
+     */
+    static int getMnemonicInt(String key) {
+        String message = rb.getString(key);
+        return (findMnemonicInt(message));
+    }
+
+    /**
+     * Returns the mnemonic display index for a message.
+     *
+     * @param key the key
+     *
+     * @return the mnemonic display index
+     */
+    static int getDisplayedMnemonicIndex(String key) {
+        String message = rb.getString(key);
+        return (findMnemonicIndex(message));
+    }
+
+    /**
+     * Finds the mnemonic character in a message.
+     *
+     * The mnemonic character is the first character followed by the first
+     * <code>&</code> that is not followed by another <code>&</code>.
+     *
+     * @return the mnemonic as an <code>int</code>, or <code>0</code> if it
+     *         can't be found.
+     */
+    private static int findMnemonicInt(String s) {
+        for (int i = 0; i < s.length() - 1; i++) {
+            if (s.charAt(i) == '&') {
+                if (s.charAt(i + 1) != '&') {
+                    return KeyEvent.getExtendedKeyCodeForChar(s.charAt(i + 1));
+                } else {
+                    i++;
+                }
+            }
+        }
+        return 0;
+    }
+
+    /**
+     * Finds the index of the mnemonic character in a message.
+     *
+     * The mnemonic character is the first character followed by the first
+     * <code>&</code> that is not followed by another <code>&</code>.
+     *
+     * @return the mnemonic character index as an <code>int</code>, or <code>-1</code> if it
+     *         can't be found.
+     */
+    private static int findMnemonicIndex(String s) {
+        for (int i = 0; i < s.length() - 1; i++) {
+            if (s.charAt(i) == '&') {
+                if (s.charAt(i + 1) != '&') {
+                    // Return the index of the '&' since it will be removed
+                    return i;
+                } else {
+                    i++;
+                }
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * Removes the mnemonic identifier (<code>&</code>) from a string unless
+     * it's escaped by <code>&&</code> or placed at the end.
+     *
+     * @param message the message
+     *
+     * @return a message with the mnemonic identifier removed
+     */
+    private static String removeMnemonicAmpersand(String message) {
+        StringBuilder s = new StringBuilder();
+        for (int i = 0; i < message.length(); i++) {
+            char current = message.charAt(i);
+            if (current != '&' || i == message.length() - 1
+                    || message.charAt(i + 1) == '&') {
+                s.append(current);
+            }
+        }
+        return s.toString();
+    }
 }
 
 /**
@@ -880,10 +1012,13 @@
 /**
  * The main window for the PolicyTool
  */
-class ToolWindow extends Frame {
+class ToolWindow extends JFrame {
     // use serialVersionUID from JDK 1.2.2 for interoperability
     private static final long serialVersionUID = 5682568601210376777L;
 
+    /* ESCAPE key */
+    static final KeyStroke escKey = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
+
     /* external paddings */
     public static final Insets TOP_PADDING = new Insets(25,0,0,0);
     public static final Insets BOTTOM_PADDING = new Insets(0,0,25,0);
@@ -891,35 +1026,25 @@
     public static final Insets LR_PADDING = new Insets(0,10,0,10);
     public static final Insets TOP_BOTTOM_PADDING = new Insets(15, 0, 15, 0);
     public static final Insets L_TOP_BOTTOM_PADDING = new Insets(5,10,15,0);
+    public static final Insets LR_TOP_BOTTOM_PADDING = new Insets(15, 4, 15, 4);
     public static final Insets LR_BOTTOM_PADDING = new Insets(0,10,5,10);
     public static final Insets L_BOTTOM_PADDING = new Insets(0,10,5,0);
-    public static final Insets R_BOTTOM_PADDING = new Insets(0,0,5,10);
+    public static final Insets R_BOTTOM_PADDING = new Insets(0, 0, 25, 5);
+    public static final Insets R_PADDING = new Insets(0, 0, 0, 5);
 
     /* buttons and menus */
-    public static final String NEW_POLICY_FILE          =
-                        PolicyTool.rb.getString("New");
-    public static final String OPEN_POLICY_FILE         =
-                        PolicyTool.rb.getString("Open");
-    public static final String SAVE_POLICY_FILE         =
-                        PolicyTool.rb.getString("Save");
-    public static final String SAVE_AS_POLICY_FILE      =
-                        PolicyTool.rb.getString("Save.As");
-    public static final String VIEW_WARNINGS            =
-                        PolicyTool.rb.getString("View.Warning.Log");
-    public static final String QUIT                     =
-                        PolicyTool.rb.getString("Exit");
-    public static final String ADD_POLICY_ENTRY         =
-                        PolicyTool.rb.getString("Add.Policy.Entry");
-    public static final String EDIT_POLICY_ENTRY        =
-                        PolicyTool.rb.getString("Edit.Policy.Entry");
-    public static final String REMOVE_POLICY_ENTRY      =
-                        PolicyTool.rb.getString("Remove.Policy.Entry");
-    public static final String EDIT_KEYSTORE            =
-                        PolicyTool.rb.getString("Edit");
-    public static final String ADD_PUBKEY_ALIAS         =
-                        PolicyTool.rb.getString("Add.Public.Key.Alias");
-    public static final String REMOVE_PUBKEY_ALIAS      =
-                        PolicyTool.rb.getString("Remove.Public.Key.Alias");
+    public static final String NEW_POLICY_FILE          = "New";
+    public static final String OPEN_POLICY_FILE         = "Open";
+    public static final String SAVE_POLICY_FILE         = "Save";
+    public static final String SAVE_AS_POLICY_FILE      = "Save.As";
+    public static final String VIEW_WARNINGS            = "View.Warning.Log";
+    public static final String QUIT                     = "Exit";
+    public static final String ADD_POLICY_ENTRY         = "Add.Policy.Entry";
+    public static final String EDIT_POLICY_ENTRY        = "Edit.Policy.Entry";
+    public static final String REMOVE_POLICY_ENTRY      = "Remove.Policy.Entry";
+    public static final String EDIT_KEYSTORE            = "Edit";
+    public static final String ADD_PUBKEY_ALIAS         = "Add.Public.Key.Alias";
+    public static final String REMOVE_PUBKEY_ALIAS      = "Remove.Public.Key.Alias";
 
     /* gridbag index for components in the main window (MW) */
     public static final int MW_FILENAME_LABEL           = 0;
@@ -930,6 +1055,9 @@
     public static final int MW_REMOVE_BUTTON            = 2;
     public static final int MW_POLICY_LIST              = 3; // follows MW_PANEL
 
+    /* The preferred height of JTextField should match JComboBox. */
+    static final int TEXTFIELD_HEIGHT = new JComboBox().getPreferredSize().height;
+
     private PolicyTool tool;
 
     /**
@@ -940,64 +1068,84 @@
     }
 
     /**
+     * Don't call getComponent directly on the window
+     */
+    public Component getComponent(int n) {
+        Component c = getContentPane().getComponent(n);
+        if (c instanceof JScrollPane) {
+            c = ((JScrollPane)c).getViewport().getView();
+        }
+        return c;
+    }
+
+    /**
      * Initialize the PolicyTool window with the necessary components
      */
     private void initWindow() {
+        // The ToolWindowListener will handle closing the window.
+        setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
 
         // create the top menu bar
-        MenuBar menuBar = new MenuBar();
+        JMenuBar menuBar = new JMenuBar();
 
         // create a File menu
-        Menu menu = new Menu(PolicyTool.rb.getString("File"));
-        menu.add(NEW_POLICY_FILE);
-        menu.add(OPEN_POLICY_FILE);
-        menu.add(SAVE_POLICY_FILE);
-        menu.add(SAVE_AS_POLICY_FILE);
-        menu.add(VIEW_WARNINGS);
-        menu.add(QUIT);
-        menu.addActionListener(new FileMenuListener(tool, this));
+        JMenu menu = new JMenu();
+        configureButton(menu, "File");
+        ActionListener actionListener = new FileMenuListener(tool, this);
+        addMenuItem(menu, NEW_POLICY_FILE, actionListener, "N");
+        addMenuItem(menu, OPEN_POLICY_FILE, actionListener, "O");
+        addMenuItem(menu, SAVE_POLICY_FILE, actionListener, "S");
+        addMenuItem(menu, SAVE_AS_POLICY_FILE, actionListener, null);
+        addMenuItem(menu, VIEW_WARNINGS, actionListener, null);
+        addMenuItem(menu, QUIT, actionListener, null);
         menuBar.add(menu);
-        setMenuBar(menuBar);
 
         // create a KeyStore menu
-        menu = new Menu(PolicyTool.rb.getString("KeyStore"));
-        menu.add(EDIT_KEYSTORE);
-        menu.addActionListener(new MainWindowListener(tool, this));
+        menu = new JMenu();
+        configureButton(menu, "KeyStore");
+        actionListener = new MainWindowListener(tool, this);
+        addMenuItem(menu, EDIT_KEYSTORE, actionListener, null);
         menuBar.add(menu);
-        setMenuBar(menuBar);
-
+        setJMenuBar(menuBar);
+
+        // Create some space around components
+        ((JPanel)getContentPane()).setBorder(new EmptyBorder(6, 6, 6, 6));
 
         // policy entry listing
-        Label label = new Label(PolicyTool.rb.getString("Policy.File."));
+        JLabel label = new JLabel(PolicyTool.getMessage("Policy.File."));
         addNewComponent(this, label, MW_FILENAME_LABEL,
                         0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                        TOP_BOTTOM_PADDING);
-        TextField tf = new TextField(50);
+                        LR_TOP_BOTTOM_PADDING);
+        JTextField tf = new JTextField(50);
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("Policy.File."));
+                PolicyTool.getMessage("Policy.File."));
         tf.setEditable(false);
         addNewComponent(this, tf, MW_FILENAME_TEXTFIELD,
                         1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                        TOP_BOTTOM_PADDING);
+                        LR_TOP_BOTTOM_PADDING);
 
 
         // add ADD/REMOVE/EDIT buttons in a new panel
-        Panel panel = new Panel();
+        JPanel panel = new JPanel();
         panel.setLayout(new GridBagLayout());
 
-        Button button = new Button(ADD_POLICY_ENTRY);
+        JButton button = new JButton();
+        configureButton(button, ADD_POLICY_ENTRY);
         button.addActionListener(new MainWindowListener(tool, this));
         addNewComponent(panel, button, MW_ADD_BUTTON,
                         0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                         LR_PADDING);
 
-        button = new Button(EDIT_POLICY_ENTRY);
+        button = new JButton();
+        configureButton(button, EDIT_POLICY_ENTRY);
         button.addActionListener(new MainWindowListener(tool, this));
         addNewComponent(panel, button, MW_EDIT_BUTTON,
                         1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                         LR_PADDING);
 
-        button = new Button(REMOVE_POLICY_ENTRY);
+        button = new JButton();
+        configureButton(button, REMOVE_POLICY_ENTRY);
         button.addActionListener(new MainWindowListener(tool, this));
         addNewComponent(panel, button, MW_REMOVE_BUTTON,
                         2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
@@ -1021,41 +1169,47 @@
             tool.openPolicy(policyFile);
 
             // display the policy entries via the policy list textarea
-            List list = new List(40, false);
-            list.addActionListener(new PolicyListListener(tool, this));
+            DefaultListModel listModel = new DefaultListModel();
+            JList list = new JList(listModel);
+            list.setVisibleRowCount(15);
+            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+            list.addMouseListener(new PolicyListListener(tool, this));
             PolicyEntry entries[] = tool.getEntry();
             if (entries != null) {
-                for (int i = 0; i < entries.length; i++)
-                    list.add(entries[i].headerToString());
+                for (int i = 0; i < entries.length; i++) {
+                    listModel.addElement(entries[i].headerToString());
+                }
             }
-            TextField newFilename = (TextField)
+            JTextField newFilename = (JTextField)
                                 getComponent(MW_FILENAME_TEXTFIELD);
             newFilename.setText(policyFile);
             initPolicyList(list);
 
         } catch (FileNotFoundException fnfe) {
             // add blank policy listing
-            List list = new List(40, false);
-            list.addActionListener(new PolicyListListener(tool, this));
+            JList list = new JList(new DefaultListModel());
+            list.setVisibleRowCount(15);
+            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+            list.addMouseListener(new PolicyListListener(tool, this));
             initPolicyList(list);
             tool.setPolicyFileName(null);
             tool.modified = false;
-            setVisible(true);
 
             // just add warning
             tool.warnings.addElement(fnfe.toString());
 
         } catch (Exception e) {
             // add blank policy listing
-            List list = new List(40, false);
-            list.addActionListener(new PolicyListListener(tool, this));
+            JList list = new JList(new DefaultListModel());
+            list.setVisibleRowCount(15);
+            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+            list.addMouseListener(new PolicyListListener(tool, this));
             initPolicyList(list);
             tool.setPolicyFileName(null);
             tool.modified = false;
-            setVisible(true);
 
             // display the error
-            MessageFormat form = new MessageFormat(PolicyTool.rb.getString
+            MessageFormat form = new MessageFormat(PolicyTool.getMessage
                 ("Could.not.open.policy.file.policyFile.e.toString."));
             Object[] source = {policyFile, e.toString()};
             displayErrorDialog(null, form.format(source));
@@ -1063,13 +1217,69 @@
     }
 
 
+    // Platform specific modifier (control / command).
+    private int shortCutModifier = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+
+    private void addMenuItem(JMenu menu, String key, ActionListener actionListener, String accelerator) {
+        JMenuItem menuItem = new JMenuItem();
+        configureButton(menuItem, key);
+
+        if (PolicyTool.rb.containsKey(key + ".accelerator")) {
+            // Accelerator from resources takes precedence
+            accelerator = PolicyTool.getMessage(key + ".accelerator");
+        }
+
+        if (accelerator != null && !accelerator.isEmpty()) {
+            KeyStroke keyStroke;
+            if (accelerator.length() == 1) {
+                keyStroke = KeyStroke.getKeyStroke(KeyEvent.getExtendedKeyCodeForChar(accelerator.charAt(0)),
+                                                   shortCutModifier);
+            } else {
+                keyStroke = KeyStroke.getKeyStroke(accelerator);
+            }
+            menuItem.setAccelerator(keyStroke);
+        }
+
+        menuItem.addActionListener(actionListener);
+        menu.add(menuItem);
+    }
+
+    static void configureButton(AbstractButton button, String key) {
+        button.setText(PolicyTool.getMessage(key));
+        button.setActionCommand(key);
+
+        int mnemonicInt = PolicyTool.getMnemonicInt(key);
+        if (mnemonicInt > 0) {
+            button.setMnemonic(mnemonicInt);
+            button.setDisplayedMnemonicIndex(PolicyTool.getDisplayedMnemonicIndex(key));
+         }
+    }
+
+    static void configureLabelFor(JLabel label, JComponent component, String key) {
+        label.setText(PolicyTool.getMessage(key));
+        label.setLabelFor(component);
+
+        int mnemonicInt = PolicyTool.getMnemonicInt(key);
+        if (mnemonicInt > 0) {
+            label.setDisplayedMnemonic(mnemonicInt);
+            label.setDisplayedMnemonicIndex(PolicyTool.getDisplayedMnemonicIndex(key));
+         }
+    }
+
+
     /**
      * Add a component to the PolicyTool window
      */
-    void addNewComponent(Container container, Component component,
+    void addNewComponent(Container container, JComponent component,
         int index, int gridx, int gridy, int gridwidth, int gridheight,
         double weightx, double weighty, int fill, Insets is) {
 
+        if (container instanceof JFrame) {
+            container = ((JFrame)container).getContentPane();
+        } else if (container instanceof JDialog) {
+            container = ((JDialog)container).getContentPane();
+        }
+
         // add the component at the specified gridbag index
         container.add(component, index);
 
@@ -1091,7 +1301,7 @@
     /**
      * Add a component to the PolicyTool window without external padding
      */
-    void addNewComponent(Container container, Component component,
+    void addNewComponent(Container container, JComponent component,
         int index, int gridx, int gridy, int gridwidth, int gridheight,
         double weightx, double weighty, int fill) {
 
@@ -1106,10 +1316,12 @@
      * Init the policy_entry_list TEXTAREA component in the
      * PolicyTool window
      */
-    void initPolicyList(List policyList) {
+    void initPolicyList(JList policyList) {
 
         // add the policy list to the window
-        addNewComponent(this, policyList, MW_POLICY_LIST,
+        //policyList.setPreferredSize(new Dimension(500, 350));
+        JScrollPane scrollPane = new JScrollPane(policyList);
+        addNewComponent(this, scrollPane, MW_POLICY_LIST,
                         0, 3, 2, 1, 1.0, 1.0, GridBagConstraints.BOTH);
     }
 
@@ -1117,15 +1329,12 @@
      * Replace the policy_entry_list TEXTAREA component in the
      * PolicyTool window with an updated one.
      */
-    void replacePolicyList(List policyList) {
+    void replacePolicyList(JList policyList) {
 
         // remove the original list of Policy Entries
         // and add the new list of entries
-        List list = (List)getComponent(MW_POLICY_LIST);
-        list.removeAll();
-        String newItems[] = policyList.getItems();
-        for (int i = 0; i < newItems.length; i++)
-            list.add(newItems[i]);
+        JList list = (JList)getComponent(MW_POLICY_LIST);
+        list.setModel(policyList.getModel());
     }
 
     /**
@@ -1133,19 +1342,21 @@
      */
     void displayToolWindow(String args[]) {
 
-        setTitle(PolicyTool.rb.getString("Policy.Tool"));
+        setTitle(PolicyTool.getMessage("Policy.Tool"));
         setResizable(true);
-        addWindowListener(new ToolWindowListener(this));
-        setBounds(135, 80, 500, 500);
-        setLayout(new GridBagLayout());
+        addWindowListener(new ToolWindowListener(tool, this));
+        //setBounds(135, 80, 500, 500);
+        getContentPane().setLayout(new GridBagLayout());
 
         initWindow();
+        pack();
+        setLocationRelativeTo(null);
 
         // display it
         setVisible(true);
 
         if (tool.newWarning == true) {
-            displayStatusDialog(this, PolicyTool.rb.getString
+            displayStatusDialog(this, PolicyTool.getMessage
                 ("Errors.have.occurred.while.opening.the.policy.configuration.View.the.Warning.Log.for.more.information."));
         }
     }
@@ -1155,24 +1366,29 @@
      */
     void displayErrorDialog(Window w, String error) {
         ToolDialog ed = new ToolDialog
-                (PolicyTool.rb.getString("Error"), tool, this, true);
+                (PolicyTool.getMessage("Error"), tool, this, true);
 
         // find where the PolicyTool gui is
         Point location = ((w == null) ?
                 getLocationOnScreen() : w.getLocationOnScreen());
-        ed.setBounds(location.x + 50, location.y + 50, 600, 100);
+        //ed.setBounds(location.x + 50, location.y + 50, 600, 100);
         ed.setLayout(new GridBagLayout());
 
-        Label label = new Label(error);
+        JLabel label = new JLabel(error);
         addNewComponent(ed, label, 0,
                         0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH);
 
-        Button okButton = new Button(PolicyTool.rb.getString("OK"));
-        okButton.addActionListener(new ErrorOKButtonListener(ed));
+        JButton okButton = new JButton(PolicyTool.getMessage("OK"));
+        ActionListener okListener = new ErrorOKButtonListener(ed);
+        okButton.addActionListener(okListener);
         addNewComponent(ed, okButton, 1,
                         0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL);
 
+        ed.getRootPane().setDefaultButton(okButton);
+        ed.getRootPane().registerKeyboardAction(okListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
+
         ed.pack();
+        ed.setLocationRelativeTo(w);
         ed.setVisible(true);
     }
 
@@ -1191,23 +1407,29 @@
      */
     void displayStatusDialog(Window w, String status) {
         ToolDialog sd = new ToolDialog
-                (PolicyTool.rb.getString("Status"), tool, this, true);
+                (PolicyTool.getMessage("Status"), tool, this, true);
 
         // find the location of the PolicyTool gui
         Point location = ((w == null) ?
                 getLocationOnScreen() : w.getLocationOnScreen());
-        sd.setBounds(location.x + 50, location.y + 50, 500, 100);
+        //sd.setBounds(location.x + 50, location.y + 50, 500, 100);
         sd.setLayout(new GridBagLayout());
 
-        Label label = new Label(status);
+        JLabel label = new JLabel(status);
         addNewComponent(sd, label, 0,
                         0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH);
 
-        Button okButton = new Button(PolicyTool.rb.getString("OK"));
-        okButton.addActionListener(new StatusOKButtonListener(sd));
+        JButton okButton = new JButton(PolicyTool.getMessage("OK"));
+        ActionListener okListener = new StatusOKButtonListener(sd);
+        okButton.addActionListener(okListener);
         addNewComponent(sd, okButton, 1,
                         0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL);
+
+        sd.getRootPane().setDefaultButton(okButton);
+        sd.getRootPane().registerKeyboardAction(okListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
+
         sd.pack();
+        sd.setLocationRelativeTo(w);
         sd.setVisible(true);
     }
 
@@ -1217,32 +1439,37 @@
     void displayWarningLog(Window w) {
 
         ToolDialog wd = new ToolDialog
-                (PolicyTool.rb.getString("Warning"), tool, this, true);
+                (PolicyTool.getMessage("Warning"), tool, this, true);
 
         // find the location of the PolicyTool gui
         Point location = ((w == null) ?
                 getLocationOnScreen() : w.getLocationOnScreen());
-        wd.setBounds(location.x + 50, location.y + 50, 500, 100);
+        //wd.setBounds(location.x + 50, location.y + 50, 500, 100);
         wd.setLayout(new GridBagLayout());
 
-        TextArea ta = new TextArea();
+        JTextArea ta = new JTextArea();
         ta.setEditable(false);
         for (int i = 0; i < tool.warnings.size(); i++) {
             ta.append(tool.warnings.elementAt(i));
-            ta.append(PolicyTool.rb.getString("NEWLINE"));
+            ta.append(PolicyTool.getMessage("NEWLINE"));
         }
         addNewComponent(wd, ta, 0,
                         0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                         BOTTOM_PADDING);
         ta.setFocusable(false);
 
-        Button okButton = new Button(PolicyTool.rb.getString("OK"));
-        okButton.addActionListener(new CancelButtonListener(wd));
+        JButton okButton = new JButton(PolicyTool.getMessage("OK"));
+        ActionListener okListener = new CancelButtonListener(wd);
+        okButton.addActionListener(okListener);
         addNewComponent(wd, okButton, 1,
                         0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
                         LR_PADDING);
 
+        wd.getRootPane().setDefaultButton(okButton);
+        wd.getRootPane().registerKeyboardAction(okListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
+
         wd.pack();
+        wd.setLocationRelativeTo(w);
         wd.setVisible(true);
     }
 
@@ -1252,22 +1479,27 @@
                 (title, tool, this, true);
         Point location = ((w == null) ?
                 getLocationOnScreen() : w.getLocationOnScreen());
-        tw.setBounds(location.x + 75, location.y + 100, 400, 150);
+        //tw.setBounds(location.x + 75, location.y + 100, 400, 150);
         tw.setLayout(new GridBagLayout());
 
-        TextArea ta = new TextArea(prompt, 10, 50, TextArea.SCROLLBARS_VERTICAL_ONLY);
+        JTextArea ta = new JTextArea(prompt, 10, 50);
         ta.setEditable(false);
-        addNewComponent(tw, ta, 0,
+        ta.setLineWrap(true);
+        ta.setWrapStyleWord(true);
+        JScrollPane scrollPane = new JScrollPane(ta,
+                                                 JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
+                                                 JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+        addNewComponent(tw, scrollPane, 0,
                 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH);
         ta.setFocusable(false);
 
-        Panel panel = new Panel();
+        JPanel panel = new JPanel();
         panel.setLayout(new GridBagLayout());
 
         // StringBuffer to store button press. Must be final.
         final StringBuffer chooseResult = new StringBuffer();
 
-        Button button = new Button(yes);
+        JButton button = new JButton(yes);
         button.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                 chooseResult.append('Y');
@@ -1279,7 +1511,7 @@
                            0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
                            LR_PADDING);
 
-        button = new Button(no);
+        button = new JButton(no);
         button.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                 chooseResult.append('N');
@@ -1295,6 +1527,7 @@
                 0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL);
 
         tw.pack();
+        tw.setLocationRelativeTo(w);
         tw.setVisible(true);
         if (chooseResult.length() > 0) {
             return chooseResult.charAt(0);
@@ -1309,10 +1542,13 @@
 /**
  * General dialog window
  */
-class ToolDialog extends Dialog {
+class ToolDialog extends JDialog {
     // use serialVersionUID from JDK 1.2.2 for interoperability
     private static final long serialVersionUID = -372244357011301190L;
 
+    /* ESCAPE key */
+    static final KeyStroke escKey = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
+
     /* necessary constants */
     public static final int NOACTION            = 0;
     public static final int QUIT                = 1;
@@ -1329,22 +1565,22 @@
 
     /* popup menus */
     public static final String PERM             =
-        PolicyTool.rb.getString
+        PolicyTool.getMessage
         ("Permission.");
 
     public static final String PRIN_TYPE        =
-        PolicyTool.rb.getString("Principal.Type.");
+        PolicyTool.getMessage("Principal.Type.");
     public static final String PRIN_NAME        =
-        PolicyTool.rb.getString("Principal.Name.");
+        PolicyTool.getMessage("Principal.Name.");
 
     /* more popu menus */
     public static final String PERM_NAME        =
-        PolicyTool.rb.getString
+        PolicyTool.getMessage
         ("Target.Name.");
 
     /* and more popup menus */
     public static final String PERM_ACTIONS             =
-      PolicyTool.rb.getString
+      PolicyTool.getMessage
       ("Actions.");
 
     /* gridbag index for display PolicyEntry (PE) components */
@@ -1431,6 +1667,9 @@
     private static final int PRINCIPAL_TYPE             = 4;
     private static final int PRINCIPAL_NAME             = 5;
 
+    /* The preferred height of JTextField should match JComboBox. */
+    static final int TEXTFIELD_HEIGHT = new JComboBox().getPreferredSize().height;
+
     public static java.util.ArrayList<Perm> PERM_ARRAY;
     public static java.util.ArrayList<Prin> PRIN_ARRAY;
     PolicyTool tool;
@@ -1480,6 +1719,20 @@
         this.tool = tool;
         this.tw = tw;
         addWindowListener(new ChildWindowListener(this));
+
+        // Create some space around components
+        ((JPanel)getContentPane()).setBorder(new EmptyBorder(6, 6, 6, 6));
+    }
+
+    /**
+     * Don't call getComponent directly on the window
+     */
+    public Component getComponent(int n) {
+        Component c = getContentPane().getComponent(n);
+        if (c instanceof JScrollPane) {
+            c = ((JScrollPane)c).getViewport().getView();
+        }
+        return c;
     }
 
     /**
@@ -1540,25 +1793,25 @@
         PolicyEntry entries[] = null;
         TaggedList prinList = new TaggedList(3, false);
         prinList.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("Principal.List"));
-        prinList.addActionListener
+                PolicyTool.getMessage("Principal.List"));
+        prinList.addMouseListener
                 (new EditPrinButtonListener(tool, tw, this, edit));
         TaggedList permList = new TaggedList(10, false);
         permList.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("Permission.List"));
-        permList.addActionListener
+                PolicyTool.getMessage("Permission.List"));
+        permList.addMouseListener
                 (new EditPermButtonListener(tool, tw, this, edit));
 
         // find where the PolicyTool gui is
         Point location = tw.getLocationOnScreen();
-        setBounds(location.x + 75, location.y + 200, 650, 500);
+        //setBounds(location.x + 75, location.y + 200, 650, 500);
         setLayout(new GridBagLayout());
         setResizable(true);
 
         if (edit) {
             // get the selected item
             entries = tool.getEntry();
-            List policyList = (List)tw.getComponent(ToolWindow.MW_POLICY_LIST);
+            JList policyList = (JList)tw.getComponent(ToolWindow.MW_POLICY_LIST);
             listIndex = policyList.getSelectedIndex();
 
             // get principal list
@@ -1582,82 +1835,97 @@
         }
 
         // codebase label and textfield
-        Label label = new Label(PolicyTool.rb.getString("CodeBase."));
+        JLabel label = new JLabel();
         tw.addNewComponent(this, label, PE_CODEBASE_LABEL,
-                0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH);
-        TextField tf;
+                0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                ToolWindow.R_PADDING);
+        JTextField tf;
         tf = (edit ?
-                new TextField(entries[listIndex].getGrantEntry().codeBase, 60) :
-                new TextField(60));
+                new JTextField(entries[listIndex].getGrantEntry().codeBase) :
+                new JTextField());
+        ToolWindow.configureLabelFor(label, tf, "CodeBase.");
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("Code.Base"));
+                PolicyTool.getMessage("Code.Base"));
         tw.addNewComponent(this, tf, PE_CODEBASE_TEXTFIELD,
-                1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH);
+                1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH);
 
         // signedby label and textfield
-        label = new Label(PolicyTool.rb.getString("SignedBy."));
+        label = new JLabel();
         tw.addNewComponent(this, label, PE_SIGNEDBY_LABEL,
-                           0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH);
+                           0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                           ToolWindow.R_PADDING);
         tf = (edit ?
-                new TextField(entries[listIndex].getGrantEntry().signedBy, 60) :
-                new TextField(60));
+                new JTextField(entries[listIndex].getGrantEntry().signedBy) :
+                new JTextField());
+        ToolWindow.configureLabelFor(label, tf, "SignedBy.");
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("Signed.By."));
+                PolicyTool.getMessage("Signed.By."));
         tw.addNewComponent(this, tf, PE_SIGNEDBY_TEXTFIELD,
-                           1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH);
+                           1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH);
 
         // panel for principal buttons
-        Panel panel = new Panel();
+        JPanel panel = new JPanel();
         panel.setLayout(new GridBagLayout());
 
-        Button button = new Button(PolicyTool.rb.getString("Add.Principal"));
+        JButton button = new JButton();
+        ToolWindow.configureButton(button, "Add.Principal");
         button.addActionListener
                 (new AddPrinButtonListener(tool, tw, this, edit));
         tw.addNewComponent(panel, button, PE_ADD_PRIN_BUTTON,
                 0, 0, 1, 1, 100.0, 0.0, GridBagConstraints.HORIZONTAL);
 
-        button = new Button(PolicyTool.rb.getString("Edit.Principal"));
+        button = new JButton();
+        ToolWindow.configureButton(button, "Edit.Principal");
         button.addActionListener(new EditPrinButtonListener
                                                 (tool, tw, this, edit));
         tw.addNewComponent(panel, button, PE_EDIT_PRIN_BUTTON,
                 1, 0, 1, 1, 100.0, 0.0, GridBagConstraints.HORIZONTAL);
 
-        button = new Button(PolicyTool.rb.getString("Remove.Principal"));
+        button = new JButton();
+        ToolWindow.configureButton(button, "Remove.Principal");
         button.addActionListener(new RemovePrinButtonListener
                                         (tool, tw, this, edit));
         tw.addNewComponent(panel, button, PE_REMOVE_PRIN_BUTTON,
                 2, 0, 1, 1, 100.0, 0.0, GridBagConstraints.HORIZONTAL);
 
         tw.addNewComponent(this, panel, PE_PANEL0,
-                1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.HORIZONTAL);
+                1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.HORIZONTAL,
+                           ToolWindow.LITE_BOTTOM_PADDING);
 
         // principal label and list
-        label = new Label(PolicyTool.rb.getString("Principals."));
+        label = new JLabel();
         tw.addNewComponent(this, label, PE_PRIN_LABEL,
                            0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.BOTTOM_PADDING);
-        tw.addNewComponent(this, prinList, PE_PRIN_LIST,
-                           1, 3, 3, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                           ToolWindow.R_BOTTOM_PADDING);
+        JScrollPane scrollPane = new JScrollPane(prinList);
+        ToolWindow.configureLabelFor(label, scrollPane, "Principals.");
+        tw.addNewComponent(this, scrollPane, PE_PRIN_LIST,
+                           1, 3, 3, 1, 0.0, prinList.getVisibleRowCount(), GridBagConstraints.BOTH,
                            ToolWindow.BOTTOM_PADDING);
 
         // panel for permission buttons
-        panel = new Panel();
+        panel = new JPanel();
         panel.setLayout(new GridBagLayout());
 
-        button = new Button(PolicyTool.rb.getString(".Add.Permission"));
+        button = new JButton();
+        ToolWindow.configureButton(button, ".Add.Permission");
         button.addActionListener(new AddPermButtonListener
                                                 (tool, tw, this, edit));
         tw.addNewComponent(panel, button, PE_ADD_PERM_BUTTON,
                 0, 0, 1, 1, 100.0, 0.0, GridBagConstraints.HORIZONTAL);
 
-        button = new Button(PolicyTool.rb.getString(".Edit.Permission"));
+        button = new JButton();
+        ToolWindow.configureButton(button, ".Edit.Permission");
         button.addActionListener(new EditPermButtonListener
                                                 (tool, tw, this, edit));
         tw.addNewComponent(panel, button, PE_EDIT_PERM_BUTTON,
                 1, 0, 1, 1, 100.0, 0.0, GridBagConstraints.HORIZONTAL);
 
 
-        button = new Button(PolicyTool.rb.getString("Remove.Permission"));
+        button = new JButton();
+        ToolWindow.configureButton(button, "Remove.Permission");
         button.addActionListener(new RemovePermButtonListener
                                         (tool, tw, this, edit));
         tw.addNewComponent(panel, button, PE_REMOVE_PERM_BUTTON,
@@ -1668,27 +1936,29 @@
                 ToolWindow.LITE_BOTTOM_PADDING);
 
         // permission list
-        tw.addNewComponent(this, permList, PE_PERM_LIST,
-                           0, 5, 3, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+        scrollPane = new JScrollPane(permList);
+        tw.addNewComponent(this, scrollPane, PE_PERM_LIST,
+                           0, 5, 3, 1, 0.0, permList.getVisibleRowCount(), GridBagConstraints.BOTH,
                            ToolWindow.BOTTOM_PADDING);
 
 
         // panel for Done and Cancel buttons
-        panel = new Panel();
+        panel = new JPanel();
         panel.setLayout(new GridBagLayout());
 
         // Done Button
-        button = new Button(PolicyTool.rb.getString("Done"));
-        button.addActionListener
+        JButton okButton = new JButton(PolicyTool.getMessage("Done"));
+        okButton.addActionListener
                 (new AddEntryDoneButtonListener(tool, tw, this, edit));
-        tw.addNewComponent(panel, button, PE_DONE_BUTTON,
+        tw.addNewComponent(panel, okButton, PE_DONE_BUTTON,
                            0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
                            ToolWindow.LR_PADDING);
 
         // Cancel Button
-        button = new Button(PolicyTool.rb.getString("Cancel"));
-        button.addActionListener(new CancelButtonListener(this));
-        tw.addNewComponent(panel, button, PE_CANCEL_BUTTON,
+        JButton cancelButton = new JButton(PolicyTool.getMessage("Cancel"));
+        ActionListener cancelListener = new CancelButtonListener(this);
+        cancelButton.addActionListener(cancelListener);
+        tw.addNewComponent(panel, cancelButton, PE_CANCEL_BUTTON,
                            1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
                            ToolWindow.LR_PADDING);
 
@@ -1696,6 +1966,11 @@
         tw.addNewComponent(this, panel, PE_PANEL2,
                 0, 6, 2, 1, 0.0, 0.0, GridBagConstraints.VERTICAL);
 
+        getRootPane().setDefaultButton(okButton);
+        getRootPane().registerKeyboardAction(cancelListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+        pack();
+        setLocationRelativeTo(tw);
         setVisible(true);
     }
 
@@ -1710,13 +1985,13 @@
         CertificateException, IOException, Exception {
 
         // get the Codebase
-        TextField tf = (TextField)getComponent(PE_CODEBASE_TEXTFIELD);
+        JTextField tf = (JTextField)getComponent(PE_CODEBASE_TEXTFIELD);
         String codebase = null;
         if (tf.getText().trim().equals("") == false)
                 codebase = new String(tf.getText().trim());
 
         // get the SignedBy
-        tf = (TextField)getComponent(PE_SIGNEDBY_TEXTFIELD);
+        tf = (JTextField)getComponent(PE_SIGNEDBY_TEXTFIELD);
         String signedby = null;
         if (tf.getText().trim().equals("") == false)
                 signedby = new String(tf.getText().trim());
@@ -1728,7 +2003,7 @@
         // get the new Principals
         LinkedList<PolicyParser.PrincipalEntry> prins = new LinkedList<>();
         TaggedList prinList = (TaggedList)getComponent(PE_PRIN_LIST);
-        for (int i = 0; i < prinList.getItemCount(); i++) {
+        for (int i = 0; i < prinList.getModel().getSize(); i++) {
             prins.add((PolicyParser.PrincipalEntry)prinList.getObject(i));
         }
         ge.principals = prins;
@@ -1736,7 +2011,7 @@
         // get the new Permissions
         Vector<PolicyParser.PermissionEntry> perms = new Vector<>();
         TaggedList permList = (TaggedList)getComponent(PE_PERM_LIST);
-        for (int i = 0; i < permList.getItemCount(); i++) {
+        for (int i = 0; i < permList.getModel().getSize(); i++) {
             perms.addElement((PolicyParser.PermissionEntry)permList.getObject(i));
         }
         ge.permissionEntries = perms;
@@ -1754,78 +2029,89 @@
 
         // find where the PolicyTool gui is
         Point location = tw.getLocationOnScreen();
-        setBounds(location.x + 25, location.y + 100, 500, 300);
+        //setBounds(location.x + 25, location.y + 100, 500, 300);
         setLayout(new GridBagLayout());
 
         if (mode == EDIT_KEYSTORE) {
 
             // KeyStore label and textfield
-            Label label = new Label
-                        (PolicyTool.rb.getString("KeyStore.URL."));
+            JLabel label = new JLabel();
             tw.addNewComponent(this, label, KSD_NAME_LABEL,
                                0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                               ToolWindow.BOTTOM_PADDING);
-            TextField tf = new TextField(tool.getKeyStoreName(), 30);
+                               ToolWindow.R_BOTTOM_PADDING);
+            JTextField tf = new JTextField(tool.getKeyStoreName(), 30);
+            ToolWindow.configureLabelFor(label, tf, "KeyStore.URL.");
+            tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
 
             // URL to U R L, so that accessibility reader will pronounce well
             tf.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("KeyStore.U.R.L."));
+                PolicyTool.getMessage("KeyStore.U.R.L."));
             tw.addNewComponent(this, tf, KSD_NAME_TEXTFIELD,
-                               1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                               1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
                                ToolWindow.BOTTOM_PADDING);
 
             // KeyStore type and textfield
-            label = new Label(PolicyTool.rb.getString("KeyStore.Type."));
+            label = new JLabel();
             tw.addNewComponent(this, label, KSD_TYPE_LABEL,
                                0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                               ToolWindow.BOTTOM_PADDING);
-            tf = new TextField(tool.getKeyStoreType(), 30);
+                               ToolWindow.R_BOTTOM_PADDING);
+            tf = new JTextField(tool.getKeyStoreType(), 30);
+            ToolWindow.configureLabelFor(label, tf, "KeyStore.Type.");
+            tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
             tf.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("KeyStore.Type."));
+                PolicyTool.getMessage("KeyStore.Type."));
             tw.addNewComponent(this, tf, KSD_TYPE_TEXTFIELD,
-                               1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                               1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
                                ToolWindow.BOTTOM_PADDING);
 
             // KeyStore provider and textfield
-            label = new Label(PolicyTool.rb.getString
-                                ("KeyStore.Provider."));
+            label = new JLabel();
             tw.addNewComponent(this, label, KSD_PROVIDER_LABEL,
                                0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                               ToolWindow.BOTTOM_PADDING);
-            tf = new TextField(tool.getKeyStoreProvider(), 30);
+                               ToolWindow.R_BOTTOM_PADDING);
+            tf = new JTextField(tool.getKeyStoreProvider(), 30);
+            ToolWindow.configureLabelFor(label, tf, "KeyStore.Provider.");
+            tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
             tf.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("KeyStore.Provider."));
+                PolicyTool.getMessage("KeyStore.Provider."));
             tw.addNewComponent(this, tf, KSD_PROVIDER_TEXTFIELD,
-                               1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                               1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
                                ToolWindow.BOTTOM_PADDING);
 
             // KeyStore password URL and textfield
-            label = new Label(PolicyTool.rb.getString
-                                ("KeyStore.Password.URL."));
+            label = new JLabel();
             tw.addNewComponent(this, label, KSD_PWD_URL_LABEL,
                                0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                               ToolWindow.BOTTOM_PADDING);
-            tf = new TextField(tool.getKeyStorePwdURL(), 30);
+                               ToolWindow.R_BOTTOM_PADDING);
+            tf = new JTextField(tool.getKeyStorePwdURL(), 30);
+            ToolWindow.configureLabelFor(label, tf, "KeyStore.Password.URL.");
+            tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
             tf.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("KeyStore.Password.U.R.L."));
+                PolicyTool.getMessage("KeyStore.Password.U.R.L."));
             tw.addNewComponent(this, tf, KSD_PWD_URL_TEXTFIELD,
-                               1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                               1, 3, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
                                ToolWindow.BOTTOM_PADDING);
 
             // OK button
-            Button okButton = new Button(PolicyTool.rb.getString("OK"));
+            JButton okButton = new JButton(PolicyTool.getMessage("OK"));
             okButton.addActionListener
                         (new ChangeKeyStoreOKButtonListener(tool, tw, this));
             tw.addNewComponent(this, okButton, KSD_OK_BUTTON,
                         0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL);
 
             // cancel button
-            Button cancelButton = new Button(PolicyTool.rb.getString("Cancel"));
-            cancelButton.addActionListener(new CancelButtonListener(this));
+            JButton cancelButton = new JButton(PolicyTool.getMessage("Cancel"));
+            ActionListener cancelListener = new CancelButtonListener(this);
+            cancelButton.addActionListener(cancelListener);
             tw.addNewComponent(this, cancelButton, KSD_CANCEL_BUTTON,
                         1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL);
 
+            getRootPane().setDefaultButton(okButton);
+            getRootPane().registerKeyboardAction(cancelListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
         }
+
+        pack();
+        setLocationRelativeTo(tw);
         setVisible(true);
     }
 
@@ -1851,75 +2137,78 @@
         }
 
         ToolDialog newTD = new ToolDialog
-                (PolicyTool.rb.getString("Principals"), tool, tw, true);
+                (PolicyTool.getMessage("Principals"), tool, tw, true);
         newTD.addWindowListener(new ChildWindowListener(newTD));
 
         // find where the PolicyTool gui is
         Point location = getLocationOnScreen();
-        newTD.setBounds(location.x + 50, location.y + 100, 650, 190);
+        //newTD.setBounds(location.x + 50, location.y + 100, 650, 190);
         newTD.setLayout(new GridBagLayout());
         newTD.setResizable(true);
 
         // description label
-        Label label = (edit ?
-                new Label(PolicyTool.rb.getString(".Edit.Principal.")) :
-                new Label(PolicyTool.rb.getString(".Add.New.Principal.")));
+        JLabel label = (edit ?
+                new JLabel(PolicyTool.getMessage(".Edit.Principal.")) :
+                new JLabel(PolicyTool.getMessage(".Add.New.Principal.")));
         tw.addNewComponent(newTD, label, PRD_DESC_LABEL,
                            0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                            ToolWindow.TOP_BOTTOM_PADDING);
 
         // principal choice
-        Choice choice = new Choice();
-        choice.add(PRIN_TYPE);
+        JComboBox choice = new JComboBox();
+        choice.addItem(PRIN_TYPE);
         choice.getAccessibleContext().setAccessibleName(PRIN_TYPE);
         for (int i = 0; i < PRIN_ARRAY.size(); i++) {
             Prin next = PRIN_ARRAY.get(i);
-            choice.add(next.CLASS);
+            choice.addItem(next.CLASS);
         }
 
-        choice.addItemListener(new PrincipalTypeMenuListener(newTD));
         if (edit) {
             if (PolicyParser.PrincipalEntry.WILDCARD_CLASS.equals
                                 (editMe.getPrincipalClass())) {
-                choice.select(PRIN_TYPE);
+                choice.setSelectedItem(PRIN_TYPE);
             } else {
                 Prin inputPrin = getPrin(editMe.getPrincipalClass(), true);
                 if (inputPrin != null) {
-                    choice.select(inputPrin.CLASS);
+                    choice.setSelectedItem(inputPrin.CLASS);
                 }
             }
         }
+        // Add listener after selected item is set
+        choice.addItemListener(new PrincipalTypeMenuListener(newTD));
 
         tw.addNewComponent(newTD, choice, PRD_PRIN_CHOICE,
                            0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                            ToolWindow.LR_PADDING);
 
         // principal textfield
-        TextField tf;
+        JTextField tf;
         tf = (edit ?
-                new TextField(editMe.getDisplayClass(), 30) :
-                new TextField(30));
+                new JTextField(editMe.getDisplayClass(), 30) :
+                new JTextField(30));
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(PRIN_TYPE);
         tw.addNewComponent(newTD, tf, PRD_PRIN_TEXTFIELD,
-                           1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                           1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
                            ToolWindow.LR_PADDING);
 
         // name label and textfield
-        label = new Label(PRIN_NAME);
+        label = new JLabel(PRIN_NAME);
         tf = (edit ?
-                new TextField(editMe.getDisplayName(), 40) :
-                new TextField(40));
+                new JTextField(editMe.getDisplayName(), 40) :
+                new JTextField(40));
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(PRIN_NAME);
 
         tw.addNewComponent(newTD, label, PRD_NAME_LABEL,
                            0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                            ToolWindow.LR_PADDING);
         tw.addNewComponent(newTD, tf, PRD_NAME_TEXTFIELD,
-                           1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
+                           1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
                            ToolWindow.LR_PADDING);
 
         // OK button
-        Button okButton = new Button(PolicyTool.rb.getString("OK"));
+        JButton okButton = new JButton(PolicyTool.getMessage("OK"));
         okButton.addActionListener(
             new NewPolicyPrinOKButtonListener
                                         (tool, tw, this, newTD, edit));
@@ -1927,12 +2216,18 @@
                            0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
                            ToolWindow.TOP_BOTTOM_PADDING);
         // cancel button
-        Button cancelButton = new Button(PolicyTool.rb.getString("Cancel"));
-        cancelButton.addActionListener(new CancelButtonListener(newTD));
+        JButton cancelButton = new JButton(PolicyTool.getMessage("Cancel"));
+        ActionListener cancelListener = new CancelButtonListener(newTD);
+        cancelButton.addActionListener(cancelListener);
         tw.addNewComponent(newTD, cancelButton, PRD_CANCEL_BUTTON,
                            1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
                            ToolWindow.TOP_BOTTOM_PADDING);
 
+        newTD.getRootPane().setDefaultButton(okButton);
+        newTD.getRootPane().registerKeyboardAction(cancelListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+        newTD.pack();
+        newTD.setLocationRelativeTo(tw);
         newTD.setVisible(true);
     }
 
@@ -1958,98 +2253,102 @@
         }
 
         ToolDialog newTD = new ToolDialog
-                (PolicyTool.rb.getString("Permissions"), tool, tw, true);
+                (PolicyTool.getMessage("Permissions"), tool, tw, true);
         newTD.addWindowListener(new ChildWindowListener(newTD));
 
         // find where the PolicyTool gui is
         Point location = getLocationOnScreen();
-        newTD.setBounds(location.x + 50, location.y + 100, 700, 250);
+        //newTD.setBounds(location.x + 50, location.y + 100, 700, 250);
         newTD.setLayout(new GridBagLayout());
         newTD.setResizable(true);
 
         // description label
-        Label label = (edit ?
-                new Label(PolicyTool.rb.getString(".Edit.Permission.")) :
-                new Label(PolicyTool.rb.getString(".Add.New.Permission.")));
+        JLabel label = (edit ?
+                new JLabel(PolicyTool.getMessage(".Edit.Permission.")) :
+                new JLabel(PolicyTool.getMessage(".Add.New.Permission.")));
         tw.addNewComponent(newTD, label, PD_DESC_LABEL,
                            0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                            ToolWindow.TOP_BOTTOM_PADDING);
 
         // permission choice (added in alphabetical order)
-        Choice choice = new Choice();
-        choice.add(PERM);
+        JComboBox choice = new JComboBox();
+        choice.addItem(PERM);
         choice.getAccessibleContext().setAccessibleName(PERM);
         for (int i = 0; i < PERM_ARRAY.size(); i++) {
             Perm next = PERM_ARRAY.get(i);
-            choice.add(next.CLASS);
+            choice.addItem(next.CLASS);
         }
-        choice.addItemListener(new PermissionMenuListener(newTD));
         tw.addNewComponent(newTD, choice, PD_PERM_CHOICE,
                            0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.LR_PADDING);
+                           ToolWindow.LR_BOTTOM_PADDING);
 
         // permission textfield
-        TextField tf;
-        tf = (edit ? new TextField(editMe.permission, 30) : new TextField(30));
+        JTextField tf;
+        tf = (edit ? new JTextField(editMe.permission, 30) : new JTextField(30));
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(PERM);
         if (edit) {
             Perm inputPerm = getPerm(editMe.permission, true);
             if (inputPerm != null) {
-                choice.select(inputPerm.CLASS);
+                choice.setSelectedItem(inputPerm.CLASS);
             }
         }
         tw.addNewComponent(newTD, tf, PD_PERM_TEXTFIELD,
-                           1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.LR_PADDING);
+                           1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
+                           ToolWindow.LR_BOTTOM_PADDING);
+        choice.addItemListener(new PermissionMenuListener(newTD));
 
         // name label and textfield
-        choice = new Choice();
-        choice.add(PERM_NAME);
+        choice = new JComboBox();
+        choice.addItem(PERM_NAME);
         choice.getAccessibleContext().setAccessibleName(PERM_NAME);
-        choice.addItemListener(new PermissionNameMenuListener(newTD));
-        tf = (edit ? new TextField(editMe.name, 40) : new TextField(40));
+        tf = (edit ? new JTextField(editMe.name, 40) : new JTextField(40));
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(PERM_NAME);
         if (edit) {
             setPermissionNames(getPerm(editMe.permission, true), choice, tf);
         }
         tw.addNewComponent(newTD, choice, PD_NAME_CHOICE,
                            0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.LR_PADDING);
+                           ToolWindow.LR_BOTTOM_PADDING);
         tw.addNewComponent(newTD, tf, PD_NAME_TEXTFIELD,
-                           1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.LR_PADDING);
+                           1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
+                           ToolWindow.LR_BOTTOM_PADDING);
+        choice.addItemListener(new PermissionNameMenuListener(newTD));
 
         // actions label and textfield
-        choice = new Choice();
-        choice.add(PERM_ACTIONS);
+        choice = new JComboBox();
+        choice.addItem(PERM_ACTIONS);
         choice.getAccessibleContext().setAccessibleName(PERM_ACTIONS);
-        choice.addItemListener(new PermissionActionsMenuListener(newTD));
-        tf = (edit ? new TextField(editMe.action, 40) : new TextField(40));
+        tf = (edit ? new JTextField(editMe.action, 40) : new JTextField(40));
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(PERM_ACTIONS);
         if (edit) {
             setPermissionActions(getPerm(editMe.permission, true), choice, tf);
         }
         tw.addNewComponent(newTD, choice, PD_ACTIONS_CHOICE,
                            0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.LR_PADDING);
+                           ToolWindow.LR_BOTTOM_PADDING);
         tw.addNewComponent(newTD, tf, PD_ACTIONS_TEXTFIELD,
-                           1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.LR_PADDING);
+                           1, 3, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
+                           ToolWindow.LR_BOTTOM_PADDING);
+        choice.addItemListener(new PermissionActionsMenuListener(newTD));
 
         // signedby label and textfield
-        label = new Label(PolicyTool.rb.getString("Signed.By."));
+        label = new JLabel(PolicyTool.getMessage("Signed.By."));
         tw.addNewComponent(newTD, label, PD_SIGNEDBY_LABEL,
                            0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.LR_PADDING);
-        tf = (edit ? new TextField(editMe.signedBy, 40) : new TextField(40));
+                           ToolWindow.LR_BOTTOM_PADDING);
+        tf = (edit ? new JTextField(editMe.signedBy, 40) : new JTextField(40));
+        tf.setPreferredSize(new Dimension(tf.getPreferredSize().width, TEXTFIELD_HEIGHT));
         tf.getAccessibleContext().setAccessibleName(
-                PolicyTool.rb.getString("Signed.By."));
+                PolicyTool.getMessage("Signed.By."));
         tw.addNewComponent(newTD, tf, PD_SIGNEDBY_TEXTFIELD,
-                           1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH,
-                           ToolWindow.LR_PADDING);
+                           1, 4, 1, 1, 1.0, 0.0, GridBagConstraints.BOTH,
+                           ToolWindow.LR_BOTTOM_PADDING);
 
         // OK button
-        Button okButton = new Button(PolicyTool.rb.getString("OK"));
+        JButton okButton = new JButton(PolicyTool.getMessage("OK"));
         okButton.addActionListener(
             new NewPolicyPermOKButtonListener
                                     (tool, tw, this, newTD, edit));
@@ -2058,12 +2357,18 @@
                            ToolWindow.TOP_BOTTOM_PADDING);
 
         // cancel button
-        Button cancelButton = new Button(PolicyTool.rb.getString("Cancel"));
-        cancelButton.addActionListener(new CancelButtonListener(newTD));
+        JButton cancelButton = new JButton(PolicyTool.getMessage("Cancel"));
+        ActionListener cancelListener = new CancelButtonListener(newTD);
+        cancelButton.addActionListener(cancelListener);
         tw.addNewComponent(newTD, cancelButton, PD_CANCEL_BUTTON,
                            1, 5, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
                            ToolWindow.TOP_BOTTOM_PADDING);
 
+        newTD.getRootPane().setDefaultButton(okButton);
+        newTD.getRootPane().registerKeyboardAction(cancelListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+        newTD.pack();
+        newTD.setLocationRelativeTo(tw);
         newTD.setVisible(true);
     }
 
@@ -2072,9 +2377,9 @@
      */
     PolicyParser.PrincipalEntry getPrinFromDialog() throws Exception {
 
-        TextField tf = (TextField)getComponent(PRD_PRIN_TEXTFIELD);
+        JTextField tf = (JTextField)getComponent(PRD_PRIN_TEXTFIELD);
         String pclass = new String(tf.getText().trim());
-        tf = (TextField)getComponent(PRD_NAME_TEXTFIELD);
+        tf = (JTextField)getComponent(PRD_NAME_TEXTFIELD);
         String pname = new String(tf.getText().trim());
         if (pclass.equals("*")) {
             pclass = PolicyParser.PrincipalEntry.WILDCARD_CLASS;
@@ -2088,10 +2393,10 @@
         if ((pclass.equals(PolicyParser.PrincipalEntry.WILDCARD_CLASS)) &&
             (!pname.equals(PolicyParser.PrincipalEntry.WILDCARD_NAME))) {
             throw new Exception
-                        (PolicyTool.rb.getString("Cannot.Specify.Principal.with.a.Wildcard.Class.without.a.Wildcard.Name"));
+                        (PolicyTool.getMessage("Cannot.Specify.Principal.with.a.Wildcard.Class.without.a.Wildcard.Name"));
         } else if (pname.equals("")) {
             throw new Exception
-                        (PolicyTool.rb.getString("Cannot.Specify.Principal.without.a.Name"));
+                        (PolicyTool.getMessage("Cannot.Specify.Principal.without.a.Name"));
         } else if (pclass.equals("")) {
             // make this consistent with what PolicyParser does
             // when it sees an empty principal class
@@ -2130,15 +2435,15 @@
      */
     PolicyParser.PermissionEntry getPermFromDialog() {
 
-        TextField tf = (TextField)getComponent(PD_PERM_TEXTFIELD);
+        JTextField tf = (JTextField)getComponent(PD_PERM_TEXTFIELD);
         String permission = new String(tf.getText().trim());
-        tf = (TextField)getComponent(PD_NAME_TEXTFIELD);
+        tf = (JTextField)getComponent(PD_NAME_TEXTFIELD);
         String name = null;
         if (tf.getText().trim().equals("") == false)
             name = new String(tf.getText().trim());
         if (permission.equals("") ||
             (!permission.equals(ALL_PERM_CLASS) && name == null)) {
-            throw new InvalidParameterException(PolicyTool.rb.getString
+            throw new InvalidParameterException(PolicyTool.getMessage
                 ("Permission.and.Target.Name.must.have.a.value"));
         }
 
@@ -2154,11 +2459,11 @@
 
         if (permission.equals(FILE_PERM_CLASS) && name.lastIndexOf("\\\\") > 0) {
             char result = tw.displayYesNoDialog(this,
-                    PolicyTool.rb.getString("Warning"),
-                    PolicyTool.rb.getString(
+                    PolicyTool.getMessage("Warning"),
+                    PolicyTool.getMessage(
                         "Warning.File.name.may.include.escaped.backslash.characters.It.is.not.necessary.to.escape.backslash.characters.the.tool.escapes"),
-                    PolicyTool.rb.getString("Retain"),
-                    PolicyTool.rb.getString("Edit")
+                    PolicyTool.getMessage("Retain"),
+                    PolicyTool.getMessage("Edit")
                     );
             if (result != 'Y') {
                 // an invisible exception
@@ -2166,13 +2471,13 @@
             }
         }
         // get the Actions
-        tf = (TextField)getComponent(PD_ACTIONS_TEXTFIELD);
+        tf = (JTextField)getComponent(PD_ACTIONS_TEXTFIELD);
         String actions = null;
         if (tf.getText().trim().equals("") == false)
             actions = new String(tf.getText().trim());
 
         // get the Signed By
-        tf = (TextField)getComponent(PD_SIGNEDBY_TEXTFIELD);
+        tf = (JTextField)getComponent(PD_SIGNEDBY_TEXTFIELD);
         String signedBy = null;
         if (tf.getText().trim().equals("") == false)
             signedBy = new String(tf.getText().trim());
@@ -2189,7 +2494,7 @@
                     PublicKey pubKey = tool.getPublicKeyAlias(signers[i]);
                     if (pubKey == null) {
                         MessageFormat form = new MessageFormat
-                            (PolicyTool.rb.getString
+                            (PolicyTool.getMessage
                             ("Warning.A.public.key.for.alias.signers.i.does.not.exist.Make.sure.a.KeyStore.is.properly.configured."));
                         Object[] source = {signers[i]};
                         tool.warnings.addElement(form.format(source));
@@ -2209,27 +2514,27 @@
     void displayConfirmRemovePolicyEntry() {
 
         // find the entry to be removed
-        List list = (List)tw.getComponent(ToolWindow.MW_POLICY_LIST);
+        JList list = (JList)tw.getComponent(ToolWindow.MW_POLICY_LIST);
         int index = list.getSelectedIndex();
         PolicyEntry entries[] = tool.getEntry();
 
         // find where the PolicyTool gui is
         Point location = tw.getLocationOnScreen();
-        setBounds(location.x + 25, location.y + 100, 600, 400);
+        //setBounds(location.x + 25, location.y + 100, 600, 400);
         setLayout(new GridBagLayout());
 
         // ask the user do they really want to do this?
-        Label label = new Label
-                (PolicyTool.rb.getString("Remove.this.Policy.Entry."));
+        JLabel label = new JLabel
+                (PolicyTool.getMessage("Remove.this.Policy.Entry."));
         tw.addNewComponent(this, label, CRPE_LABEL1,
                            0, 0, 2, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                            ToolWindow.BOTTOM_PADDING);
 
         // display the policy entry
-        label = new Label(entries[index].codebaseToString());
+        label = new JLabel(entries[index].codebaseToString());
         tw.addNewComponent(this, label, CRPE_LABEL2,
                         0, 1, 2, 1, 0.0, 0.0, GridBagConstraints.BOTH);
-        label = new Label(entries[index].principalsToString().trim());
+        label = new JLabel(entries[index].principalsToString().trim());
         tw.addNewComponent(this, label, CRPE_LABEL2+1,
                         0, 2, 2, 1, 0.0, 0.0, GridBagConstraints.BOTH);
         Vector<PolicyParser.PermissionEntry> perms =
@@ -2237,7 +2542,7 @@
         for (int i = 0; i < perms.size(); i++) {
             PolicyParser.PermissionEntry nextPerm = perms.elementAt(i);
             String permString = ToolDialog.PermissionEntryToUserFriendlyString(nextPerm);
-            label = new Label("    " + permString);
+            label = new JLabel("    " + permString);
             if (i == (perms.size()-1)) {
                 tw.addNewComponent(this, label, CRPE_LABEL2 + 2 + i,
                                  1, 3 + i, 1, 1, 0.0, 0.0,
@@ -2252,11 +2557,11 @@
 
 
         // add OK/CANCEL buttons in a new panel
-        Panel panel = new Panel();
+        JPanel panel = new JPanel();
         panel.setLayout(new GridBagLayout());
 
         // OK button
-        Button okButton = new Button(PolicyTool.rb.getString("OK"));
+        JButton okButton = new JButton(PolicyTool.getMessage("OK"));
         okButton.addActionListener
                 (new ConfirmRemovePolicyEntryOKButtonListener(tool, tw, this));
         tw.addNewComponent(panel, okButton, CRPE_PANEL_OK,
@@ -2264,8 +2569,9 @@
                            GridBagConstraints.VERTICAL, ToolWindow.LR_PADDING);
 
         // cancel button
-        Button cancelButton = new Button(PolicyTool.rb.getString("Cancel"));
-        cancelButton.addActionListener(new CancelButtonListener(this));
+        JButton cancelButton = new JButton(PolicyTool.getMessage("Cancel"));
+        ActionListener cancelListener = new CancelButtonListener(this);
+        cancelButton.addActionListener(cancelListener);
         tw.addNewComponent(panel, cancelButton, CRPE_PANEL_CANCEL,
                            1, 0, 1, 1, 0.0, 0.0,
                            GridBagConstraints.VERTICAL, ToolWindow.LR_PADDING);
@@ -2274,7 +2580,11 @@
                            0, 3 + perms.size(), 2, 1, 0.0, 0.0,
                            GridBagConstraints.VERTICAL, ToolWindow.TOP_BOTTOM_PADDING);
 
+        getRootPane().setDefaultButton(okButton);
+        getRootPane().registerKeyboardAction(cancelListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
+
         pack();
+        setLocationRelativeTo(tw);
         setVisible(true);
     }
 
@@ -2285,7 +2595,7 @@
 
         // pop up a dialog box for the user to enter a filename.
         FileDialog fd = new FileDialog
-                (tw, PolicyTool.rb.getString("Save.As"), FileDialog.SAVE);
+                (tw, PolicyTool.getMessage("Save.As"), FileDialog.SAVE);
         fd.addWindowListener(new WindowAdapter() {
             public void windowClosing(WindowEvent e) {
                 e.getWindow().setVisible(false);
@@ -2308,13 +2618,13 @@
             tool.savePolicy(filename);
 
             // display status
-            MessageFormat form = new MessageFormat(PolicyTool.rb.getString
+            MessageFormat form = new MessageFormat(PolicyTool.getMessage
                     ("Policy.successfully.written.to.filename"));
             Object[] source = {filename};
             tw.displayStatusDialog(null, form.format(source));
 
             // display the new policy filename
-            TextField newFilename = (TextField)tw.getComponent
+            JTextField newFilename = (JTextField)tw.getComponent
                             (ToolWindow.MW_FILENAME_TEXTFIELD);
             newFilename.setText(filename);
             tw.setVisible(true);
@@ -2326,7 +2636,7 @@
         } catch (FileNotFoundException fnfe) {
             if (filename == null || filename.equals("")) {
                 tw.displayErrorDialog(null, new FileNotFoundException
-                            (PolicyTool.rb.getString("null.filename")));
+                            (PolicyTool.getMessage("null.filename")));
             } else {
                 tw.displayErrorDialog(null, fnfe);
             }
@@ -2344,35 +2654,38 @@
 
             // find where the PolicyTool gui is
             Point location = tw.getLocationOnScreen();
-            setBounds(location.x + 75, location.y + 100, 400, 150);
+            //setBounds(location.x + 75, location.y + 100, 400, 150);
             setLayout(new GridBagLayout());
 
-            Label label = new Label
-                (PolicyTool.rb.getString("Save.changes."));
+            JLabel label = new JLabel
+                (PolicyTool.getMessage("Save.changes."));
             tw.addNewComponent(this, label, USC_LABEL,
                                0, 0, 3, 1, 0.0, 0.0, GridBagConstraints.BOTH,
                                ToolWindow.L_TOP_BOTTOM_PADDING);
 
-            Panel panel = new Panel();
+            JPanel panel = new JPanel();
             panel.setLayout(new GridBagLayout());
 
-            Button yesButton = new Button(PolicyTool.rb.getString("Yes"));
+            JButton yesButton = new JButton();
+            ToolWindow.configureButton(yesButton, "Yes");
             yesButton.addActionListener
                         (new UserSaveYesButtonListener(this, tool, tw, select));
             tw.addNewComponent(panel, yesButton, USC_YES_BUTTON,
                                0, 0, 1, 1, 0.0, 0.0,
                                GridBagConstraints.VERTICAL,
                                ToolWindow.LR_BOTTOM_PADDING);
-            Button noButton = new Button(PolicyTool.rb.getString("No"));
+            JButton noButton = new JButton();
+            ToolWindow.configureButton(noButton, "No");
             noButton.addActionListener
                         (new UserSaveNoButtonListener(this, tool, tw, select));
             tw.addNewComponent(panel, noButton, USC_NO_BUTTON,
                                1, 0, 1, 1, 0.0, 0.0,
                                GridBagConstraints.VERTICAL,
                                ToolWindow.LR_BOTTOM_PADDING);
-            Button cancelButton = new Button(PolicyTool.rb.getString("Cancel"));
-            cancelButton.addActionListener
-                        (new UserSaveCancelButtonListener(this));
+            JButton cancelButton = new JButton();
+            ToolWindow.configureButton(cancelButton, "Cancel");
+            ActionListener cancelListener = new CancelButtonListener(this);
+            cancelButton.addActionListener(cancelListener);
             tw.addNewComponent(panel, cancelButton, USC_CANCEL_BUTTON,
                                2, 0, 1, 1, 0.0, 0.0,
                                GridBagConstraints.VERTICAL,
@@ -2381,7 +2694,10 @@
             tw.addNewComponent(this, panel, USC_PANEL,
                                0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.BOTH);
 
+            getRootPane().registerKeyboardAction(cancelListener, escKey, JComponent.WHEN_IN_FOCUSED_WINDOW);
+
             pack();
+            setLocationRelativeTo(tw);
             setVisible(true);
         } else {
             // just do the original request (QUIT, NEW, or OPEN)
@@ -2418,12 +2734,14 @@
             }
 
             // display the policy entries via the policy list textarea
-            List list = new List(40, false);
-            list.addActionListener(new PolicyListListener(tool, tw));
+            JList list = new JList(new DefaultListModel());
+            list.setVisibleRowCount(15);
+            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+            list.addMouseListener(new PolicyListListener(tool, tw));
             tw.replacePolicyList(list);
 
             // display null policy filename and keystore
-            TextField newFilename = (TextField)tw.getComponent(
+            JTextField newFilename = (JTextField)tw.getComponent(
                     ToolWindow.MW_FILENAME_TEXTFIELD);
             newFilename.setText("");
             tw.setVisible(true);
@@ -2433,7 +2751,7 @@
 
             // pop up a dialog box for the user to enter a filename.
             FileDialog fd = new FileDialog
-                (tw, PolicyTool.rb.getString("Open"), FileDialog.LOAD);
+                (tw, PolicyTool.getMessage("Open"), FileDialog.LOAD);
             fd.addWindowListener(new WindowAdapter() {
                 public void windowClosing(WindowEvent e) {
                     e.getWindow().setVisible(false);
@@ -2454,44 +2772,50 @@
                 tool.openPolicy(policyFile);
 
                 // display the policy entries via the policy list textarea
-                list = new List(40, false);
-                list.addActionListener(new PolicyListListener(tool, tw));
+                DefaultListModel listModel = new DefaultListModel();
+                list = new JList(listModel);
+                list.setVisibleRowCount(15);
+                list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+                list.addMouseListener(new PolicyListListener(tool, tw));
                 PolicyEntry entries[] = tool.getEntry();
                 if (entries != null) {
-                    for (int i = 0; i < entries.length; i++)
-                        list.add(entries[i].headerToString());
+                    for (int i = 0; i < entries.length; i++) {
+                        listModel.addElement(entries[i].headerToString());
+                    }
                 }
                 tw.replacePolicyList(list);
                 tool.modified = false;
 
                 // display the new policy filename
-                newFilename = (TextField)tw.getComponent(
+                newFilename = (JTextField)tw.getComponent(
                         ToolWindow.MW_FILENAME_TEXTFIELD);
                 newFilename.setText(policyFile);
                 tw.setVisible(true);
 
                 // inform user of warnings
                 if (tool.newWarning == true) {
-                    tw.displayStatusDialog(null, PolicyTool.rb.getString
+                    tw.displayStatusDialog(null, PolicyTool.getMessage
                         ("Errors.have.occurred.while.opening.the.policy.configuration.View.the.Warning.Log.for.more.information."));
                 }
 
             } catch (Exception e) {
                 // add blank policy listing
-                list = new List(40, false);
-                list.addActionListener(new PolicyListListener(tool, tw));
+                list = new JList(new DefaultListModel());
+                list.setVisibleRowCount(15);
+                list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+                list.addMouseListener(new PolicyListListener(tool, tw));
                 tw.replacePolicyList(list);
                 tool.setPolicyFileName(null);
                 tool.modified = false;
 
                 // display a null policy filename
-                newFilename = (TextField)tw.getComponent(
+                newFilename = (JTextField)tw.getComponent(
                         ToolWindow.MW_FILENAME_TEXTFIELD);
                 newFilename.setText("");
                 tw.setVisible(true);
 
                 // display the error
-                MessageFormat form = new MessageFormat(PolicyTool.rb.getString
+                MessageFormat form = new MessageFormat(PolicyTool.getMessage
                     ("Could.not.open.policy.file.policyFile.e.toString."));
                 Object[] source = {policyFile, e.toString()};
                 tw.displayErrorDialog(null, form.format(source));
@@ -2511,9 +2835,9 @@
      * (user must enter them by hand) then the TARGETS array may be empty
      * (and of course non-null).
      */
-    void setPermissionNames(Perm inputPerm, Choice names, TextField field) {
-        names.removeAll();
-        names.add(PERM_NAME);
+    void setPermissionNames(Perm inputPerm, JComboBox names, JTextField field) {
+        names.removeAllItems();
+        names.addItem(PERM_NAME);
 
         if (inputPerm == null) {
             // custom permission
@@ -2525,7 +2849,7 @@
             // standard permission with standard targets
             field.setEditable(true);
             for (int i = 0; i < inputPerm.TARGETS.length; i++) {
-                names.add(inputPerm.TARGETS[i]);
+                names.addItem(inputPerm.TARGETS[i]);
             }
         }
     }
@@ -2541,9 +2865,9 @@
      * (user must enter them by hand) then the ACTIONS array may be empty
      * (and of course non-null).
      */
-    void setPermissionActions(Perm inputPerm, Choice actions, TextField field) {
-        actions.removeAll();
-        actions.add(PERM_ACTIONS);
+    void setPermissionActions(Perm inputPerm, JComboBox actions, JTextField field) {
+        actions.removeAllItems();
+        actions.addItem(PERM_ACTIONS);
 
         if (inputPerm == null) {
             // custom permission
@@ -2555,7 +2879,7 @@
             // standard permission with standard actions
             field.setEditable(true);
             for (int i = 0; i < inputPerm.ACTIONS.length; i++) {
-                actions.add(inputPerm.ACTIONS[i]);
+                actions.addItem(inputPerm.ACTIONS[i]);
             }
         }
     }
@@ -2587,9 +2911,11 @@
  */
 class ToolWindowListener implements WindowListener {
 
+    private PolicyTool tool;
     private ToolWindow tw;
 
-    ToolWindowListener(ToolWindow tw) {
+    ToolWindowListener(PolicyTool tool, ToolWindow tw) {
+        this.tool = tool;
         this.tw = tw;
     }
 
@@ -2597,16 +2923,14 @@
     }
 
     public void windowClosing(WindowEvent we) {
-
-        // XXX
-        // should we ask user if they want to save changes?
-        // (we do if they choose the Menu->Exit)
-        // seems that if they kill the application by hand,
-        // we don't have to ask.
-
-        tw.setVisible(false);
-        tw.dispose();
-        System.exit(0);
+        // Closing the window acts the same as choosing Menu->Exit.
+
+        // ask user if they want to save changes
+        ToolDialog td = new ToolDialog(PolicyTool.getMessage("Save.Changes"), tool, tw, true);
+        td.displayUserSave(ToolDialog.QUIT);
+
+        // the above method will perform the QUIT as long as the
+        // user does not CANCEL the request
     }
 
     public void windowClosed(WindowEvent we) {
@@ -2629,7 +2953,7 @@
 /**
  * Event handler for the Policy List
  */
-class PolicyListListener implements ActionListener {
+class PolicyListListener extends MouseAdapter implements ActionListener {
 
     private PolicyTool tool;
     private ToolWindow tw;
@@ -2644,9 +2968,15 @@
 
         // display the permission list for a policy entry
         ToolDialog td = new ToolDialog
-                (PolicyTool.rb.getString("Policy.Entry"), tool, tw, true);
+                (PolicyTool.getMessage("Policy.Entry"), tool, tw, true);
         td.displayPolicyEntryDialog(true);
     }
+
+    public void mouseClicked(MouseEvent evt) {
+        if (evt.getClickCount() == 2) {
+            actionPerformed(null);
+        }
+    }
 }
 
 /**
@@ -2669,7 +2999,7 @@
 
             // ask user if they want to save changes
             ToolDialog td = new ToolDialog
-                (PolicyTool.rb.getString("Save.Changes"), tool, tw, true);
+                (PolicyTool.getMessage("Save.Changes"), tool, tw, true);
             td.displayUserSave(ToolDialog.QUIT);
 
             // the above method will perform the QUIT as long as the
@@ -2680,7 +3010,7 @@
 
             // ask user if they want to save changes
             ToolDialog td = new ToolDialog
-                (PolicyTool.rb.getString("Save.Changes"), tool, tw, true);
+                (PolicyTool.getMessage("Save.Changes"), tool, tw, true);
             td.displayUserSave(ToolDialog.NEW);
 
             // the above method will perform the NEW as long as the
@@ -2691,7 +3021,7 @@
 
             // ask user if they want to save changes
             ToolDialog td = new ToolDialog
-                (PolicyTool.rb.getString("Save.Changes"), tool, tw, true);
+                (PolicyTool.getMessage("Save.Changes"), tool, tw, true);
             td.displayUserSave(ToolDialog.OPEN);
 
             // the above method will perform the OPEN as long as the
@@ -2701,14 +3031,14 @@
                                   ToolWindow.SAVE_POLICY_FILE) == 0) {
 
             // get the previously entered filename
-            String filename = ((TextField)tw.getComponent(
+            String filename = ((JTextField)tw.getComponent(
                     ToolWindow.MW_FILENAME_TEXTFIELD)).getText();
 
             // if there is no filename, do a SAVE_AS
             if (filename == null || filename.length() == 0) {
                 // user wants to SAVE AS
                 ToolDialog td = new ToolDialog
-                        (PolicyTool.rb.getString("Save.As"), tool, tw, true);
+                        (PolicyTool.getMessage("Save.As"), tool, tw, true);
                 td.displaySaveAsDialog(ToolDialog.NOACTION);
             } else {
                 try {
@@ -2717,14 +3047,14 @@
 
                     // display status
                     MessageFormat form = new MessageFormat
-                        (PolicyTool.rb.getString
+                        (PolicyTool.getMessage
                         ("Policy.successfully.written.to.filename"));
                     Object[] source = {filename};
                     tw.displayStatusDialog(null, form.format(source));
                 } catch (FileNotFoundException fnfe) {
                     if (filename == null || filename.equals("")) {
                         tw.displayErrorDialog(null, new FileNotFoundException
-                                (PolicyTool.rb.getString("null.filename")));
+                                (PolicyTool.getMessage("null.filename")));
                     } else {
                         tw.displayErrorDialog(null, fnfe);
                     }
@@ -2737,7 +3067,7 @@
 
             // user wants to SAVE AS
             ToolDialog td = new ToolDialog
-                (PolicyTool.rb.getString("Save.As"), tool, tw, true);
+                (PolicyTool.getMessage("Save.As"), tool, tw, true);
             td.displaySaveAsDialog(ToolDialog.NOACTION);
 
         } else if (PolicyTool.collator.compare(e.getActionCommand(),
@@ -2767,23 +3097,23 @@
 
             // display a dialog box for the user to enter policy info
             ToolDialog td = new ToolDialog
-                (PolicyTool.rb.getString("Policy.Entry"), tool, tw, true);
+                (PolicyTool.getMessage("Policy.Entry"), tool, tw, true);
             td.displayPolicyEntryDialog(false);
 
         } else if (PolicyTool.collator.compare(e.getActionCommand(),
                                ToolWindow.REMOVE_POLICY_ENTRY) == 0) {
 
             // get the selected entry
-            List list = (List)tw.getComponent(ToolWindow.MW_POLICY_LIST);
+            JList list = (JList)tw.getComponent(ToolWindow.MW_POLICY_LIST);
             int index = list.getSelectedIndex();
             if (index < 0) {
                 tw.displayErrorDialog(null, new Exception
-                        (PolicyTool.rb.getString("No.Policy.Entry.selected")));
+                        (PolicyTool.getMessage("No.Policy.Entry.selected")));
                 return;
             }
 
             // ask the user if they really want to remove the policy entry
-            ToolDialog td = new ToolDialog(PolicyTool.rb.getString
+            ToolDialog td = new ToolDialog(PolicyTool.getMessage
                 ("Remove.Policy.Entry"), tool, tw, true);
             td.displayConfirmRemovePolicyEntry();
 
@@ -2791,17 +3121,17 @@
                                  ToolWindow.EDIT_POLICY_ENTRY) == 0) {
 
             // get the selected entry
-            List list = (List)tw.getComponent(ToolWindow.MW_POLICY_LIST);
+            JList list = (JList)tw.getComponent(ToolWindow.MW_POLICY_LIST);
             int index = list.getSelectedIndex();
             if (index < 0) {
                 tw.displayErrorDialog(null, new Exception
-                        (PolicyTool.rb.getString("No.Policy.Entry.selected")));
+                        (PolicyTool.getMessage("No.Policy.Entry.selected")));
                 return;
             }
 
             // display the permission list for a policy entry
             ToolDialog td = new ToolDialog
-                (PolicyTool.rb.getString("Policy.Entry"), tool, tw, true);
+                (PolicyTool.getMessage("Policy.Entry"), tool, tw, true);
             td.displayPolicyEntryDialog(true);
 
         } else if (PolicyTool.collator.compare(e.getActionCommand(),
@@ -2809,7 +3139,7 @@
 
             // display a dialog box for the user to enter keystore info
             ToolDialog td = new ToolDialog
-                (PolicyTool.rb.getString("KeyStore"), tool, tw, true);
+                (PolicyTool.getMessage("KeyStore"), tool, tw, true);
             td.keyStoreDialog(ToolDialog.EDIT_KEYSTORE);
         }
     }
@@ -2852,7 +3182,7 @@
                     PublicKey pubKey = tool.getPublicKeyAlias(signers[i]);
                     if (pubKey == null) {
                         MessageFormat form = new MessageFormat
-                            (PolicyTool.rb.getString
+                            (PolicyTool.getMessage
                             ("Warning.A.public.key.for.alias.signers.i.does.not.exist.Make.sure.a.KeyStore.is.properly.configured."));
                         Object[] source = {signers[i]};
                         tool.warnings.addElement(form.format(source));
@@ -2862,18 +3192,18 @@
             }
 
             // add the entry
-            List policyList = (List)tw.getComponent(ToolWindow.MW_POLICY_LIST);
+            JList policyList = (JList)tw.getComponent(ToolWindow.MW_POLICY_LIST);
             if (edit) {
                 int listIndex = policyList.getSelectedIndex();
                 tool.addEntry(newEntry, listIndex);
                 String newCodeBaseStr = newEntry.headerToString();
                 if (PolicyTool.collator.compare
-                        (newCodeBaseStr, policyList.getItem(listIndex)) != 0)
+                        (newCodeBaseStr, policyList.getModel().getElementAt(listIndex)) != 0)
                     tool.modified = true;
-                policyList.replaceItem(newCodeBaseStr, listIndex);
+                ((DefaultListModel)policyList.getModel()).set(listIndex, newCodeBaseStr);
             } else {
                 tool.addEntry(newEntry, -1);
-                policyList.add(newEntry.headerToString());
+                ((DefaultListModel)policyList.getModel()).addElement(newEntry.headerToString());
                 tool.modified = true;
             }
             td.setVisible(false);
@@ -2903,13 +3233,13 @@
 
     public void actionPerformed(ActionEvent e) {
 
-        String URLString = ((TextField)td.getComponent(
+        String URLString = ((JTextField)td.getComponent(
                 ToolDialog.KSD_NAME_TEXTFIELD)).getText().trim();
-        String type = ((TextField)td.getComponent(
+        String type = ((JTextField)td.getComponent(
                 ToolDialog.KSD_TYPE_TEXTFIELD)).getText().trim();
-        String provider = ((TextField)td.getComponent(
+        String provider = ((JTextField)td.getComponent(
                 ToolDialog.KSD_PROVIDER_TEXTFIELD)).getText().trim();
-        String pwdURL = ((TextField)td.getComponent(
+        String pwdURL = ((JTextField)td.getComponent(
                 ToolDialog.KSD_PWD_URL_TEXTFIELD)).getText().trim();
 
         try {
@@ -2920,7 +3250,7 @@
                         (pwdURL.length() == 0 ? null : pwdURL));
             tool.modified = true;
         } catch (Exception ex) {
-            MessageFormat form = new MessageFormat(PolicyTool.rb.getString
+            MessageFormat form = new MessageFormat(PolicyTool.getMessage
                 ("Unable.to.open.KeyStore.ex.toString."));
             Object[] source = {ex.toString()};
             tw.displayErrorDialog(td, form.format(source));
@@ -3016,7 +3346,7 @@
                                         pppe.getPrincipalName());
                 } catch (ClassNotFoundException cnfe) {
                     MessageFormat form = new MessageFormat
-                                (PolicyTool.rb.getString
+                                (PolicyTool.getMessage
                                 ("Warning.Class.not.found.class"));
                     Object[] source = {pppe.getPrincipalClass()};
                     tool.warnings.addElement(form.format(source));
@@ -3077,7 +3407,7 @@
             try {
                 tool.verifyPermission(pppe.permission, pppe.name, pppe.action);
             } catch (ClassNotFoundException cnfe) {
-                MessageFormat form = new MessageFormat(PolicyTool.rb.getString
+                MessageFormat form = new MessageFormat(PolicyTool.getMessage
                                 ("Warning.Class.not.found.class"));
                 Object[] source = {pppe.permission};
                 tool.warnings.addElement(form.format(source));
@@ -3134,7 +3464,7 @@
 
         if (prinIndex < 0) {
             tw.displayErrorDialog(td, new Exception
-                (PolicyTool.rb.getString("No.principal.selected")));
+                (PolicyTool.getMessage("No.principal.selected")));
             return;
         }
         // remove the principal from the display
@@ -3169,7 +3499,7 @@
 
         if (permIndex < 0) {
             tw.displayErrorDialog(td, new Exception
-                (PolicyTool.rb.getString("No.permission.selected")));
+                (PolicyTool.getMessage("No.permission.selected")));
             return;
         }
         // remove the permission from the display
@@ -3187,7 +3517,7 @@
  * GUI listing.  If the user is editing an existing PolicyEntry, we
  * update both the GUI listing and the actual PolicyEntry.
  */
-class EditPrinButtonListener implements ActionListener {
+class EditPrinButtonListener extends MouseAdapter implements ActionListener {
 
     private PolicyTool tool;
     private ToolWindow tw;
@@ -3211,11 +3541,17 @@
 
         if (prinIndex < 0) {
             tw.displayErrorDialog(td, new Exception
-                (PolicyTool.rb.getString("No.principal.selected")));
+                (PolicyTool.getMessage("No.principal.selected")));
             return;
         }
         td.displayPrincipalDialog(editPolicyEntry, true);
     }
+
+    public void mouseClicked(MouseEvent evt) {
+        if (evt.getClickCount() == 2) {
+            actionPerformed(null);
+        }
+    }
 }
 
 /**
@@ -3227,7 +3563,7 @@
  * GUI listing.  If the user is editing an existing PolicyEntry, we
  * update both the GUI listing and the actual PolicyEntry.
  */
-class EditPermButtonListener implements ActionListener {
+class EditPermButtonListener extends MouseAdapter implements ActionListener {
 
     private PolicyTool tool;
     private ToolWindow tw;
@@ -3245,16 +3581,22 @@
     public void actionPerformed(ActionEvent e) {
 
         // get the Permission selected from the Permission List
-        List list = (List)td.getComponent(ToolDialog.PE_PERM_LIST);
+        JList list = (JList)td.getComponent(ToolDialog.PE_PERM_LIST);
         int permIndex = list.getSelectedIndex();
 
         if (permIndex < 0) {
             tw.displayErrorDialog(td, new Exception
-                (PolicyTool.rb.getString("No.permission.selected")));
+                (PolicyTool.getMessage("No.permission.selected")));
             return;
         }
         td.displayPermissionDialog(editPolicyEntry, true);
     }
+
+    public void mouseClicked(MouseEvent evt) {
+        if (evt.getClickCount() == 2) {
+            actionPerformed(null);
+        }
+    }
 }
 
 /**
@@ -3269,11 +3611,15 @@
     }
 
     public void itemStateChanged(ItemEvent e) {
-
-        Choice prin = (Choice)td.getComponent(ToolDialog.PRD_PRIN_CHOICE);
-        TextField prinField = (TextField)td.getComponent(
+        if (e.getStateChange() == ItemEvent.DESELECTED) {
+            // We're only interested in SELECTED events
+            return;
+        }
+
+        JComboBox prin = (JComboBox)td.getComponent(ToolDialog.PRD_PRIN_CHOICE);
+        JTextField prinField = (JTextField)td.getComponent(
                 ToolDialog.PRD_PRIN_TEXTFIELD);
-        TextField nameField = (TextField)td.getComponent(
+        JTextField nameField = (JTextField)td.getComponent(
                 ToolDialog.PRD_NAME_TEXTFIELD);
 
         prin.getAccessibleContext().setAccessibleName(
@@ -3283,7 +3629,7 @@
             if (prinField.getText() != null &&
                 prinField.getText().length() > 0) {
                 Prin inputPrin = ToolDialog.getPrin(prinField.getText(), true);
-                prin.select(inputPrin.CLASS);
+                prin.setSelectedItem(inputPrin.CLASS);
             }
             return;
         }
@@ -3315,20 +3661,24 @@
     }
 
     public void itemStateChanged(ItemEvent e) {
-
-        Choice perms = (Choice)td.getComponent(
+        if (e.getStateChange() == ItemEvent.DESELECTED) {
+            // We're only interested in SELECTED events
+            return;
+        }
+
+        JComboBox perms = (JComboBox)td.getComponent(
                 ToolDialog.PD_PERM_CHOICE);
-        Choice names = (Choice)td.getComponent(
+        JComboBox names = (JComboBox)td.getComponent(
                 ToolDialog.PD_NAME_CHOICE);
-        Choice actions = (Choice)td.getComponent(
+        JComboBox actions = (JComboBox)td.getComponent(
                 ToolDialog.PD_ACTIONS_CHOICE);
-        TextField nameField = (TextField)td.getComponent(
+        JTextField nameField = (JTextField)td.getComponent(
                 ToolDialog.PD_NAME_TEXTFIELD);
-        TextField actionsField = (TextField)td.getComponent(
+        JTextField actionsField = (JTextField)td.getComponent(
                 ToolDialog.PD_ACTIONS_TEXTFIELD);
-        TextField permField = (TextField)td.getComponent(
+        JTextField permField = (JTextField)td.getComponent(
                 ToolDialog.PD_PERM_TEXTFIELD);
-        TextField signedbyField = (TextField)td.getComponent(
+        JTextField signedbyField = (JTextField)td.getComponent(
                 ToolDialog.PD_SIGNEDBY_TEXTFIELD);
 
         perms.getAccessibleContext().setAccessibleName(
@@ -3342,7 +3692,7 @@
 
                 Perm inputPerm = ToolDialog.getPerm(permField.getText(), true);
                 if (inputPerm != null) {
-                    perms.select(inputPerm.CLASS);
+                    perms.setSelectedItem(inputPerm.CLASS);
                 }
             }
             return;
@@ -3382,15 +3732,19 @@
     }
 
     public void itemStateChanged(ItemEvent e) {
-
-        Choice names = (Choice)td.getComponent(ToolDialog.PD_NAME_CHOICE);
+        if (e.getStateChange() == ItemEvent.DESELECTED) {
+            // We're only interested in SELECTED events
+            return;
+        }
+
+        JComboBox names = (JComboBox)td.getComponent(ToolDialog.PD_NAME_CHOICE);
         names.getAccessibleContext().setAccessibleName(
             PolicyTool.splitToWords((String)e.getItem()));
 
         if (((String)e.getItem()).indexOf(ToolDialog.PERM_NAME) != -1)
             return;
 
-        TextField tf = (TextField)td.getComponent(ToolDialog.PD_NAME_TEXTFIELD);
+        JTextField tf = (JTextField)td.getComponent(ToolDialog.PD_NAME_TEXTFIELD);
         tf.setText((String)e.getItem());
     }
 }
@@ -3407,15 +3761,19 @@
     }
 
     public void itemStateChanged(ItemEvent e) {
-
-        Choice actions = (Choice)td.getComponent(
+        if (e.getStateChange() == ItemEvent.DESELECTED) {
+            // We're only interested in SELECTED events
+            return;
+        }
+
+        JComboBox actions = (JComboBox)td.getComponent(
                 ToolDialog.PD_ACTIONS_CHOICE);
         actions.getAccessibleContext().setAccessibleName((String)e.getItem());
 
         if (((String)e.getItem()).indexOf(ToolDialog.PERM_ACTIONS) != -1)
             return;
 
-        TextField tf = (TextField)td.getComponent(
+        JTextField tf = (JTextField)td.getComponent(
                 ToolDialog.PD_ACTIONS_TEXTFIELD);
         if (tf.getText() == null || tf.getText().equals("")) {
             tf.setText((String)e.getItem());
@@ -3538,7 +3896,7 @@
         us.dispose();
 
         try {
-            String filename = ((TextField)tw.getComponent(
+            String filename = ((JTextField)tw.getComponent(
                     ToolWindow.MW_FILENAME_TEXTFIELD)).getText();
             if (filename == null || filename.equals("")) {
                 us.displaySaveAsDialog(select);
@@ -3551,7 +3909,7 @@
 
                 // display status
                 MessageFormat form = new MessageFormat
-                        (PolicyTool.rb.getString
+                        (PolicyTool.getMessage
                         ("Policy.successfully.written.to.filename"));
                 Object[] source = {filename};
                 tw.displayStatusDialog(null, form.format(source));
@@ -3633,18 +3991,22 @@
 
     public void actionPerformed(ActionEvent e) {
         // remove the entry
-        List list = (List)tw.getComponent(ToolWindow.MW_POLICY_LIST);
+        JList list = (JList)tw.getComponent(ToolWindow.MW_POLICY_LIST);
         int index = list.getSelectedIndex();
         PolicyEntry entries[] = tool.getEntry();
         tool.removeEntry(entries[index]);
 
         // redraw the window listing
-        list = new List(40, false);
-        list.addActionListener(new PolicyListListener(tool, tw));
+        DefaultListModel listModel = new DefaultListModel();
+        list = new JList(listModel);
+        list.setVisibleRowCount(15);
+        list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+        list.addMouseListener(new PolicyListListener(tool, tw));
         entries = tool.getEntry();
         if (entries != null) {
-                for (int i = 0; i < entries.length; i++)
-                    list.add(entries[i].headerToString());
+                for (int i = 0; i < entries.length; i++) {
+                    listModel.addElement(entries[i].headerToString());
+                }
         }
         tw.replacePolicyList(list);
         us.setVisible(false);
@@ -3663,40 +4025,32 @@
 /**
  * This is a java.awt.List that bind an Object to each String it holds.
  */
-class TaggedList extends List {
+class TaggedList extends JList {
     private static final long serialVersionUID = -5676238110427785853L;
 
     private java.util.List<Object> data = new LinkedList<>();
     public TaggedList(int i, boolean b) {
-        super(i, b);
+        super(new DefaultListModel());
+        setVisibleRowCount(i);
+        setSelectionMode(b ? ListSelectionModel.MULTIPLE_INTERVAL_SELECTION : ListSelectionModel.SINGLE_SELECTION);
     }
 
     public Object getObject(int index) {
         return data.get(index);
     }
 
-    @Override @Deprecated public void add(String string) {
-        throw new AssertionError("should not call add in TaggedList");
-    }
     public void addTaggedItem(String string, Object object) {
-        super.add(string);
+        ((DefaultListModel)getModel()).addElement(string);
         data.add(object);
     }
 
-    @Override @Deprecated public void replaceItem(String string, int index) {
-        throw new AssertionError("should not call replaceItem in TaggedList");
-    }
     public void replaceTaggedItem(String string, Object object, int index) {
-        super.replaceItem(string, index);
+        ((DefaultListModel)getModel()).set(index, string);
         data.set(index, object);
     }
 
-    @Override @Deprecated public void remove(int index) {
-        // Cannot throw AssertionError, because replaceItem() call remove() internally
-        super.remove(index);
-    }
     public void removeTaggedItem(int index) {
-        super.remove(index);
+        ((DefaultListModel)getModel()).remove(index);
         data.remove(index);
     }
 }
@@ -3782,11 +4136,11 @@
                 "modifyPrivateCredentials",
                 "refreshCredential",
                 "destroyCredential",
-                "createLoginContext.<" + PolicyTool.rb.getString("name") + ">",
+                "createLoginContext.<" + PolicyTool.getMessage("name") + ">",
                 "getLoginConfiguration",
                 "setLoginConfiguration",
                 "createLoginConfiguration.<" +
-                        PolicyTool.rb.getString("configuration.type") + ">",
+                        PolicyTool.getMessage("configuration.type") + ">",
                 "refreshLoginConfiguration"
                 },
         null);
@@ -3848,11 +4202,11 @@
         super("URLPermission",
                 "java.net.URLPermission",
                 new String[]    {
-                    "<"+ PolicyTool.rb.getString("url") + ">",
+                    "<"+ PolicyTool.getMessage("url") + ">",
                 },
                 new String[]    {
-                    "<" + PolicyTool.rb.getString("method.list") + ">:<"
-                        + PolicyTool.rb.getString("request.headers.list") + ">",
+                    "<" + PolicyTool.getMessage("method.list") + ">:<"
+                        + PolicyTool.getMessage("request.headers.list") + ">",
                 });
     }
 }
@@ -4017,7 +4371,7 @@
                 "setSecurityManager",
                 "createSecurityManager",
                 "getenv.<" +
-                    PolicyTool.rb.getString("environment.variable.name") + ">",
+                    PolicyTool.getMessage("environment.variable.name") + ">",
                 "exitVM",
                 "shutdownHooks",
                 "setFactory",
@@ -4029,11 +4383,11 @@
                 "readFileDescriptor",
                 "writeFileDescriptor",
                 "loadLibrary.<" +
-                    PolicyTool.rb.getString("library.name") + ">",
+                    PolicyTool.getMessage("library.name") + ">",
                 "accessClassInPackage.<" +
-                    PolicyTool.rb.getString("package.name")+">",
+                    PolicyTool.getMessage("package.name")+">",
                 "defineClassInPackage.<" +
-                    PolicyTool.rb.getString("package.name")+">",
+                    PolicyTool.getMessage("package.name")+">",
                 "accessDeclaredMembers",
                 "queuePrintJob",
                 "getStackTrace",
@@ -4056,15 +4410,15 @@
                 "getPolicy",
                 "setPolicy",
                 "createPolicy.<" +
-                    PolicyTool.rb.getString("policy.type") + ">",
+                    PolicyTool.getMessage("policy.type") + ">",
                 "getProperty.<" +
-                    PolicyTool.rb.getString("property.name") + ">",
+                    PolicyTool.getMessage("property.name") + ">",
                 "setProperty.<" +
-                    PolicyTool.rb.getString("property.name") + ">",
+                    PolicyTool.getMessage("property.name") + ">",
                 "insertProvider.<" +
-                    PolicyTool.rb.getString("provider.name") + ">",
+                    PolicyTool.getMessage("provider.name") + ">",
                 "removeProvider.<" +
-                    PolicyTool.rb.getString("provider.name") + ">",
+                    PolicyTool.getMessage("provider.name") + ">",
                 //"setSystemScope",
                 //"setIdentityPublicKey",
                 //"setIdentityInfo",
@@ -4072,11 +4426,11 @@
                 //"removeIdentityCertificate",
                 //"printIdentity",
                 "clearProviderProperties.<" +
-                    PolicyTool.rb.getString("provider.name") + ">",
+                    PolicyTool.getMessage("provider.name") + ">",
                 "putProviderProperty.<" +
-                    PolicyTool.rb.getString("provider.name") + ">",
+                    PolicyTool.getMessage("provider.name") + ">",
                 "removeProviderProperty.<" +
-                    PolicyTool.rb.getString("provider.name") + ">",
+                    PolicyTool.getMessage("provider.name") + ">",
                 //"getSignerPrivateKey",
                 //"setSignerKeyPair"
                 },
--- a/src/share/classes/sun/security/tools/policytool/Resources.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/security/tools/policytool/Resources.java	Wed Oct 30 18:38:20 2013 +0000
@@ -44,16 +44,16 @@
         {"Usage.policytool.options.", "Usage: policytool [options]"},
         {".file.file.policy.file.location",
                 "  [-file <file>]    policy file location"},
-        {"New", "New"},
-        {"Open", "Open"},
-        {"Save", "Save"},
-        {"Save.As", "Save As"},
-        {"View.Warning.Log", "View Warning Log"},
-        {"Exit", "Exit"},
-        {"Add.Policy.Entry", "Add Policy Entry"},
-        {"Edit.Policy.Entry", "Edit Policy Entry"},
-        {"Remove.Policy.Entry", "Remove Policy Entry"},
-        {"Edit", "Edit"},
+        {"New", "&New"},
+        {"Open", "&Open..."},
+        {"Save", "&Save"},
+        {"Save.As", "Save &As..."},
+        {"View.Warning.Log", "View &Warning Log"},
+        {"Exit", "E&xit"},
+        {"Add.Policy.Entry", "&Add Policy Entry"},
+        {"Edit.Policy.Entry", "&Edit Policy Entry"},
+        {"Remove.Policy.Entry", "&Remove Policy Entry"},
+        {"Edit", "&Edit"},
         {"Retain", "Retain"},
 
         {"Warning.File.name.may.include.escaped.backslash.characters.It.is.not.necessary.to.escape.backslash.characters.the.tool.escapes",
@@ -66,8 +66,8 @@
 
         {"Add.Public.Key.Alias", "Add Public Key Alias"},
         {"Remove.Public.Key.Alias", "Remove Public Key Alias"},
-        {"File", "File"},
-        {"KeyStore", "KeyStore"},
+        {"File", "&File"},
+        {"KeyStore", "&KeyStore"},
         {"Policy.File.", "Policy File:"},
         {"Could.not.open.policy.file.policyFile.e.toString.",
                 "Could not open policy file: {0}: {1}"},
@@ -89,20 +89,20 @@
         {"OK.to.overwrite.existing.file.filename.",
                 "OK to overwrite existing file {0}?"},
         {"Cancel", "Cancel"},
-        {"CodeBase.", "CodeBase:"},
-        {"SignedBy.", "SignedBy:"},
-        {"Add.Principal", "Add Principal"},
-        {"Edit.Principal", "Edit Principal"},
-        {"Remove.Principal", "Remove Principal"},
-        {"Principals.", "Principals:"},
-        {".Add.Permission", "  Add Permission"},
-        {".Edit.Permission", "  Edit Permission"},
-        {"Remove.Permission", "Remove Permission"},
+        {"CodeBase.", "&CodeBase:"},
+        {"SignedBy.", "&SignedBy:"},
+        {"Add.Principal", "&Add Principal"},
+        {"Edit.Principal", "&Edit Principal"},
+        {"Remove.Principal", "&Remove Principal"},
+        {"Principals.", "&Principals:"},
+        {".Add.Permission", "  A&dd Permission"},
+        {".Edit.Permission", "  Ed&it Permission"},
+        {"Remove.Permission", "Re&move Permission"},
         {"Done", "Done"},
-        {"KeyStore.URL.", "KeyStore URL:"},
-        {"KeyStore.Type.", "KeyStore Type:"},
-        {"KeyStore.Provider.", "KeyStore Provider:"},
-        {"KeyStore.Password.URL.", "KeyStore Password URL:"},
+        {"KeyStore.URL.", "KeyStore &URL:"},
+        {"KeyStore.Type.", "KeyStore &Type:"},
+        {"KeyStore.Provider.", "KeyStore &Provider:"},
+        {"KeyStore.Password.URL.", "KeyStore Pass&word URL:"},
         {"Principals", "Principals"},
         {".Edit.Principal.", "  Edit Principal:"},
         {".Add.New.Principal.", "  Add New Principal:"},
@@ -122,8 +122,8 @@
                 "Policy successfully written to {0}"},
         {"null.filename", "null filename"},
         {"Save.changes.", "Save changes?"},
-        {"Yes", "Yes"},
-        {"No", "No"},
+        {"Yes", "&Yes"},
+        {"No", "&No"},
         {"Policy.Entry", "Policy Entry"},
         {"Save.Changes", "Save Changes"},
         {"No.Policy.Entry.selected", "No Policy Entry selected"},
--- a/src/share/classes/sun/swing/SwingLazyValue.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/swing/SwingLazyValue.java	Wed Oct 30 18:38:20 2013 +0000
@@ -30,6 +30,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import javax.swing.UIDefaults;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * SwingLazyValue is a copy of ProxyLazyValue that does not snapshot the
@@ -63,7 +64,7 @@
 
     public Object createValue(final UIDefaults table) {
         try {
-            Object cl;
+            ReflectUtil.checkPackageAccess(className);
             Class<?> c = Class.forName(className, true, null);
             if (methodName != null) {
                 Class[] types = getClassArray(args);
--- a/src/share/classes/sun/swing/SwingUtilities2.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/swing/SwingUtilities2.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1361,6 +1361,19 @@
     }
 
     /**
+     * Utility method that throws SecurityException if SecurityManager is set
+     * and modifiers are not public
+     *
+     * @param modifiers a set of modifiers
+     */
+    public static void checkAccess(int modifiers) {
+        if (System.getSecurityManager() != null
+                && !Modifier.isPublic(modifiers)) {
+            throw new SecurityException("Resource is not accessible");
+        }
+    }
+
+    /**
      * Returns true if EventQueue.getCurrentEvent() has the permissions to
      * access the system clipboard and if it is allowed gesture (if
      * checkGesture true)
--- a/src/share/classes/sun/tools/jar/Main.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/tools/jar/Main.java	Wed Oct 30 18:38:20 2013 +0000
@@ -31,6 +31,7 @@
 import java.util.*;
 import java.util.zip.*;
 import java.util.jar.*;
+import java.util.jar.Pack200.*;
 import java.util.jar.Manifest;
 import java.text.MessageFormat;
 import sun.misc.JarIndex;
@@ -72,8 +73,9 @@
      * flag0: no zip compression (store only)
      * Mflag: DO NOT generate a manifest file (just ZIP)
      * iflag: generate jar index
+     * nflag: Perform jar normalization at the end
      */
-    boolean cflag, uflag, xflag, tflag, vflag, flag0, Mflag, iflag;
+    boolean cflag, uflag, xflag, tflag, vflag, flag0, Mflag, iflag, nflag;
 
     static final String MANIFEST_DIR = "META-INF/";
     static final String VERSION = "1.0";
@@ -197,12 +199,56 @@
                         vflag = false;
                     }
                 }
+                File tmpfile = null;
+                final OutputStream finalout = out;
+                final String tmpbase = (fname == null)
+                        ? "tmpjar"
+                        : fname.substring(fname.indexOf(File.separatorChar) + 1);
+                if (nflag) {
+                    tmpfile = createTemporaryFile(tmpbase, ".jar");
+                    out = new FileOutputStream(tmpfile);
+                }
                 expand(null, files, false);
                 create(new BufferedOutputStream(out, 4096), manifest);
                 if (in != null) {
                     in.close();
                 }
                 out.close();
+                if(nflag) {
+                    JarFile jarFile = null;
+                    File packFile = null;
+                    JarOutputStream jos = null;
+                    try {
+                        Packer packer = Pack200.newPacker();
+                        Map<String, String> p = packer.properties();
+                        p.put(Packer.EFFORT, "1"); // Minimal effort to conserve CPU
+                        jarFile = new JarFile(tmpfile.getCanonicalPath());
+                        packFile = createTemporaryFile(tmpbase, ".pack");
+                        out = new FileOutputStream(packFile);
+                        packer.pack(jarFile, out);
+                        jos = new JarOutputStream(finalout);
+                        Unpacker unpacker = Pack200.newUnpacker();
+                        unpacker.unpack(packFile, jos);
+                    } catch (IOException ioe) {
+                        fatalError(ioe);
+                    } finally {
+                        if (jarFile != null) {
+                            jarFile.close();
+                        }
+                        if (out != null) {
+                            out.close();
+                        }
+                        if (jos != null) {
+                            jos.close();
+                        }
+                        if (tmpfile != null && tmpfile.exists()) {
+                            tmpfile.delete();
+                        }
+                        if (packFile != null && packFile.exists()) {
+                            packFile.delete();
+                        }
+                    }
+                }
             } else if (uflag) {
                 File inputFile = null, tmpFile = null;
                 FileInputStream in;
@@ -358,6 +404,9 @@
                     rootjar = args[count++];
                     iflag = true;
                     break;
+                case 'n':
+                    nflag = true;
+                    break;
                 case 'e':
                      ename = args[count++];
                      break;
@@ -1215,4 +1264,34 @@
             e.setCrc(crc.getValue());
         }
     }
+
+    /**
+     * Attempt to create temporary file in the system-provided temporary folder, if failed attempts
+     * to create it in the same folder as the file in parameter (if any)
+     */
+    private File createTemporaryFile(String tmpbase, String suffix) {
+        File tmpfile = null;
+
+        try {
+            tmpfile = File.createTempFile(tmpbase, suffix);
+        } catch (IOException | SecurityException e) {
+            // Unable to create file due to permission violation or security exception
+        }
+        if (tmpfile == null) {
+            // Were unable to create temporary file, fall back to temporary file in the same folder
+            if (fname != null) {
+                try {
+                    File tmpfolder = new File(fname).getAbsoluteFile().getParentFile();
+                    tmpfile = File.createTempFile(fname, ".tmp" + suffix, tmpfolder);
+                } catch (IOException ioe) {
+                    // Last option failed - fall gracefully
+                    fatalError(ioe);
+                }
+            } else {
+                // No options left - we can not compress to stdout without access to the temporary folder
+                fatalError(new IOException(getMsg("error.create.tempfile")));
+            }
+        }
+        return tmpfile;
+    }
 }
--- a/src/share/classes/sun/tools/jar/resources/jar.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/tools/jar/resources/jar.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -44,6 +44,8 @@
         {0} : could not create directory
 error.incorrect.length=\
         incorrect length while processing: {0}
+error.create.tempfile=\
+        Could not create a temporary file
 out.added.manifest=\
         added manifest
 out.update.manifest=\
@@ -66,7 +68,7 @@
         (in = {0}) (out= {1})
 
 usage=\
-Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\
+Usage: jar {ctxui}[vfmn0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\
 Options:\n\
 \ \   -c  create new archive\n\
 \ \   -t  list table of contents for archive\n\
@@ -75,6 +77,7 @@
 \ \   -v  generate verbose output on standard output\n\
 \ \   -f  specify archive file name\n\
 \ \   -m  include manifest information from specified manifest file\n\
+\ \   -n  perform Pack200 normalization after creating a new archive\n\
 \ \   -e  specify application entry point for stand-alone application \n\
 \ \       bundled into an executable jar file\n\
 \ \   -0  store only; use no ZIP compression\n\
--- a/src/share/classes/sun/tools/jar/resources/jar_es.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/tools/jar/resources/jar_es.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -44,4 +44,4 @@
 out.inflated=\ inflado: {0}
 out.size=(entrada = {0}) (salida = {1})
 
-usage=Sintaxis: jar {ctxui}[vfm0Me] [archive-jar] [archive-manifiesto] [punto-entrada] [-C dir] archivos...\nOpciones:\n    -c  crear nuevo archivo\n    -t  crear la tabla de contenido del archivo\n    -x extraer el archive mencionado (o todos) del archivo\n    -u  actualizar archive existente\n    -v  generar salida detallada de los datos de salida est\u00E1ndar\n    -f  especificar nombre de archive de almacenamiento\n    -m  incluir informaci\u00F3n de manifiesto del archive de manifiesto especificado\n    -e  especificar punto de entrada de la aplicaci\u00F3n para la aplicaci\u00F3n aut\u00F3noma \n        que se incluye dentro de un archive jar ejecutable\n    -0  s\u00F3lo almacenar; no utilizar compresi\u00F3n ZIP\n    -M  no crear un archive de manifiesto para las entradas\n    -i  generar informaci\u00F3n de \u00EDndice para los archives jar especificados\n    -C  cambiar al directorio especificado e incluir el archivo siguiente\nSi alg\u00FAn archivo es un directorio, se procesar\u00E1 de forma recurrente.\nEl nombre del archivo de manifiesto, el nombre del archivo de almacenamiento y el nombre del punto de entrada se\nespecifican en el mismo orden que los indicadores 'm', 'f' y 'e'.\n\nEjemplo 1: para archivar archivos de dos clases en un archivo llamado classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nEjemplo 2: utilice un archivo de manifiesto existente 'mymanifest' y archive todos los\n           archivos del directorio foo/ en 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/ .\n
+usage=Sintaxis: jar {ctxui}[vfm0Me] [archive-jar] [archive-manifiesto] [punto-entrada] [-C dir] archivos...\nOpciones:\n    -c  crear nuevo archivo\n    -t  crear la tabla de contenido del archivo\n    -x  extraer el archive mencionado (o todos) del archivo\n    -u  actualizar archive existente\n    -v  generar salida detallada de los datos de salida est\u00E1ndar\n    -f  especificar nombre de archive de almacenamiento\n    -m  incluir informaci\u00F3n de manifiesto del archive de manifiesto especificado\n    -e  especificar punto de entrada de la aplicaci\u00F3n para la aplicaci\u00F3n aut\u00F3noma \n        que se incluye dentro de un archive jar ejecutable\n    -0  s\u00F3lo almacenar; no utilizar compresi\u00F3n ZIP\n    -M  no crear un archive de manifiesto para las entradas\n    -i  generar informaci\u00F3n de \u00EDndice para los archives jar especificados\n    -C  cambiar al directorio especificado e incluir el archivo siguiente\nSi alg\u00FAn archivo es un directorio, se procesar\u00E1 de forma recurrente.\nEl nombre del archivo de manifiesto, el nombre del archivo de almacenamiento y el nombre del punto de entrada se\nespecifican en el mismo orden que los indicadores 'm', 'f' y 'e'.\n\nEjemplo 1: para archivar archivos de dos clases en un archivo llamado classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nEjemplo 2: utilice un archivo de manifiesto existente 'mymanifest' y archive todos los\n           archivos del directorio foo/ en 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jar/resources/jar_it.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/tools/jar/resources/jar_it.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -44,4 +44,4 @@
 out.inflated=\ decompresso: {0}
 out.size=(in = {0}) (out = {1})
 
-usage=Uso: jar {ctxui}[vfm0Me] [file-jar] [file-manifest] [punto di ingresso] [-C dir] file ...\nOpzioni:\n    -c  crea un nuovo archivio\n    -t  visualizza l'indice dell'archivio\n    -x  estrae i file con nome (o tutti i file) dall'archivio\n    -u  aggiorna l'archivio esistente\n    -v  genera output commentato dall'output standard\n    -f  specifica il nome file dell'archivio\n    -m  include informazioni manifest dal file manifest specificato\n    -e  specifica il punto di ingresso per l'applicazione stand-alone \n        inclusa nel file jar eseguibile\n    -0  solo memorizzazione; senza compressione ZIP\n    -M  consente di non creare un file manifest per le voci\n    -i  genera informazioni sull'indice per i file jar specificati\n    -C  imposta la directory specificata e include il file seguente\nSe un file \u00E8 una directory, verr\u00E0 elaborato in modo ricorsivo.\nIl nome del file manifest, del file di archivio e del punto di ingresso devono\nessere specificati nello stesso ordine dei flag 'm', 'f' ed 'e'.\n\nEsempio 1: archiviazione di due file di classe in un archivio con il nome classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nEsempio 2: utilizzo del file manifest esistente 'mymanifest' e archiviazione di tutti i\n           file della directory foo/ in 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/.\n
+usage=Uso: jar {ctxui}[vfm0Me] [file-jar] [file-manifest] [punto di ingresso] [-C dir] file ...\nOpzioni:\n    -c  crea un nuovo archivio\n    -t  visualizza l'indice dell'archivio\n    -x  estrae i file con nome (o tutti i file) dall'archivio\n    -u  aggiorna l'archivio esistente\n    -v  genera output commentato dall'output standard\n    -f  specifica il nome file dell'archivio\n    -m  include informazioni manifest dal file manifest specificato\n    -e  specifica il punto di ingresso per l'applicazione stand-alone \n        inclusa nel file jar eseguibile\n    -0  solo memorizzazione; senza compressione ZIP\n    -M  consente di non creare un file manifest per le voci\n    -i  genera informazioni sull'indice per i file jar specificati\n    -C  imposta la directory specificata e include il file seguente\nSe un file \u00E8 una directory, verr\u00E0 elaborato in modo ricorsivo.\nIl nome del file manifest, del file di archivio e del punto di ingresso devono\nessere specificati nello stesso ordine dei flag 'm', 'f' ed 'e'.\n\nEsempio 1: archiviazione di due file di classe in un archivio con il nome classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nEsempio 2: utilizzo del file manifest esistente 'mymanifest' e archiviazione di tutti i\n           file della directory foo/ in 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jar/resources/jar_ja.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/tools/jar/resources/jar_ja.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -44,4 +44,4 @@
 out.inflated=\ {0}\u304C\u5C55\u958B\u3055\u308C\u307E\u3057\u305F
 out.size=(\u5165={0})(\u51FA={1})
 
-usage=\u4F7F\u7528\u65B9\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n   -c \u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u65B0\u898F\u4F5C\u6210\u3059\u308B\n   -t \u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u4E00\u89A7\u8868\u793A\u3059\u308B\n   -x \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3059\u308B\n   -u \u65E2\u5B58\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3059\u308B\n   -v \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3059\u308B\n   -f \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u6307\u5B9A\u3059\u308B\n   -m \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\u53D6\u308A\u8FBC\u3080\n   -e \u5B9F\u884C\u53EF\u80FDjar\u30D5\u30A1\u30A4\u30EB\u306B\u30D0\u30F3\u30C9\u30EB\u3055\u308C\u305F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n      \u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u3092\u6307\u5B9A\u3059\u308B\n   -0 \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u306A\u3044\n   -M \u30A8\u30F3\u30C8\u30EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u306A\u3044\n   -i \u6307\u5B9A\u306Ejar\u30D5\u30A1\u30A4\u30EB\u306E\u7D22\u5F15\u60C5\u5831\u3092\u751F\u6210\u3059\u308B\n   -C \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u4EE5\u4E0B\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u53D6\u308A\u8FBC\u3080\n\u30D5\u30A1\u30A4\u30EB\u304C\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u5834\u5408\u306F\u518D\u5E30\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002\n\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u304A\u3088\u3073\u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u540D\u306F\u3001\n\u30D5\u30E9\u30B0'm'\u3001'f'\u3001'e'\u306E\u6307\u5B9A\u3068\u540C\u3058\u9806\u756A\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\n\u4F8B1: 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6classes.jar\u306B\u4FDD\u5B58\u3059\u308B:\n     jar cvf classes.jar Foo.class Bar.class\n\u4F8B2: \u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB'mymanifest'\u3092\u4F7F\u7528\u3057\u3001foo/\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\n    \u5168\u30D5\u30A1\u30A4\u30EB\u3092'classes.jar'\u306B\u30A2\u30FC\u30AB\u30A4\u30D6\u3059\u308B:\n     jar cvfm classes.jar mymanifest -C foo/ \n
+usage=\u4F7F\u7528\u65B9\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n   -c \u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u65B0\u898F\u4F5C\u6210\u3059\u308B\n   -t \u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u4E00\u89A7\u8868\u793A\u3059\u308B\n   -x \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3059\u308B\n   -u \u65E2\u5B58\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3059\u308B\n   -v \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3059\u308B\n   -f \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u6307\u5B9A\u3059\u308B\n   -m \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\u53D6\u308A\u8FBC\u3080\n   -e \u5B9F\u884C\u53EF\u80FDjar\u30D5\u30A1\u30A4\u30EB\u306B\u30D0\u30F3\u30C9\u30EB\u3055\u308C\u305F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n      \u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u3092\u6307\u5B9A\u3059\u308B\n   -0 \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u306A\u3044\n   -M \u30A8\u30F3\u30C8\u30EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u306A\u3044\n   -i \u6307\u5B9A\u306Ejar\u30D5\u30A1\u30A4\u30EB\u306E\u7D22\u5F15\u60C5\u5831\u3092\u751F\u6210\u3059\u308B\n   -C \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u4EE5\u4E0B\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u53D6\u308A\u8FBC\u3080\n\u30D5\u30A1\u30A4\u30EB\u304C\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u5834\u5408\u306F\u518D\u5E30\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002\n\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u304A\u3088\u3073\u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u540D\u306F\u3001\n\u30D5\u30E9\u30B0'm'\u3001'f'\u3001'e'\u306E\u6307\u5B9A\u3068\u540C\u3058\u9806\u756A\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\n\u4F8B1: 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6classes.jar\u306B\u4FDD\u5B58\u3059\u308B:\n     jar cvf classes.jar Foo.class Bar.class\n\u4F8B2: \u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB'mymanifest'\u3092\u4F7F\u7528\u3057\u3001foo/\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\n     \u5168\u30D5\u30A1\u30A4\u30EB\u3092'classes.jar'\u306B\u30A2\u30FC\u30AB\u30A4\u30D6\u3059\u308B:\n     jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jar/resources/jar_sv.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/tools/jar/resources/jar_sv.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -44,4 +44,4 @@
 out.inflated=\ uppackat: {0}
 out.size=(in = {0}) (ut = {1})
 
-usage=Syntax: jar {ctxui}[vfm0Me] [jar fil] [manifestfil] [startpunkt] [-C-katalog] ...\nAlternativ:\n    -c  skapa nytt arkiv\n    -t  lista inneh\u00E5llsf\u00F6rteckning f\u00F6r arkiv\n    -x  extrahera namngivna (eller alla) filer fr\u00E5n arkiv\n    -u  uppdatera befintligt arkiv\n    -v  generera utf\u00F6rliga utdata vid standardutmatning\n    -f  ange arkivfilens namn\n    -m  inkludera manifestinformation fr\u00E5n angivet manifest\n    -e  ange programstartpunkt f\u00F6r frist\u00E5ende applikation \n        som medf\u00F6ljer i en jar-programfil\n    -0  endast lagra  (ingen zip-komprimering)\n    -M  skapa inte n\u00E5gon manifestfil f\u00F6r posterna\n    -i  generera indexinformation f\u00F6r de angivna jar-filerna\n    -C  \u00E4ndra till den angivna katalogen och inkludera f\u00F6ljande fil\nOm en fil \u00E4r en katalog bearbetas den rekursivt.\nNamnen p\u00E5 manifestfilen, arkivfilen och startpunkten anges i samma\nordning som m-, f- och e-flaggorna.\n\nExempel 1: S\u00E5 h\u00E4r arkiverar du tv\u00E5 klassfiler i ett arkiv med namnet classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nExempel 2: Anv\u00E4nd en befintlig manifestfil (mymanifest) och arkivera alla\n           filer fr\u00E5n katalogen foo/ i classes.jar: \n       jar cvfm classes.jar mymanifest -C foo/ .\n
+usage=Syntax: jar {ctxui}[vfm0Me] [jar-fil] [manifestfil] [startpunkt] [-C katalog] filer...\nAlternativ:\n    -c  skapa nytt arkiv\n    -t  lista inneh\u00E5llsf\u00F6rteckning f\u00F6r arkiv\n    -x  extrahera namngivna (eller alla) filer fr\u00E5n arkiv\n    -u  uppdatera befintligt arkiv\n    -v  generera utf\u00F6rliga utdata vid standardutmatning\n    -f  ange arkivfilens namn\n    -m  inkludera manifestinformation fr\u00E5n angivet manifest\n    -e  ange programstartpunkt f\u00F6r frist\u00E5ende applikation \n        som medf\u00F6ljer i en jar-programfil\n    -0  endast lagra  (ingen zip-komprimering)\n    -M  skapa inte n\u00E5gon manifestfil f\u00F6r posterna\n    -i  generera indexinformation f\u00F6r de angivna jar-filerna\n    -C  \u00E4ndra till den angivna katalogen och inkludera f\u00F6ljande fil\nOm en fil \u00E4r en katalog bearbetas den rekursivt.\nNamnen p\u00E5 manifestfilen, arkivfilen och startpunkten anges i samma\nordning som m-, f- och e-flaggorna.\n\nExempel 1: S\u00E5 h\u00E4r arkiverar du tv\u00E5 klassfiler i ett arkiv med namnet classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nExempel 2: Anv\u00E4nd en befintlig manifestfil (mymanifest) och arkivera alla\n           filer fr\u00E5n katalogen foo/ i classes.jar: \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jar/resources/jar_zh_CN.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/tools/jar/resources/jar_zh_CN.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -44,4 +44,4 @@
 out.inflated=\  \u5DF2\u89E3\u538B: {0}
 out.size=(\u8F93\u5165 = {0}) (\u8F93\u51FA = {1})
 
-usage=\u7528\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u9009\u9879\u5305\u62EC: \n    -c  \u521B\u5EFA\u65B0\u7684\u5F52\u6863\u6587\u4EF6\n    -t  \u5217\u51FA\u5F52\u6863\u76EE\u5F55\n    -x  \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u6240\u6709) \u6587\u4EF6\n    -u  \u66F4\u65B0\u73B0\u6709\u7684\u5F52\u6863\u6587\u4EF6\n    -v  \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA\n    -f  \u6307\u5B9A\u5F52\u6863\u6587\u4EF6\u540D\n    -m  \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\u6E05\u5355\u4FE1\u606F\n    -e  \u4E3A\u6346\u7ED1\u5230\u53EF\u6267\u884C jar \u6587\u4EF6\u7684\u72EC\u7ACB\u5E94\u7528\u7A0B\u5E8F\n        \u6307\u5B9A\u5E94\u7528\u7A0B\u5E8F\u5165\u53E3\u70B9\n    -0  \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528\u60C5\u51B5\u4EFB\u4F55 ZIP \u538B\u7F29\n    -M  \u4E0D\u521B\u5EFA\u6761\u76EE\u7684\u6E05\u5355\u6587\u4EF6\n    -i  \u4E3A\u6307\u5B9A\u7684 jar \u6587\u4EF6\u751F\u6210\u7D22\u5F15\u4FE1\u606F\n    -C  \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\u5176\u4E2D\u7684\u6587\u4EF6\n\u5982\u679C\u6709\u4EFB\u4F55\u76EE\u5F55\u6587\u4EF6, \u5219\u5BF9\u5176\u8FDB\u884C\u9012\u5F52\u5904\u7406\u3002\n\u6E05\u5355\u6587\u4EF6\u540D, \u5F52\u6863\u6587\u4EF6\u540D\u548C\u5165\u53E3\u70B9\u540D\u79F0\u7684\u6307\u5B9A\u987A\u5E8F\n\u4E0E 'm', 'f' \u548C 'e' \u6807\u8BB0\u7684\u6307\u5B9A\u987A\u5E8F\u76F8\u540C\u3002\n\n\u793A\u4F8B 1: \u5C06\u4E24\u4E2A\u7C7B\u6587\u4EF6\u5F52\u6863\u5230\u4E00\u4E2A\u540D\u4E3A classes.jar \u7684\u5F52\u6863\u6587\u4EF6\u4E2D: \n       jar cvf classes.jar Foo.class Bar.class \n\u793A\u4F8B 2: \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u6587\u4EF6 'mymanifest' \u5E76\n           \u5C06 foo/ \u76EE\u5F55\u4E2D\u7684\u6240\u6709\u6587\u4EF6\u5F52\u6863\u5230 'classes.jar' \u4E2D: \n       jar cvfm classes.jar mymanifest -C foo/\u3002\n
+usage=\u7528\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u9009\u9879\u5305\u62EC: \n    -c  \u521B\u5EFA\u65B0\u7684\u5F52\u6863\u6587\u4EF6\n    -t  \u5217\u51FA\u5F52\u6863\u76EE\u5F55\n    -x  \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u6240\u6709) \u6587\u4EF6\n    -u  \u66F4\u65B0\u73B0\u6709\u7684\u5F52\u6863\u6587\u4EF6\n    -v  \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA\n    -f  \u6307\u5B9A\u5F52\u6863\u6587\u4EF6\u540D\n    -m  \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\u6E05\u5355\u4FE1\u606F\n    -e  \u4E3A\u6346\u7ED1\u5230\u53EF\u6267\u884C jar \u6587\u4EF6\u7684\u72EC\u7ACB\u5E94\u7528\u7A0B\u5E8F\n        \u6307\u5B9A\u5E94\u7528\u7A0B\u5E8F\u5165\u53E3\u70B9\n    -0  \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528\u60C5\u51B5\u4EFB\u4F55 ZIP \u538B\u7F29\n    -M  \u4E0D\u521B\u5EFA\u6761\u76EE\u7684\u6E05\u5355\u6587\u4EF6\n    -i  \u4E3A\u6307\u5B9A\u7684 jar \u6587\u4EF6\u751F\u6210\u7D22\u5F15\u4FE1\u606F\n    -C  \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\u5176\u4E2D\u7684\u6587\u4EF6\n\u5982\u679C\u6709\u4EFB\u4F55\u76EE\u5F55\u6587\u4EF6, \u5219\u5BF9\u5176\u8FDB\u884C\u9012\u5F52\u5904\u7406\u3002\n\u6E05\u5355\u6587\u4EF6\u540D, \u5F52\u6863\u6587\u4EF6\u540D\u548C\u5165\u53E3\u70B9\u540D\u79F0\u7684\u6307\u5B9A\u987A\u5E8F\n\u4E0E 'm', 'f' \u548C 'e' \u6807\u8BB0\u7684\u6307\u5B9A\u987A\u5E8F\u76F8\u540C\u3002\n\n\u793A\u4F8B 1: \u5C06\u4E24\u4E2A\u7C7B\u6587\u4EF6\u5F52\u6863\u5230\u4E00\u4E2A\u540D\u4E3A classes.jar \u7684\u5F52\u6863\u6587\u4EF6\u4E2D: \n       jar cvf classes.jar Foo.class Bar.class \n\u793A\u4F8B 2: \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u6587\u4EF6 'mymanifest' \u5E76\n           \u5C06 foo/ \u76EE\u5F55\u4E2D\u7684\u6240\u6709\u6587\u4EF6\u5F52\u6863\u5230 'classes.jar' \u4E2D: \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/tree/Node.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/tools/tree/Node.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2011, 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
@@ -108,7 +108,7 @@
             return super.clone();
         } catch (CloneNotSupportedException e) {
             // this shouldn't happen, since we are Cloneable
-            throw new InternalError(e);
+            throw (InternalError) new InternalError().initCause(e);
         }
     }
 
--- a/src/share/classes/sun/util/calendar/ZoneInfoFile.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/calendar/ZoneInfoFile.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,6 +26,7 @@
 package sun.util.calendar;
 
 import java.io.ByteArrayInputStream;
+import java.io.BufferedInputStream;
 import java.io.DataInput;
 import java.io.DataInputStream;
 import java.io.File;
@@ -65,8 +66,17 @@
      * @return a set of time zone IDs.
      */
     public static String[] getZoneIds() {
-        String[] ids = Arrays.copyOf(regions, regions.length + oldMappings.length);
+        int len = regions.length + oldMappings.length;
+        if (!USE_OLDMAPPING) {
+            len += 3;    // EST/HST/MST not in tzdb.dat
+        }
+        String[] ids = Arrays.copyOf(regions, len);
         int i = regions.length;
+        if (!USE_OLDMAPPING) {
+            ids[i++] = "EST";
+            ids[i++] = "HST";
+            ids[i++] = "MST";
+        }
         for (int j = 0; j < oldMappings.length; j++) {
             ids[i++] = oldMappings[j][0];
         }
@@ -243,7 +253,8 @@
                 try {
                     String libDir = System.getProperty("java.home") + File.separator + "lib";
                     try (DataInputStream dis = new DataInputStream(
-                             new FileInputStream(new File(libDir, "tzdb.dat")))) {
+                             new BufferedInputStream(new FileInputStream(
+                                 new File(libDir, "tzdb.dat"))))) {
                         load(dis);
                     }
                 } catch (Exception x) {
@@ -262,9 +273,17 @@
             aliases.put("EST", "America/New_York");
             aliases.put("MST", "America/Denver");
             aliases.put("HST", "Pacific/Honolulu");
+        } else {
+            zones.put("EST", new ZoneInfo("EST", -18000000));
+            zones.put("MST", new ZoneInfo("MST", -25200000));
+            zones.put("HST", new ZoneInfo("HST", -36000000));
         }
     }
 
+    public static boolean useOldMapping() {
+       return USE_OLDMAPPING;
+    }
+
     /**
      * Loads the rules from a DateInputStream
      *
--- a/src/share/classes/sun/util/locale/LocaleEquivalentMaps.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/locale/LocaleEquivalentMaps.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -43,7 +43,9 @@
         regionVariantEquivMap = new HashMap<>();
 
         // This is an auto-generated file and should not be manually edited.
-        //   LSR Revision: 2012-09-04
+        //   LSR Revision: 2013-09-23
+        singleEquivMap.put("acn", "xia");
+        singleEquivMap.put("adx", "pcr");
         singleEquivMap.put("ami", "i-ami");
         singleEquivMap.put("art-lojban", "jbo");
         singleEquivMap.put("ase", "sgn-us");
@@ -52,6 +54,7 @@
         singleEquivMap.put("bjd", "drl");
         singleEquivMap.put("bnn", "i-bnn");
         singleEquivMap.put("bzs", "sgn-br");
+        singleEquivMap.put("cir", "meg");
         singleEquivMap.put("cjr", "mom");
         singleEquivMap.put("cka", "cmr");
         singleEquivMap.put("cmk", "xch");
@@ -65,6 +68,7 @@
         singleEquivMap.put("dse", "sgn-nl");
         singleEquivMap.put("dsl", "sgn-dk");
         singleEquivMap.put("fsl", "sgn-fr");
+        singleEquivMap.put("gal", "ilw");
         singleEquivMap.put("gan", "zh-gan");
         singleEquivMap.put("gav", "dev");
         singleEquivMap.put("gsg", "sgn-de");
@@ -84,6 +88,7 @@
         singleEquivMap.put("i-tsu", "tsu");
         singleEquivMap.put("ibi", "opa");
         singleEquivMap.put("id", "in");
+        singleEquivMap.put("ilw", "gal");
         singleEquivMap.put("in", "id");
         singleEquivMap.put("ise", "sgn-it");
         singleEquivMap.put("isg", "sgn-ie");
@@ -100,6 +105,7 @@
         singleEquivMap.put("lb", "i-lux");
         singleEquivMap.put("lcq", "ppr");
         singleEquivMap.put("lrr", "yma");
+        singleEquivMap.put("meg", "cir");
         singleEquivMap.put("mfs", "sgn-mx");
         singleEquivMap.put("mo", "ro");
         singleEquivMap.put("mom", "cjr");
@@ -113,6 +119,7 @@
         singleEquivMap.put("nun", "ayx");
         singleEquivMap.put("nv", "i-navajo");
         singleEquivMap.put("opa", "ibi");
+        singleEquivMap.put("pcr", "adx");
         singleEquivMap.put("ppr", "lcq");
         singleEquivMap.put("psr", "sgn-pt");
         singleEquivMap.put("pwn", "i-pwn");
@@ -158,8 +165,10 @@
         singleEquivMap.put("weo", "tlw");
         singleEquivMap.put("wuu", "zh-wuu");
         singleEquivMap.put("xch", "cmk");
+        singleEquivMap.put("xia", "acn");
         singleEquivMap.put("yi", "ji");
         singleEquivMap.put("yma", "lrr");
+        singleEquivMap.put("yos", "zom");
         singleEquivMap.put("yue", "zh-yue");
         singleEquivMap.put("zh-cmn-hans", "cmn-hans");
         singleEquivMap.put("zh-cmn-hant", "cmn-hant");
@@ -168,6 +177,7 @@
         singleEquivMap.put("zh-wuu", "wuu");
         singleEquivMap.put("zh-xiang", "hsn");
         singleEquivMap.put("zh-yue", "yue");
+        singleEquivMap.put("zom", "yos");
 
         multiEquivsMap.put("ccq", new String[] {"rki", "ybd"});
         multiEquivsMap.put("cmn", new String[] {"zh-guoyu", "zh-cmn"});
--- a/src/share/classes/sun/util/logging/PlatformLogger.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/logging/PlatformLogger.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -85,22 +85,18 @@
  * @since 1.7
  */
 public class PlatformLogger {
-    /*
-     * These constants should be shortcuts to Level enum constants that
-     * the clients of sun.util.logging.PlatformLogger require no source
-     * modification and avoid the conversion from int to Level enum.
-     *
-     * This can be done when JavaFX is converted to use the new PlatformLogger.Level API.
-     */
-    public static final int OFF     = Integer.MAX_VALUE;
-    public static final int SEVERE  = 1000;
-    public static final int WARNING = 900;
-    public static final int INFO    = 800;
-    public static final int CONFIG  = 700;
-    public static final int FINE    = 500;
-    public static final int FINER   = 400;
-    public static final int FINEST  = 300;
-    public static final int ALL     = Integer.MIN_VALUE;
+
+    // The integer values must match that of {@code java.util.logging.Level}
+    // objects.
+    private static final int OFF     = Integer.MAX_VALUE;
+    private static final int SEVERE  = 1000;
+    private static final int WARNING = 900;
+    private static final int INFO    = 800;
+    private static final int CONFIG  = 700;
+    private static final int FINE    = 500;
+    private static final int FINER   = 400;
+    private static final int FINEST  = 300;
+    private static final int ALL     = Integer.MIN_VALUE;
 
     /**
      * PlatformLogger logging levels.
@@ -127,14 +123,14 @@
         /* java.util.logging.Level */ Object javaLevel;
 
         // ascending order for binary search matching the list of enum constants
-        private static final int[] levelValues = new int[] {
+        private static final int[] LEVEL_VALUES = new int[] {
             PlatformLogger.ALL, PlatformLogger.FINEST, PlatformLogger.FINER,
             PlatformLogger.FINE, PlatformLogger.CONFIG, PlatformLogger.INFO,
             PlatformLogger.WARNING, PlatformLogger.SEVERE, PlatformLogger.OFF
         };
 
         public int intValue() {
-            return levelValues[this.ordinal()];
+            return LEVEL_VALUES[this.ordinal()];
         }
 
         static Level valueOf(int level) {
@@ -153,7 +149,7 @@
             }
             // return the nearest Level value >= the given level,
             // for level > SEVERE, return SEVERE and exclude OFF
-            int i = Arrays.binarySearch(levelValues, 0, levelValues.length-2, level);
+            int i = Arrays.binarySearch(LEVEL_VALUES, 0, LEVEL_VALUES.length-2, level);
             return values()[i >= 0 ? i : (-i-1)];
         }
     }
@@ -264,39 +260,6 @@
     /**
      * Returns true if a message of the given level would actually
      * be logged by this logger.
-     *
-     * @deprecated Use isLoggable(Level) instead.
-     */
-    @Deprecated
-    public boolean isLoggable(int levelValue) {
-        return isLoggable(Level.valueOf(levelValue));
-    }
-
-    /**
-     * Gets the current log level. Returns 0 if the current effective level is
-     * not set (equivalent to Logger.getLevel() returns null).
-     *
-     * @deprecated Use level() instead
-     */
-    @Deprecated
-    public int getLevel() {
-        Level level = loggerProxy.getLevel();
-        return level != null ? level.intValue() : 0;
-    }
-
-    /**
-     * Sets the log level.
-     *
-     * @deprecated Use setLevel(Level) instead
-     */
-    @Deprecated
-    public void setLevel(int newLevel) {
-        loggerProxy.setLevel(newLevel == 0 ? null : Level.valueOf(newLevel));
-    }
-
-    /**
-     * Returns true if a message of the given level would actually
-     * be logged by this logger.
      */
     public boolean isLoggable(Level level) {
         if (level == null) {
--- a/src/share/classes/sun/util/resources/TimeZoneNames.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/TimeZoneNames.java	Wed Oct 30 18:38:20 2013 +0000
@@ -44,9 +44,6 @@
 
     protected final Object[][] getContents() {
         // Note: generic names came from CLDR with some adjustments.
-        String ACT[] = new String[] {"Acre Time", "ACT",
-                                     "Acre Summer Time", "ACST",
-                                     "Acre Time", "ACT"};
         String ADELAIDE[] = new String[] {"Central Standard Time (South Australia)", "CST",
                                           "Central Summer Time (South Australia)", "CST",
                                           "Central Time (South Australia)", "CT"};
@@ -95,9 +92,9 @@
         String CHUT[] = new String[] {"Chuuk Time", "CHUT",
                                       "Chuuk Summer Time", "CHUST",
                                       "Chuuk Time", "CHUT"};
-        String CIT[] = new String[] {"Central Indonesia Time", "CIT",
+        String CIT[] = new String[] {"Central Indonesia Time", "WITA",
                                      "Central Indonesia Summer Time", "CIST",
-                                     "Central Indonesia Time", "CIT"};
+                                     "Central Indonesia Time", "WITA"};
         String CLT[] = new String[] {"Chile Time", "CLT",
                                      "Chile Summer Time", "CLST",
                                      "Chile Time", "CLT"};
@@ -251,9 +248,9 @@
         String WET[] = new String[] {"Western European Time", "WET",
                                      "Western European Summer Time", "WEST",
                                      "Western European Time", "WET"};
-        String WIT[] = new String[] {"West Indonesia Time", "WIT",
+        String WIT[] = new String[] {"West Indonesia Time", "WIB",
                                      "West Indonesia Summer Time", "WIST",
-                                     "West Indonesia Time", "WIT"};
+                                     "West Indonesia Time", "WIB"};
         String WST_AUS[] = new String[] {"Western Standard Time (Australia)", "WST",
                                          "Western Summer Time (Australia)", "WST",
                                          "Western Time (Australia)", "WT"};
@@ -382,7 +379,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -578,7 +575,7 @@
             {"Asia/Almaty", new String[] {"Alma-Ata Time", "ALMT",
                                           "Alma-Ata Summer Time", "ALMST",
                                           "Alma-Ata Time", "ALMT"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"Anadyr Time", "ANAT",
                                           "Anadyr Summer Time", "ANAST",
                                           "Anadyr Time", "ANAT"}},
@@ -633,9 +630,9 @@
                                            "Irkutsk Time", "IRKT"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"East Indonesia Time", "EIT",
+            {"Asia/Jayapura", new String[] {"East Indonesia Time", "WIT",
                                             "East Indonesia Summer Time", "EIST",
-                                            "East Indonesia Time", "EIT"}},
+                                            "East Indonesia Time", "WIT"}},
             {"Asia/Kabul", new String[] {"Afghanistan Time", "AFT",
                                          "Afghanistan Summer Time", "AFST",
                                          "Afghanistan Time", "AFT"}},
@@ -806,6 +803,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_de extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"Acre Normalzeit", "ACT",
-                                     "Acre Sommerzeit", "ACST"};
-        String ADELAIDE[] = new String[] {"Zentrale Normalzeit (S\u00fcdaustralien)", "CST",
-                                          "Zentrale Sommerzeit (S\u00fcdaustralien)", "CST"};
+        String ADELAIDE[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien)", "CST",
+                                          "Zentrale Sommerzeit (S\u00FCdaustralien)", "CST"};
         String AGT[] = new String[] {"Argentinische Zeit", "ART",
                                      "Argentinische Sommerzeit", "ARST"};
         String AKST[] = new String[] {"Alaska Normalzeit", "AKST",
@@ -63,10 +61,10 @@
                                      "Atlantik Sommerzeit", "ADT"};
         String BDT[] = new String[] {"Bangladesch Zeit", "BDT",
                                      "Bangladesch Sommerzeit", "BDST"};
-        String BRISBANE[] = new String[] {"\u00d6stliche Normalzeit (Queensland)", "EST",
-                                          "\u00d6stliche Sommerzeit (Queensland)", "EST"};
-        String BROKEN_HILL[] = new String[] {"Zentrale Normalzeit (S\u00fcdaustralien/New South Wales)", "CST",
-                                             "Zentrale Sommerzeit (S\u00fcdaustralien/New South Wales)", "CST"};
+        String BRISBANE[] = new String[] {"\u00D6stliche Normalzeit (Queensland)", "EST",
+                                          "\u00D6stliche Sommerzeit (Queensland)", "EST"};
+        String BROKEN_HILL[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien/New South Wales)", "CST",
+                                             "Zentrale Sommerzeit (S\u00FCdaustralien/New South Wales)", "CST"};
         String BRT[] = new String[] {"Brasilianische Zeit", "BRT",
                                      "Brasilianische Sommerzeit", "BRST"};
         String BTT[] = new String[] {"Bhutanische Zeit", "BTT",
@@ -77,9 +75,9 @@
                                      "Mitteleurop\u00e4ische Sommerzeit", "MESZ"};
         String CHAST[] = new String[] {"Chatham Normalzeit", "CHAST",
                                        "Chatham Sommerzeit", "CHADT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"Zentralindonesische Zeit", "CIT",
+        String CHUT[] = new String[] {"Chuuk Zeit", "CHUT",
+                                      "Chuuk Sommerzeit", "CHUST"};
+        String CIT[] = new String[] {"Zentralindonesische Zeit", "WITA",
                                      "Zentralindonesische Sommerzeit", "CIST"};
         String CLT[] = new String[] {"Chilenische Zeit", "CLT",
                                      "Chilenische Sommerzeit", "CLST"};
@@ -89,7 +87,7 @@
                                      "Chinesische Sommerzeit", "CDT"};
         String CUBA[] = new String[] {"Kubanische Normalzeit", "CST",
                                       "Kubanische Sommerzeit", "CDT"};
-        String DARWIN[] = new String[] {"Zentrale Normalzeit (Northern Territory)", "CST",
+        String DARWIN[] = new String[] {"Central Normalzeit (Northern Territory)", "CST",
                                         "Zentrale Sommerzeit (Northern Territory)", "CST"};
         String DUBLIN[] = new String[] {"Greenwich Zeit", "GMT",
                                         "Irische Sommerzeit", "IST"};
@@ -103,10 +101,10 @@
                                      "Ostgr\u00f6nl\u00e4ndische Sommerzeit", "EGST"};
         String EST[] = new String[] {"\u00d6stliche Normalzeit", "EST",
                                      "\u00d6stliche Sommerzeit", "EDT"};
-        String EST_NSW[] = new String[] {"\u00d6stliche Normalzeit (New South Wales)", "EST",
-                                         "\u00d6stliche Sommerzeit (New South Wales)", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String EST_NSW[] = new String[] {"Eastern Normalzeit (Neus\u00FCdwales)", "EST",
+                                         "\u00D6stliche Sommerzeit (New South Wales)", "EST"};
+        String FET[] = new String[] {"Kaliningrader Zeit", "FET",
+                                     "Kaliningrader Sommerzeit", "FEST"};
         String GHMT[] = new String[] {"Ghanaische Normalzeit", "GMT",
                                       "Ghanaische Sommerzeit", "GHST"};
         String GAMBIER[] =  new String[] {"Gambier Zeit", "GAMT",
@@ -159,8 +157,8 @@
                                           "Pitcairn Sommerzeit", "PDT"};
         String PKT[] = new String[] {"Pakistanische Zeit", "PKT",
                                      "Pakistanische Sommerzeit", "PKST"};
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"Pohnpei Zeit", "PONT",
+                                      "Pohnpei Sommerzeit", "PONST"};
         String PST[] = new String[] {"Pazifische Normalzeit", "PST",
                                      "Pazifische Sommerzeit", "PDT"};
         String SAST[] = new String[] {"S\u00fcdafrikanische Normalzeit", "SAST",
@@ -171,8 +169,8 @@
                                      "Singapur Sommerzeit", "SGST"};
         String SLST[] = new String[] {"Greenwich Normalzeit", "GMT",
                                       "Sierra Leone Sommerzeit", "SLST"};
-        String TASMANIA[] = new String[] {"\u00d6stliche Normalzeit (Tasmanien)", "EST",
-                                          "\u00d6stliche Sommerzeit (Tasmanien)", "EST"};
+        String TASMANIA[] = new String[] {"\u00D6stliche Normalzeit (Tasmanien)", "EST",
+                                          "\u00D6stliche Sommerzeit (Tasmanien)", "EST"};
         String TMT[] = new String[] {"Turkmenische Zeit", "TMT",
                                      "Turkmenische Sommerzeit", "TMST"};
         String ULAT[]= new String[] {"Ulaanbaatar Zeit", "ULAT",
@@ -183,7 +181,7 @@
                                      "Westafrikanische Sommerzeit", "WAST"};
         String WET[] = new String[] {"Westeurop\u00e4ische Zeit", "WEZ",
                                      "Westeurop\u00e4ische Sommerzeit", "WESZ"};
-        String WIT[] = new String[] {"Westindonesische Zeit", "WIT",
+        String WIT[] = new String[] {"Westindonesische Zeit", "WIB",
                                      "Westindonesische Sommerzeit", "WIST"};
         String WST_AUS[] = new String[] {"Westliche Normalzeit (Australien)", "WST",
                                          "Westliche Sommerzeit (Australien)", "WST"};
@@ -193,8 +191,8 @@
                                            "West Samoa Sommerzeit", "WSDT"};
         String ChST[] = new String[] {"Chamorro Normalzeit", "ChST",
                       "Chamorro Sommerzeit", "ChDT"};
-        String VICTORIA[] = new String[] {"\u00d6stliche Normalzeit (Victoria)", "EST",
-                                          "\u00d6stliche Sommerzeit (Victoria)", "EST"};
+        String VICTORIA[] = new String[] {"\u00D6stliche Normalzeit (Victoria)", "EST",
+                                          "\u00D6stliche Sommerzeit (Victoria)", "EST"};
         String UTC[] = new String[] {"Koordinierte Universalzeit", "UTC",
                                      "Koordinierte Universalzeit", "UTC"};
         String UZT[] = new String[] {"Usbekistan Zeit", "UZT",
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"Metlakatla Normalzeit", "MeST",
+                                                 "Metlakatla Sommerzeit", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Pierre & Miquelon Normalzeit", "PMST",
                                                "Pierre & Miquelon Sommerzeit", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "Davis Sommerzeit", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville Zeit", "DDUT",
                                                         "Dumont-d'Urville Sommerzeit", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"Macquarieinsel Zeit", "MIST",
+                                                   "Macquarieinsel Sommerzeit", "MIST"}},
             {"Antarctica/Mawson", new String[] {"Mawson Zeit", "MAWT",
                                                 "Mawson Sommerzeit", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"Alma Ata Zeit", "ALMT",
                                           "Alma-Ata Sommerzeit", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"Anadyr Zeit", "ANAT",
                                           "Anadyr Sommerzeit", "ANAST"}},
             {"Asia/Aqtau", new String[] {"Aqtau Zeit", "AQTT",
@@ -525,7 +523,7 @@
                                            "Irkutsk Sommerzeit", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"Ostindonesische Zeit", "EIT",
+            {"Asia/Jayapura", new String[] {"Ostindonesische Zeit", "WIT",
                                             "Ostindonesische Sommerzeit", "EIST"}},
             {"Asia/Kabul", new String[] {"Afghanistanische Zeit", "AFT",
                                          "Afghanistanische Sommerzeit", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"Chandyga Zeit", "YAKT",
+                                            "Chandyga Sommerzeit", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Krasnojarsker Zeit", "KRAT",
                                                "Krasnojarsker Sommerzeit", "KRAST"}},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"Ust-Nera Zeit", "VLAT",
+                                            "Ust-Nera Sommerzeit", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"Wladiwostok Zeit", "VLAT",
                                                "Wladiwostok Sommerzeit", "VLAST"}},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,9 +45,7 @@
 public final class TimeZoneNames_es extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"Hora de Acre", "ACT",
-                                     "Hora de verano de Acre", "ACST"};
-        String ADELAIDE[] = new String[] {"Hora est\u00e1ndar Central (Sur de Australia)", "CST",
+        String ADELAIDE[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia)", "CST",
                                           "Hora de verano Central (Sur de Australia)", "CST"};
         String AGT[] = new String[] {"Hora de Argentina", "ART",
                                      "Hora de verano de Argentina", "ARST"};
@@ -63,9 +61,9 @@
                                      "Hora de verano Atl\u00e1ntico", "ADT"};
         String BDT[] = new String[] {"Hora de Bangladesh", "BDT",
                                      "Hora de verano de Bangladesh", "BDST"};
-        String BRISBANE[] = new String[] {"Hora est\u00e1ndar del Este (Queensland)", "EST",
-                                          "Hora de verano del Este (Queensland)", "EST"};
-        String BROKEN_HILL[] = new String[] {"Hora est\u00e1ndar Central (Sur de Australia/Nueva Gales del Sur)", "CST",
+        String BRISBANE[] = new String[] {"Hora est\u00E1ndar del Este (Queensland)", "EST",
+                                          "Hora est\u00E1ndar de verano del Este (Queensland)", "EST"};
+        String BROKEN_HILL[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia/Nueva Gales del Sur)", "CST",
                                              "Hora de verano Central (Sur de Australia/Nueva Gales del Sur)", "CST"};
         String BRT[] = new String[] {"Hora de Brasil", "BRT",
                                      "Hora de verano de Brasil", "BRST"};
@@ -79,7 +77,7 @@
                                        "Hora de verano de Chatham", "CHADT"};
         String CHUT[] = new String[] {"Chuuk Time", "CHUT",
                                       "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"Hora de Indonesia Central", "CIT",
+        String CIT[] = new String[] {"Hora de Indonesia Central", "WITA",
                                      "Hora de verano de Indonesia Central", "CIST"};
         String CLT[] = new String[] {"Hora de Chile", "CLT",
                                      "Hora de verano de Chile", "CLST"};
@@ -89,7 +87,7 @@
                                      "Hora de verano de China", "CDT"};
         String CUBA[] = new String[] {"Hora est\u00e1ndar de Cuba", "CST",
                                       "Hora de verano de Cuba", "CDT"};
-        String DARWIN[] = new String[] {"Hora est\u00e1ndar Central (territorio del Norte)", "CST",
+        String DARWIN[] = new String[] {"Hora est\u00E1ndar Central (territorio del Norte)", "CST",
                                         "Hora de verano Central (territorio del Norte)", "CST"};
         String DUBLIN[] = new String[] {"Hora del Meridiano de Greenwich", "GMT",
                                         "Hora de verano de Irlanda", "IST"};
@@ -103,10 +101,10 @@
                                      "Hora de verano de Groenlandia Oriental", "EGST"};
         String EST[] = new String[] {"Hora est\u00e1ndar Oriental", "EST",
                                      "Hora de verano Oriental", "EDT"};
-        String EST_NSW[] = new String[] {"Hora est\u00e1ndar Oriental (Nueva Gales del Sur)", "EST",
+        String EST_NSW[] = new String[] {"Hora est\u00E1ndar Oriental (Nueva Gales del Sur)", "EST",
                                          "Hora de verano Oriental (Nueva Gales del Sur)", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String FET[] = new String[] {"Hora de Europa m\u00E1s Oriental", "FET",
+                                     "Hora de verano de Europa m\u00E1s Oriental", "FEST"};
         String GHMT[] = new String[] {"Hora central de Ghana", "GMT",
                                       "Hora de verano de Ghana", "GHST"};
         String GAMBIER[] =  new String[] {"Hora de Gambier", "GAMT",
@@ -171,7 +169,7 @@
                                      "Hora de verano de  Singapur", "SGST"};
         String SLST[] = new String[] {"Hora del Meridiano de Greenwich", "GMT",
                                       "Hora de verano de Sierra Leona", "SLST"};
-        String TASMANIA[] = new String[] {"Hora est\u00e1ndar del Este (Tasmania)", "EST",
+        String TASMANIA[] = new String[] {"Hora est\u00E1ndar del Este (Tasmania)", "EST",
                                           "Hora de verano del Este (Tasmania)", "EST"};
         String TMT[] = new String[] {"Hora de Turkmenist\u00e1n", "TMT",
                                      "Hora de verano de Turkmenist\u00e1n", "TMST"};
@@ -183,9 +181,9 @@
                                      "Hora de verano de \u00c1frica Occidental", "WAST"};
         String WET[] = new String[] {"Hora de Europa Occidental", "WET",
                                      "Hora de verano de Europa Occidental", "WEST"};
-        String WIT[] = new String[] {"Hora de Indonesia Occidental", "WIT",
+        String WIT[] = new String[] {"Hora de Indonesia Occidental", "WIB",
                                      "Indonesia Hora de verano de Indonesia Occidental", "WIST"};
-        String WST_AUS[] = new String[] {"Hora est\u00e1ndar Occidental (Australia)", "WST",
+        String WST_AUS[] = new String[] {"Hora est\u00E1ndar Occidental (Australia)", "WST",
                                          "Hora de verano Occidental (Australia)", "WST"};
         String SAMOA[] = new String[] {"Hora est\u00e1ndar de Samoa", "SST",
                                        "Hora de verano de Samoa", "SDT"};
@@ -193,7 +191,7 @@
                                            "Hora de verano de Samoa Occidental", "WSDT"};
         String ChST[] = new String[] {"Hora est\u00e1ndar de Chamorro", "ChST",
                                       "Hora de verano de Chamorro", "ChDT"};
-        String VICTORIA[] = new String[] {"Hora est\u00e1ndar del Este (Victoria)", "EST",
+        String VICTORIA[] = new String[] {"Hora est\u00E1ndar del Este (Victoria)", "EST",
                                           "Hora de verano del Este (Victoria)", "EST"};
         String UTC[] = new String[] {"Hora Universal Coordinada", "UTC",
                                      "Hora Universal Coordinada", "UTC"};
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"Hora de Alma-Ata", "ALMT",
                                           "Hora de verano de Alma-Ata", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"Hora de Anadyr", "ANAT",
                                           "Hora de verano de Anadyr", "ANAST"}},
             {"Asia/Aqtau", new String[] {"Hora de Aqtau", "AQTT",
@@ -525,7 +523,7 @@
                                            "Hora de verano de Irkutsk", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"Hora de Indonesia Oriental", "EIT",
+            {"Asia/Jayapura", new String[] {"Hora de Indonesia Oriental", "WIT",
                                             "Hora de verano de Indonesia Oriental", "EIST"}},
             {"Asia/Kabul", new String[] {"Hora de Afganist\u00e1n", "AFT",
                                          "Hora de verano de Afganist\u00e1n", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"Hora de Khandyga", "YAKT",
+                                            "Hora de verano de Khandyga", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Hora de Krasnoyarsk", "KRAT",
                                                "Hora de verano de Krasnoyarsk", "KRAST"}},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"Hora de Ust-Nera", "VLAT",
+                                            "Hora de verano de Ust-Nera", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"Hora de Vladivostok", "VLAT",
                                                "Hora de verano de Vladivostok", "VLAST"}},
@@ -618,8 +616,8 @@
             {"Australia/Canberra", EST_NSW},
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
-            {"Australia/Eucla", new String[] {"Hora est\u00e1ndar de Australia Central y Occidental", "CWST",
-                                              "Hora de verano de Australia Central y Occidental", "CWST"}},
+            {"Australia/Eucla", new String[] {"Hora est\u00E1ndar de Australia Central y Occidental", "CWST",
+                                              "Hora est\u00E1ndar de verano de Australia Central y Occidental", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"Heure de l'Acre", "ACT",
-                                     "Heure d'\u00e9t\u00e9 de l'Acre", "ACST"};
         String ADELAIDE[] = new String[] {"Heure standard d'Australie centrale (Australie du sud)", "CST",
-                                          "Heure d'\u00e9t\u00e9 d'Australie centrale (Australie du sud)", "CST"};
+                                          "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud)", "CST"};
         String AGT[] = new String[] {"Heure D'Argentine", "ART",
                                      "Heure d'\u00e9t\u00e9 D'Argentine", "ARST"} ;
         String AKST[] = new String[] {"Heure normale d'Alaska", "AKST",
@@ -64,9 +62,9 @@
         String BDT[] = new String[] {"Heure du Bangladesh", "BDT",
                                      "Heure d'\u00e9t\u00e9 du Bangladesh", "BDST"} ;
         String BRISBANE[] = new String[] {"Heure standard d'Australie orientale (Queensland)", "EST",
-                                          "Heure d'\u00e9t\u00e9 d'Australie orientale (Queensland)", "EST"};
+                                          "Heure d'\u00E9t\u00E9 d'Australie orientale (Queensland)", "EST"};
         String BROKEN_HILL[] = new String[] {"Heure standard d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST",
-                                             "Heure d'\u00e9t\u00e9 d'Australie centrale(Australie du sud/Nouvelle-Galles du sud)", "CST"};
+                                             "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST"};
         String BRT[] = new String[] {"Heure du Br\u00e9sil", "BRT",
                                      "Heure d'\u00e9t\u00e9 du Br\u00e9sil", "BRST"} ;
         String BTT[] = new String[] {"Heure du Bhoutan", "BTT",
@@ -77,9 +75,9 @@
                                      "Heure d'\u00e9t\u00e9 d'Europe centrale", "CEST"} ;
         String CHAST[] = new String[] {"Heure standard de Chatham", "CHAST",
                                        "Heure avanc\u00e9e de Chatham", "CHADT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"Heure d'Indon\u00e9sie centrale", "CIT",
+        String CHUT[] = new String[] {"Heure de Chuuk", "CHUT",
+                                      "Heure d'\u00E9t\u00E9 de Chuuk", "CHUST"};
+        String CIT[] = new String[] {"Heure d'Indon\u00e9sie centrale", "WITA",
                                      "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie centrale", "CIST"};
         String CLT[] = new String[] {"Heure du Chili", "CLT",
                                      "Heure d'\u00e9t\u00e9 du Chili", "CLST"} ;
@@ -90,7 +88,7 @@
         String CUBA[] = new String[] {"Heure standard de Cuba", "CST",
                                       "Heure d'\u00e9t\u00e9 de Cuba", "CDT"};
         String DARWIN[] = new String[] {"Heure standard d'Australie centrale (Territoire du Nord)", "CST",
-                                        "Heure d'\u00e9t\u00e9 d'Australie centrale (Territoire du Nord)", "CST"};
+                                        "Heure d'\u00E9t\u00E9 d'Australie centrale (Territoire du Nord)", "CST"};
         String DUBLIN[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT",
                                         "Heure d'\u00e9t\u00e9 irlandaise", "IST"};
         String EAT[] = new String[] {"Heure d'Afrique de l'Est", "EAT",
@@ -104,9 +102,9 @@
         String EST[] = new String[] {"Heure normale de l'Est", "EST",
                                      "Heure avanc\u00e9e de l'Est", "EDT"} ;
         String EST_NSW[] = new String[] {"Heure normale de l'Est (Nouvelle-Galles du Sud)", "EST",
-                                         "Heure d'\u00e9t\u00e9 de l'Est (Nouvelle-Galles du Sud)", "EST"} ;
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+                                         "Heure d'\u00E9t\u00E9 de l'Est (Nouvelle-Galles du Sud)", "EST"} ;
+        String FET[] = new String[] {"Heure d'Europe de l'Est UTC+3", "FET",
+                                     "Heure d'\u00E9t\u00E9 d'Europe de l'Est UTC+3", "FEST"};
         String GHMT[] = new String[] {"Heure du Ghana", "GMT",
                                       "Heure d'\u00e9t\u00e9 du Ghana", "GHST"};
         String GAMBIER[] =  new String[] {"Heure de Gambi", "GAMT",
@@ -159,8 +157,8 @@
                                           "heure avanc\u00e9e des Pitcairn", "PDT"};
         String PKT[] = new String[] {"Heure du Pakistan", "PKT",
                                      "Heure d'\u00e9t\u00e9 du Pakistan", "PKST"} ;
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"Heure de Pohnpei", "PONT",
+                                      "Heure d'\u00E9t\u00E9 de Pohnpei", "PONST"};
         String PST[] = new String[] {"Heure normale du Pacifique", "PST",
                                      "Heure avanc\u00e9e du Pacifique", "PDT"} ;
         String SAST[] = new String[] {"Heure normale d'Afrique du Sud", "SAST",
@@ -172,7 +170,7 @@
         String SLST[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT",
                                       "Heure d'\u00e9t\u00e9 de Sierra Leone", "SLST"};
         String TASMANIA[] = new String[] {"Heure standard d'Australie orientale (Tasmanie)", "EST",
-                                          "Heure d'\u00e9t\u00e9 d'Australie orientale (Tasmanie)", "EST"};
+                                          "Heure d'\u00E9t\u00E9 d'Australie orientale (Tasmanie)", "EST"};
         String TMT[] = new String[] {"Heure du Turkm\u00e9nistan", "TMT",
                                      "Heure d'\u00e9t\u00e9 du Turkm\u00e9nistan", "TMST"} ;
         String ULAT[]= new String[] {"Heure de l'Ulaanbaatar", "ULAT",
@@ -183,10 +181,10 @@
                                      "Heure d'\u00e9t\u00e9 d'Afrique de l'Ouest", "WAST"} ;
         String WET[] = new String[] {"Heure d'Europe de l'Ouest", "WET",
                                      "Heure d'\u00e9t\u00e9 d'Europe de l'Ouest", "WEST"} ;
-        String WIT[] = new String[] {"Heure de l'Indon\u00e9sie occidentale", "WIT",
+        String WIT[] = new String[] {"Heure de l'Indon\u00e9sie occidentale", "WIB",
                                      "Heure d'\u00e9t\u00e9 de l'Indon\u00e9sie occidentale", "WIST"};
         String WST_AUS[] = new String[] {"Heure normale de l'Ouest (Australie)", "WST",
-                                         "Heure d'\u00e9t\u00e9 de l'Ouest (Australie)", "WST"} ;
+                                         "Heure d'\u00E9t\u00E9 de l'Ouest (Australie)", "WST"} ;
         String SAMOA[] = new String[] {"Heure standard de Samoa", "SST",
                                        "Heure avanc\u00e9e de Samoa", "SDT"};
         String WST_SAMOA[] = new String[] {"Heure des Samoas occidentales", "WST",
@@ -194,7 +192,7 @@
         String ChST[] = new String[] {"Heure normale des \u00eeles Mariannes", "ChST",
                       "Heure d'\u00e9t\u00e9 des \u00eeles Mariannes", "ChDT"};
         String VICTORIA[] = new String[] {"Heure standard d'Australie orientale (Victoria)", "EST",
-                                          "Heure d'\u00e9t\u00e9 d'Australie orientale (Victoria)", "EST"};
+                                          "Heure d'\u00E9t\u00E9 d'Australie orientale (Victoria)", "EST"};
         String UTC[] = new String[] {"Temps universel coordonn\u00e9", "UTC",
                                      "Temps universel coordonn\u00e9", "UTC"};
         String UZT[] = new String[] {"Heure de l'Ouzb\u00e9kistan", "UZT",
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"Heure normale de Metlakatla", "MeST",
+                                                 "Heure avanc\u00E9e de Metlakatla", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Heure normale de Saint-Pierre et Miquelon", "PMST",
                                                "Heure avanc\u00e9e de Saint-Pierre et Miquelon", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "Heure d'\u00e9t\u00e9 de Davis", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"Heure de Dumont-d'Urville", "DDUT",
                                                         "Heure d'\u00e9t\u00e9 de Dumont-d'Urville", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"Heure de l'Ile Macquarie", "MIST",
+                                                   "Heure d'\u00E9t\u00E9 de l'Ile Macquarie", "MIST"}},
             {"Antarctica/Mawson", new String[] {"Heure de Mawson", "MAWT",
                                                 "Heure d'\u00e9t\u00e9 de Mawson", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"Heure d'Alma-Ata", "ALMT",
                                           "Heure d'\u00e9t\u00e9 d'Alma-Ata", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"Heure d'Anadyr", "ANAT",
                                           "Heure d'\u00e9t\u00e9 d'Anadyr", "ANAST"}},
             {"Asia/Aqtau", new String[] {"Heure d'Aqtau", "AQTT",
@@ -525,7 +523,7 @@
                                            "Heure d'\u00e9t\u00e9 d'Irkutsk", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"Heure d'Indon\u00e9sie orientale", "EIT",
+            {"Asia/Jayapura", new String[] {"Heure d'Indon\u00e9sie orientale", "WIT",
                                             "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie orientale", "EIST"}},
             {"Asia/Kabul", new String[] {"Heure d'Afghanistan", "AFT",
                                          "Heure d'\u00e9t\u00e9 d'Afghanistan", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"Heure de Khandyga", "YAKT",
+                                            "Heure d'\u00E9t\u00E9 de Khandyga", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Heure de Krasno\u00efarsk", "KRAT",
                                                "Heure d'\u00e9t\u00e9 de Krasno\u00efarsk", "KRAST"}},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"Heure d'Ust-Nera", "VLAT",
+                                            "Heure d'\u00E9t\u00E9 d'Ust-Nera", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"Heure de Vladivostok", "VLAT",
                                                "Heure d'\u00e9t\u00e9 de Vladivostok", "VLAST"}},
@@ -619,7 +617,7 @@
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
             {"Australia/Eucla", new String[] {"Heure standard de l'Australie occidentale (centre)", "CWST",
-                                              "Heure d'\u00e9t\u00e9 de l'Australie occidentale (centre)", "CWST"}},
+                                              "Heure d'\u00E9t\u00E9 de l'Australie occidentale (centre)", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_it extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"Ora di Acre", "ACT",
-                                     "Ora estiva di Acre", "ACST"};
-        String ADELAIDE[] = new String[] {"Ora centrale standard (Australia del Sud)", "CST",
-                                          "Ora estiva standard (Australia del Sud)", "CST"};
+        String ADELAIDE[] = new String[] {"Ora standard centrale (Australia del Sud)", "CST",
+                                          "Ora estiva centrale (Australia del Sud)", "CST"};
         String AGT[] = new String[] {"Ora dell'Argentina", "ART",
                                      "Ora estiva dell'Argentina", "ARST"};
         String AKST[] = new String[] {"Ora solare dell'Alaska", "AKST",
@@ -63,9 +61,9 @@
                                      "Ora legale dell'Atlantico occidentale", "ADT"};
         String BDT[] = new String[] {"Ora del Bangladesh", "BDT",
                                      "Ora estiva del Bangladesh", "BDST"};
-        String BRISBANE[] = new String[] {"Ora orientale standard (Queensland)", "EST",
+        String BRISBANE[] = new String[] {"Ora standard orientale (Queensland)", "EST",
                                           "Ora estiva orientale (Queensland)", "EST"};
-        String BROKEN_HILL[] = new String[] {"Ora centrale standard (Australia del Sud/Nuovo Galles del Sud)", "CST",
+        String BROKEN_HILL[] = new String[] {"Ora standard centrale (Australia del Sud/Nuovo Galles del Sud)", "CST",
                                              "Ora estiva centrale (Australia del Sud/Nuovo Galles del Sud)", "CST"};
         String BRT[] = new String[] {"Ora del Brasile", "BRT",
                                      "Ora estiva del Brasile", "BRST"};
@@ -77,9 +75,9 @@
                                      "Ora estiva dell'Europa centrale", "CEST"};
         String CHAST[] = new String[] {"Ora di Chatham standard", "CHAST",
                                        "Ora legale di Chatham", "CHADT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"Ora dell'Indonesia centrale", "CIT",
+        String CHUT[] = new String[] {"Ora di Chuuk", "CHUT",
+                                      "Ora estiva di Chuuk", "CHUST"};
+        String CIT[] = new String[] {"Ora dell'Indonesia centrale", "WITA",
                                      "Ora estiva dell'Indonesia centrale", "CIST"};
         String CLT[] = new String[] {"Ora del Cile", "CLT",
                                      "Ora estiva del Cile", "CLST"};
@@ -89,7 +87,7 @@
                                      "Ora legale della Cina", "CDT"};
         String CUBA[] = new String[] {"Ora solare Cuba", "CST",
                                       "Ora legale Cuba", "CDT"};
-        String DARWIN[] = new String[] {"Ora centrale standard (Territori del Nord)", "CST",
+        String DARWIN[] = new String[] {"Ora standard centrale (Territori del Nord)", "CST",
                                         "Ora estiva centrale (Territori del Nord)", "CST"};
         String DUBLIN[] = new String[] {"Ora media di Greenwich", "GMT",
                                         "Ora estiva irlandese", "IST"};
@@ -103,10 +101,10 @@
                                      "Ora estiva della Groenlandia orientale", "EGST"};
         String EST[] = new String[] {"Ora solare USA orientale", "EST",
                                      "Ora legale USA orientale", "EDT"};
-        String EST_NSW[] = new String[] {"Ora solare dell'Australia orientale (Nuovo Galles del Sud)", "EST",
+        String EST_NSW[] = new String[] {"Ora standard dell'Australia orientale (Nuovo Galles del Sud)", "EST",
                                          "Ora estiva dell'Australia orientale (Nuovo Galles del Sud)", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String FET[] = new String[] {"Ora dei paesi europei pi\u00F9 orientali", "FET",
+                                     "Ora estiva dei paesi europei pi\u00F9 orientali", "FEST"};
         String GHMT[] = new String[] {"Ora media del Ghana", "GMT",
                                       "Ora legale del Ghana", "GHST"};
         String GAMBIER[] =  new String[] {"Ora di Gambier", "GAMT",
@@ -159,8 +157,8 @@
                                           "Ora legale di Pitcairn", "PDT"};
         String PKT[] = new String[] {"Ora del Pakistan", "PKT",
                                      "Ora estiva del Pakistan", "PKST"};
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"Ora di Pohnpei", "PONT",
+                                      "Ora estiva di Pohnpei", "PONST"};
         String PST[] = new String[] {"Ora solare della costa occidentale USA", "PST",
                                      "Ora legale della costa occidentale USA", "PDT"};
         String SAST[] = new String[] {"Ora solare del Sudafrica", "SAST",
@@ -171,7 +169,7 @@
                                      "Ora estiva di Singapore", "SGST"};
         String SLST[] = new String[] {"Ora media di Greenwich", "GMT",
                                       "Ora legale della Sierra Leone", "SLST"};
-        String TASMANIA[] = new String[] {"Ora orientale standard (Tasmania)", "EST",
+        String TASMANIA[] = new String[] {"Ora standard orientale (Tasmania)", "EST",
                                           "Ora estiva orientale (Tasmania)", "EST"};
         String TMT[] = new String[] {"Ora del Turkmenistan", "TMT",
                                      "Ora estiva del Turkmenistan", "TMST"};
@@ -183,9 +181,9 @@
                                      "Ora estiva dell'Africa occidentale", "WAST"};
         String WET[] = new String[] {"Ora dell'Europa occidentale", "WET",
                                      "Ora estiva dell'Europa occidentale", "WEST"};
-        String WIT[] = new String[] {"Ora dell'Indonesia occidentale", "WIT",
+        String WIT[] = new String[] {"Ora dell'Indonesia occidentale", "WIB",
                                      "Ora estiva dell'Indonesia occidentale", "WIST"};
-        String WST_AUS[] = new String[] {"Ora solare dell'Australia occidentale", "WST",
+        String WST_AUS[] = new String[] {"Ora standard dell'Australia occidentale", "WST",
                                          "Ora estiva dell'Australia occidentale", "WST"};
         String SAMOA[] = new String[] {"Ora standard di Samoa", "SST",
                                        "Ora legale di Samoa", "SDT"};
@@ -193,7 +191,7 @@
                                            "Ora estiva di Samoa", "WSDT"};
         String ChST[] = new String[] {"Ora standard di Chamorro", "ChST",
                               "Ora legale di Chamorro", "ChDT"};
-        String VICTORIA[] = new String[] {"Ora orientale standard (Victoria)", "EST",
+        String VICTORIA[] = new String[] {"Ora standard orientale (Victoria)", "EST",
                                           "Ora estiva orientale (Victoria)", "EST"};
         String UTC[] = new String[] {"Tempo universale coordinato", "UTC",
                                      "Tempo universale coordinato", "UTC"};
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"Ora standard di Metlakatla", "MeST",
+                                                 "Ora legale di Metlakatla", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Ora solare di Saint-Pierre e Miquelon", "PMST",
                                                "Ora legale di Saint-Pierre e Miquelon", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "Ora estiva di Davis", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"Ora di Dumont-d'Urville", "DDUT",
                                                         "Ora estiva di Dumont-d'Urville", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"Ora dell'Isola Macquarie", "MIST",
+                                                   "Ora estiva dell'Isola Macquarie", "MIST"}},
             {"Antarctica/Mawson", new String[] {"Ora di Mawson", "MAWT",
                                                 "Ora estiva di Mawson", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"Ora di Alma-Ata", "ALMT",
                                           "Ora estiva di Alma-Ata", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"Ora di Anadyr", "ANAT",
                                           "Ora estiva di Anadyr", "ANAST"}},
             {"Asia/Aqtau", new String[] {"Ora di Aqtau", "AQTT",
@@ -525,7 +523,7 @@
                                            "Ora estiva di Irkutsk", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"Ora dell'Indonesia orientale", "EIT",
+            {"Asia/Jayapura", new String[] {"Ora dell'Indonesia orientale", "WIT",
                                             "Ora estiva dell'Indonesia orientale", "EIST"}},
             {"Asia/Kabul", new String[] {"Ora dell'Afghanistan", "AFT",
                                          "Ora estiva dell'Afghanistan", "AFST"}},
@@ -536,8 +534,8 @@
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
             {"Asia/Kolkata", IST},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"Ora di Khandyga", "YAKT",
+                                            "Ora estiva di Khandyga", "YAKST"}},
             {"Asia/Krasnoyarsk", new String[] {"Ora di Krasnojarsk", "KRAT",
                                                "Ora estiva di Krasnojarsk", "KRAST"}},
             {"Asia/Kuala_Lumpur", MYT},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"Ora di Ust-Nera", "VLAT",
+                                            "Ora estiva di Ust-Nera", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"Ora di Vladivostok", "VLAT",
                                                "Ora estiva di Vladivostok", "VLAST"}},
@@ -618,8 +616,8 @@
             {"Australia/Canberra", EST_NSW},
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
-            {"Australia/Eucla", new String[] {"Ora solare Australia centrorientale", "CWST",
-                                              "Ora estiva Australia centrorientale", "CWST"}},
+            {"Australia/Eucla", new String[] {"Ora standard Australia centro-occidentale", "CWST",
+                                              "Ora estiva Australia centro-occidentale", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"\u30a2\u30af\u30ec\u6642\u9593", "ACT",
-                                     "\u30a2\u30af\u30ec\u590f\u6642\u9593", "ACST"};
-        String ADELAIDE[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CST",
-                                          "\u4e2d\u90e8\u590f\u6642\u9593 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CST"};
+        String ADELAIDE[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST",
+                                          "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST"};
         String AGT[] = new String[] {"\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u6642\u9593", "ART",
                                      "\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u590f\u6642\u9593", "ARST"};
         String AKST[] = new String[] {"\u30a2\u30e9\u30b9\u30ab\u6a19\u6e96\u6642", "AKST",
@@ -63,10 +61,10 @@
                                      "\u5927\u897f\u6d0b\u590f\u6642\u9593", "ADT"};
         String BDT[] = new String[] {"\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u6642\u9593", "BDT",
                                      "\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u590f\u6642\u9593", "BDST"};
-        String BRISBANE[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30af\u30a4\u30fc\u30f3\u30ba\u30e9\u30f3\u30c9)", "EST",
-                                          "\u6771\u90e8\u590f\u6642\u9593 (\u30af\u30a4\u30fc\u30f3\u30ba\u30e9\u30f3\u30c9)", "EST"};
-        String BROKEN_HILL[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2/\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "CST",
-                                             "\u4e2d\u90e8\u590f\u6642\u9593 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2/\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "CST"};
+        String BRISBANE[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST",
+                                          "\u6771\u90E8\u590F\u6642\u9593(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST"};
+        String BROKEN_HILL[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST",
+                                             "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST"};
         String BRT[] = new String[] {"\u30d6\u30e9\u30b8\u30eb\u6642\u9593", "BRT",
                                      "\u30d6\u30e9\u30b8\u30eb\u590f\u6642\u9593", "BRST"};
         String BTT[] = new String[] {"\u30d6\u30fc\u30bf\u30f3\u6642\u9593", "BTT",
@@ -77,9 +75,9 @@
                                      "\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "CEST"};
         String CHAST[] = new String[] {"\u30c1\u30e3\u30bf\u30e0\u6a19\u6e96\u6642", "CHAST",
                                        "\u30c1\u30e3\u30bf\u30e0\u590f\u6642\u9593", "CHADT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "CIT",
+        String CHUT[] = new String[] {"\u30C1\u30E5\u30FC\u30AF\u6642\u9593", "CHUT",
+                                      "Chuuk Time", "CHUST"};
+        String CIT[] = new String[] {"\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WITA",
                                      "\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "CIST"};
         String CLT[] = new String[] {"\u30c1\u30ea\u6642\u9593", "CLT",
                                      "\u30c1\u30ea\u590f\u6642\u9593", "CLST"};
@@ -89,8 +87,8 @@
                                      "\u4e2d\u56fd\u590f\u6642\u9593", "CDT"};
         String CUBA[] = new String[] {"\u30ad\u30e5\u30fc\u30d0\u6a19\u6e96\u6642", "CST",
                                       "\u30ad\u30e5\u30fc\u30d0\u590f\u6642\u9593", "CDT"};
-        String DARWIN[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u30ce\u30fc\u30b6\u30f3\u30c6\u30ea\u30c8\u30ea\u30fc)", "CST",
-                                        "\u4e2d\u90e8\u590f\u6642\u9593 (\u30ce\u30fc\u30b6\u30f3\u30c6\u30ea\u30c8\u30ea\u30fc)", "CST"};
+        String DARWIN[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST",
+                                        "\u4E2D\u90E8\u590F\u6642\u9593(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST"};
         String DUBLIN[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT",
                                         "\u30a2\u30a4\u30eb\u30e9\u30f3\u30c9\u590f\u6642\u9593", "IST"};
         String EAT[] = new String[] {"\u6771\u30a2\u30d5\u30ea\u30ab\u6642\u9593", "EAT",
@@ -103,10 +101,10 @@
                                      "\u6771\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u590f\u6642\u9593", "EGST"};
         String EST[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642", "EST",
                                      "\u6771\u90e8\u590f\u6642\u9593", "EDT"};
-        String EST_NSW[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "EST",
-                                         "\u6771\u90e8\u590f\u6642\u9593 (\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String EST_NSW[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST",
+                                         "\u6771\u90E8\u590F\u6642\u9593(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST"};
+        String FET[] = new String[] {"\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u6642\u9593", "FET",
+                                     "\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u590F\u6642\u9593", "FEST"};
         String GHMT[] = new String[] {"\u30ac\u30fc\u30ca\u6a19\u6e96\u6642", "GMT",
                                      "\u30ac\u30fc\u30ca\u590f\u6642\u9593", "GHST"};
         String GAMBIER[] =  new String[] {"\u30ac\u30f3\u30d3\u30a2\u6642\u9593", "GAMT",
@@ -159,8 +157,8 @@
                                           "\u30d4\u30c8\u30b1\u30eb\u30f3\u5cf6\u590f\u6642\u9593", "PDT"};
         String PKT[] = new String[] {"\u30d1\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "PKT",
                                      "\u30d1\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "PKST"};
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"\u30DD\u30F3\u30DA\u30A4\u6642\u9593", "PONT",
+                                      "\u30DD\u30F3\u30DA\u30A4\u590F\u6642\u9593", "PONST"};
         String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6a19\u6e96\u6642", "PST",
                                      "\u592a\u5e73\u6d0b\u590f\u6642\u9593", "PDT"};
         String SAST[] = new String[] {"\u5357\u30a2\u30d5\u30ea\u30ab\u6a19\u6e96\u6642", "SAST",
@@ -171,8 +169,8 @@
                                      "\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u590f\u6642\u9593", "SGST"};
         String SLST[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT",
                                       "\u30b7\u30a8\u30e9\u30ec\u30aa\u30cd\u590f\u6642\u9593", "SLST"};
-        String TASMANIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30bf\u30b9\u30de\u30cb\u30a2)", "EST",
-                                          "\u6771\u90e8\u590f\u6642\u9593 (\u30bf\u30b9\u30de\u30cb\u30a2)", "EST"};
+        String TASMANIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST",
+                                          "\u6771\u90E8\u590F\u6642\u9593(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST"};
         String TMT[] = new String[] {"\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u6642\u9593", "TMT",
                                      "\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "TMST"};
         String ULAT[]= new String[] {"\u30a6\u30e9\u30fc\u30f3\u30d0\u30fc\u30c8\u30eb\u6642\u9593", "ULAT",
@@ -183,18 +181,18 @@
                                      "\u897f\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "WAST"};
         String WET[] = new String[] {"\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "WET",
                                      "\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "WEST"};
-        String WIT[] = new String[] {"\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIT",
+        String WIT[] = new String[] {"\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIB",
                                      "\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "WIST"};
-        String WST_AUS[] = new String[] {"\u897f\u90e8\u6a19\u6e96\u6642 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "WST",
-                                         "\u897f\u90e8\u590f\u6642\u9593 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "WST"};
+        String WST_AUS[] = new String[] {"\u897F\u90E8\u6A19\u6E96\u6642(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST",
+                                         "\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST"};
         String SAMOA[] = new String[] {"\u30b5\u30e2\u30a2\u6a19\u6e96\u6642", "SST",
                                        "\u30b5\u30e2\u30a2\u590f\u6642\u9593", "SDT"};
         String WST_SAMOA[] = new String[] {"\u897f\u30b5\u30e2\u30a2\u6642\u9593", "WST",
                                            "\u897f\u30b5\u30e2\u30a2\u590f\u6642\u9593", "WSDT"};
         String ChST[] = new String[] {"\u30b0\u30a2\u30e0\u6a19\u6e96\u6642", "ChST",
                                       "\u30b0\u30a2\u30e0\u590f\u6642\u9593", "ChDT"};
-        String VICTORIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30d3\u30af\u30c8\u30ea\u30a2)", "EST",
-                                          "\u6771\u90e8\u590f\u6642\u9593 (\u30d3\u30af\u30c8\u30ea\u30a2)", "EST"};
+        String VICTORIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST",
+                                          "\u6771\u90E8\u590F\u6642\u9593(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST"};
         String UTC[] = new String[] {"\u5354\u5b9a\u4e16\u754c\u6642", "UTC",
                                      "\u5354\u5b9a\u4e16\u754c\u6642", "UTC"};
         String UZT[] = new String[] {"\u30a6\u30ba\u30d9\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "UZT",
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u6A19\u6E96\u6642\u9593", "MeST",
+                                                 "\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u590F\u6642\u9593", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u6a19\u6e96\u6642", "PMST",
                                                "\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "\u30c7\u30a4\u30d3\u30b9\u590f\u6642\u9593", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u6642\u9593", "DDUT",
                                                         "\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u590f\u6642\u9593", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u6642\u9593", "MIST",
+                                                   "\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u590F\u6642\u9593", "MIST"}},
             {"Antarctica/Mawson", new String[] {"\u30e2\u30fc\u30bd\u30f3\u6642\u9593", "MAWT",
                                                 "\u30e2\u30fc\u30bd\u30f3\u590f\u6642\u9593", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"\u30a2\u30eb\u30de\u30a2\u30bf\u6642\u9593", "ALMT",
                                           "\u30a2\u30eb\u30de\u30a2\u30bf\u590f\u6642\u9593", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"\u30a2\u30ca\u30c9\u30a5\u30a4\u30ea\u6642\u9593", "ANAT",
                                           "\u30a2\u30ca\u30c9\u30a5\u30a4\u30ea\u590f\u6642\u9593", "ANAST"}},
             {"Asia/Aqtau", new String[] {"\u30a2\u30af\u30bf\u30a6\u6642\u9593", "AQTT",
@@ -525,7 +523,7 @@
                                            "\u30a4\u30eb\u30af\u30fc\u30c4\u30af\u590f\u6642\u9593", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "EIT",
+            {"Asia/Jayapura", new String[] {"\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIT",
                                             "\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "EIST" }},
             {"Asia/Kabul", new String[] {"\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u6642\u9593", "AFT",
                                          "\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u6642\u9593", "YAKT",
+                                            "\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u590F\u6642\u9593", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u6642\u9593", "KRAT",
                                                "\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u590f\u6642\u9593", "KRAST"}},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"\u30A6\u30B9\u30C1\u30CD\u30E9\u6642\u9593", "VLAT",
+                                            "\u30A6\u30B9\u30C1\u30CD\u30E9\u590F\u6642\u9593", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"\u30a6\u30e9\u30b8\u30aa\u30b9\u30c8\u30af\u6642\u9593", "VLAT",
                                                "\u30a6\u30e9\u30b8\u30aa\u30b9\u30c8\u30af\u590f\u6642\u9593", "VLAST"}},
@@ -618,8 +616,8 @@
             {"Australia/Canberra", EST_NSW},
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
-            {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6a19\u6e96\u6642 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CWST",
-                                              "\u4e2d\u897f\u90e8\u590f\u6642\u9593 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CWST"}},
+            {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6A19\u6E96\u6642(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST",
+                                              "\u4E2D\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/ko/LocaleNames_ko.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/ko/LocaleNames_ko.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -1045,7 +1045,7 @@
 PN=\ud54f\ucf00\uc5b8 \uc81c\ub3c4
 PR=\ud478\uc5d0\ub974\ud1a0\ub9ac\ucf54
 PS=\ud314\ub808\uc2a4\ud0c0\uc778
-PT=\ud3ec\ub974\ud2b8\uce7c
+PT=\ud3ec\ub974\ud22c\uce7c
 PW=\ud314\ub77c\uc6b0
 PY=\ud30c\ub77c\uacfc\uc774
 QA=\uce74\ud0c0\ub974
--- a/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"\uc5d0\uc774\ucee4 \uc2dc\uac04", "ACT",
-                                     "\uc5d0\uc774\ucee4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ACST"};
-        String ADELAIDE[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CST",
-                                          "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CST"};
+        String ADELAIDE[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST",
+                                          "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST"};
         String AGT[] = new String[] {"\uc544\ub974\ud5e8\ud2f0\ub098 \uc2dc\uac04", "ART",
                                      "\uc544\ub974\ud5e8\ud2f0\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ARST"};
         String AKST[] = new String[] {"\uc54c\ub798\uc2a4\uce74 \ud45c\uc900\uc2dc", "AKST",
@@ -63,10 +61,10 @@
                                      "\ub300\uc11c\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ADT"};
         String BDT[] = new String[] {"\ubc29\uae00\ub77c\ub370\uc2dc \uc2dc\uac04", "BDT",
                                      "\ubc29\uae00\ub77c\ub370\uc2dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BDST"};
-        String BRISBANE[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ud038\uc990\ub79c\ub4dc)", "EST",
-                                          "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud038\uc990\ub79c\ub4dc)", "EST"};
-        String BROKEN_HILL[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544/\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "CST",
-                                             "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544/\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "CST"};
+        String BRISBANE[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD038\uC990\uB79C\uB4DC)", "EST",
+                                          "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD038\uC990\uB79C\uB4DC)", "EST"};
+        String BROKEN_HILL[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST",
+                                             "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST"};
         String BRT[] = new String[] {"\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc2dc\uac04", "BRT",
                                      "\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BRST"};
         String BTT[] = new String[] {"\ubd80\ud0c4 \uc2dc\uac04", "BTT",
@@ -77,9 +75,9 @@
                                      "\uc911\uc559 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CEST"};
         String CHAST[] = new String[] {"Chatham \ud45c\uc900\uc2dc", "CHAST",
                                        "Chatham \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CHADT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "CIT",
+        String CHUT[] = new String[] {"\uCD94\uD06C \uD45C\uC900\uC2DC", "CHUT",
+                                      "\uCD94\uD06C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "CHUST"};
+        String CIT[] = new String[] {"\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WITA",
                                      "\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CIST"};
         String CLT[] = new String[] {"\uce60\ub808 \uc2dc\uac04", "CLT",
                                      "\uce60\ub808 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CLST"};
@@ -89,8 +87,8 @@
                                      "\uc911\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"};
         String CUBA[] = new String[] {"\ucfe0\ubc14 \ud45c\uc900\uc2dc", "CST",
                                       "\ucfe0\ubc14 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"};
-        String DARWIN[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\ub178\ub358 \uc9c0\uc5ed)", "CST",
-                                        "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ub178\ub358 \uc9c0\uc5ed)", "CST"};
+        String DARWIN[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uBD81\uBD80 \uC9C0\uC5ED)", "CST",
+                                        "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBD81\uBD80 \uC9C0\uC5ED)", "CST"};
         String DUBLIN[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT",
                                         "\uc544\uc77c\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IST"};
         String EAT[] = new String[] {"\ub3d9\ubd80 \uc544\ud504\ub9ac\uce74 \uc2dc\uac04", "EAT",
@@ -103,10 +101,10 @@
                                      "\ub3d9\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EGST"};
         String EST[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc", "EST",
                                      "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EDT"};
-        String EST_NSW[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "EST",
-                                         "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String EST_NSW[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST",
+                                         "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST"};
+        String FET[] = new String[] {"\uADF9\uB3D9 \uC720\uB7FD \uD45C\uC900\uC2DC", "FET",
+                                     "\uADF9\uB3D9 \uC720\uB7FD \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "FEST"};
         String GHMT[] = new String[] {"\uac00\ub098 \ud45c\uc900\uc2dc", "GMT",
                                      "\uac00\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GHST"};
         String GAMBIER[] =  new String[] {"\uac10\ube44\uc544 \uc2dc\uac04", "GAMT",
@@ -159,8 +157,8 @@
                                           "Pitcairn \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT"};
         String PKT[] = new String[] {"\ud30c\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "PKT",
                                      "\ud30c\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PKST"};
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"\uD3F0\uD398\uC774 \uD45C\uC900\uC2DC", "PONT",
+                                      "\uD3F0\uD398\uC774 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "PONST"};
         String PST[] = new String[] {"\ud0dc\ud3c9\uc591 \ud45c\uc900\uc2dc", "PST",
                                      "\ud0dc\ud3c9\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT"};
         String SAST[] = new String[] {"\ub0a8\uc544\ud504\ub9ac\uce74 \ud45c\uc900\uc2dc", "SAST",
@@ -171,8 +169,8 @@
                                      "\uc2f1\uac00\ud3ec\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SGST"};
         String SLST[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT",
                                       "\uc2dc\uc5d0\ub77c\ub9ac\uc628 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SLST"};
-        String TASMANIA[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ud0dc\uc988\uba54\uc774\ub2c8\uc544)", "EST",
-                                          "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud0dc\uc988\uba54\uc774\ub2c8\uc544)", "EST"};
+        String TASMANIA[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST",
+                                          "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST"};
         String TMT[] = new String[] {"\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc2dc\uac04", "TMT",
                                      "\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TMST"};
         String ULAT[]= new String[] {"\uc6b8\ub780\ubc14\ud0c0\ub974 \uc2dc\uac04", "ULAT",
@@ -183,18 +181,18 @@
                                      "\uc11c\ubd80 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WAST"};
         String WET[] = new String[] {"\uc11c\uc720\ub7fd \uc2dc\uac04", "WET",
                                      "\uc11c\uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WEST"};
-        String WIT[] = new String[] {"\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIT",
+        String WIT[] = new String[] {"\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIB",
                                      "\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WIST"};
-        String WST_AUS[] = new String[] {"\uc11c\ubd80 \ud45c\uc900\uc2dc(\ud638\uc8fc)", "WST",
-                                         "\uc11c\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud638\uc8fc)", "WST"};
+        String WST_AUS[] = new String[] {"\uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST",
+                                         "\uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST"};
         String SAMOA[] = new String[] {"\uc0ac\ubaa8\uc544 \ud45c\uc900\uc2dc", "SST",
                                        "\uc0ac\ubaa8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SDT"};
         String WST_SAMOA[] = new String[] {"\uc11c\uc0ac\ubaa8\uc544 \uc2dc\uac04", "WST",
                                            "\uc11c\uc0ac\ubaa8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WSDT"};
         String ChST[] = new String[] {"\ucc28\ubaa8\ub85c \ud45c\uc900\uc2dc", "ChST",
                                       "\ucc28\ubaa8\ub85c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ChDT"};
-        String VICTORIA[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ube45\ud1a0\ub9ac\uc544)", "EST",
-                                          "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ube45\ud1a0\ub9ac\uc544)", "EST"};
+        String VICTORIA[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uBE45\uD1A0\uB9AC\uC544)", "EST",
+                                          "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBE45\uD1A0\uB9AC\uC544)", "EST"};
         String UTC[] = new String[] {"\uc138\uacc4 \ud45c\uc900\uc2dc", "UTC",
                                      "\uc138\uacc4 \ud45c\uc900\uc2dc", "UTC"};
         String UZT[] = new String[] {"\uc6b0\uc988\ubca0\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "UZT",
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uD45C\uC900\uC2DC", "MeST",
+                                                 "\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \ud45c\uc900\uc2dc", "PMST",
                                                "\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "Davis \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"\ub4a4\ubabd \ub4a4\ub974\ube4c \uc2dc\uac04", "DDUT",
                                                         "\ub4a4\ubabd \ub4a4\ub974\ube4c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"\uB9E4\uCF70\uB9AC \uC12C \uD45C\uC900\uC2DC", "MIST",
+                                                   "\uB9E4\uCF70\uB9AC \uC12C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MIST"}},
             {"Antarctica/Mawson", new String[] {"\ubaa8\uc2a8 \uc2dc\uac04", "MAWT",
                                                 "\ubaa8\uc2a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"\uc54c\ub9c8\uc544\ud0c0 \uc2dc\uac04", "ALMT",
                                           "\uc54c\ub9c8\uc544\ud0c0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"\uc544\ub098\ub514\ub974 \uc2dc\uac04", "ANAT",
                                           "\uc544\ub098\ub514\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ANAST"}},
             {"Asia/Aqtau", new String[] {"\uc545\ud0c0\uc6b0 \uc2dc\uac04", "AQTT",
@@ -525,7 +523,7 @@
                                             "\uc774\ub974\ucfe0\uce20\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "EIT",
+            {"Asia/Jayapura", new String[] {"\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIT",
                                             "\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EIST"}},
             {"Asia/Kabul", new String[] {"\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc2dc\uac04", "AFT",
                                          "\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"\uD55C\uB514\uAC00 \uD45C\uC900\uC2DC", "YAKT",
+                                            "\uD55C\uB514\uAC00 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc2dc\uac04", "KRAT",
                                                "\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KRAST"}},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST" }},
+            {"Asia/Ust-Nera", new String[] {"\uC6B0\uC2A4\uD2F0\uB124\uB77C \uD45C\uC900\uC2DC", "VLAT",
+                                            "\uC6B0\uC2A4\uD2F0\uB124\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "VLAST" }},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"\ube14\ub77c\ub514\ubcf4\uc2a4\ud1a1 \uc2dc\uac04", "VLAT",
                                                "\ube14\ub77c\ub514\ubcf4\uc2a4\ud1a1 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VLAST"}},
@@ -618,8 +616,8 @@
             {"Australia/Canberra", EST_NSW},
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
-            {"Australia/Eucla", new String[] {"\uc911\uc11c\ubd80 \ud45c\uc900\uc2dc(\uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CWST",
-                                              "\uc911\uc11c\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CWST"}},
+            {"Australia/Eucla", new String[] {"\uC911\uC559 \uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST",
+                                              "\uC911\uC559 \uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"Fuso hor\u00e1rio do Acre", "ACT",
-                                     "Fuso hor\u00e1rio de ver\u00e3o do Acre", "ACST"};
-        String ADELAIDE[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Austr\u00e1lia do Sul)", "CST",
-                                          "Fuso hor\u00e1rio de ver\u00e3o central (Austr\u00e1lia do Sul)", "CST"};
+        String ADELAIDE[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Austr\u00E1lia do Sul)", "CST",
+                                          "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul)", "CST"};
         String AGT[] = new String[] {"Fuso hor\u00e1rio da Argentina", "ART",
                                      "Fuso hor\u00e1rio de ver\u00e3o da Argentina", "ARST"};
         String AKST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Alaska", "AKST",
@@ -63,10 +61,10 @@
                                      "Hor\u00e1rio de luz natural do Atl\u00e2ntico", "ADT"};
         String BDT[] = new String[] {"Fuso hor\u00e1rio de Bangladesh", "BDT",
                                      "Fuso hor\u00e1rio de ver\u00e3o de Bangladesh", "BDST"};
-        String BRISBANE[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Queensland)", "EST",
-                                          "Fuso hor\u00e1rio de ver\u00e3o oriental (Queensland)", "EST"};
-        String BROKEN_HILL[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Austr\u00e1lia do Sul/Nova Gales do Sul)", "CST",
-                                             "Fuso hor\u00e1rio de ver\u00e3o central (Austr\u00e1lia do Sul/Nova Gales do Sul)", "CST"};
+        String BRISBANE[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Queensland)", "EST",
+                                          "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Queensland)", "EST"};
+        String BROKEN_HILL[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST",
+                                             "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST"};
         String BRT[] = new String[] {"Fuso hor\u00e1rio de Bras\u00edlia", "BRT",
                                      "Fuso hor\u00e1rio de ver\u00e3o de Bras\u00edlia", "BRST"};
         String BTT[] = new String[] {"Fuso hor\u00e1rio de But\u00e3o", "BTT",
@@ -77,7 +75,7 @@
                                      "Fuso hor\u00e1rio de ver\u00e3o da Europa Central", "CEST"};
         String CHAST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Chatham", "CHAST",
                                        "Hor\u00e1rio de luz natural de Chatham", "CHADT"};
-        String CIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Central", "CIT",
+        String CIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Central", "WITA",
                                      "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Central", "CIST"};
         String CLT[] = new String[] {"Fuso hor\u00e1rio do Chile", "CLT",
                                      "Fuso hor\u00e1rio de ver\u00e3o do Chile", "CLST"};
@@ -87,8 +85,8 @@
                                      "Hor\u00e1rio de luz natural da China", "CDT"};
         String CUBA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Cuba", "CST",
                                       "Hor\u00e1rio de luz natural de Cuba", "CDT"};
-        String DARWIN[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Territ\u00f3rio do Norte)", "CST",
-                                        "Fuso hor\u00e1rio de ver\u00e3o central (Territ\u00f3rio do Norte)", "CST"};
+        String DARWIN[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Territ\u00F3rio do Norte)", "CST",
+                                        "Fuso Hor\u00E1rio de Ver\u00E3o Central (Territ\u00F3rio do Norte)", "CST"};
         String DUBLIN[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT",
                                         "Fuso hor\u00e1rio de ver\u00e3o da Irlanda", "IST"};
         String EAT[] = new String[] {"Fuso hor\u00e1rio da \u00c1frica Oriental", "EAT",
@@ -101,10 +99,10 @@
                                      "Fuso hor\u00e1rio de ver\u00e3o da Groenl\u00e2ndia Oriental", "EGST"};
         String EST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental", "EST",
                                      "Hor\u00e1rio de luz natural oriental", "EDT"};
-        String EST_NSW[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Nova Gales do Sul)", "EST",
-                                         "Fuso hor\u00e1rio de ver\u00e3o oriental (Nova Gales do Sul)", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String EST_NSW[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Oriental (Nova Gales do Sul)", "EST",
+                                         "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Nova Gales do Sul)", "EST"};
+        String FET[] = new String[] {"Hor\u00E1rio do Extremo Leste Europeu (FET)", "FET",
+                                     "Fuso Hor\u00E1rio de Ver\u00E3o do Extremo Leste Europeu", "FEST"};
         String GHMT[] = new String[] {"Fuso hor\u00e1rio do meridiano de Gana", "GMT",
                                       "Fuso hor\u00e1rio de ver\u00e3o de Gana", "GHST"};
         String GAMBIER[] =  new String[] {"Fuso hor\u00e1rio de Gambier", "GAMT",
@@ -157,8 +155,8 @@
                                           "Hor\u00e1rio de luz natural de Pitcairn", "PDT"};
         String PKT[] = new String[] {"Fuso hor\u00e1rio do Paquist\u00e3o", "PKT",
                                      "Fuso hor\u00e1rio de ver\u00e3o do Paquist\u00e3o", "PKST"};
-        String PONT[] = new String[] {"Fuso hor\u00e1rio de Pohnpei", "PONT",
-                                      "Fuso hor\u00e1rio de ver\u00e3o de Pohnpei", "PONST"};
+        String PONT[] = new String[] {"Fuso Hor\u00E1rio de Pohnpei", "PONT",
+                                      "Fuso Hor\u00E1rio de Ver\u00E3o de Pohnpei", "PONST"};
         String PST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Pac\u00edfico", "PST",
                                      "Hor\u00e1rio de luz natural do Pac\u00edfico", "PDT"};
         String SAST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o da \u00c1frica do Sul", "SAST",
@@ -169,30 +167,30 @@
                                      "Fuso hor\u00e1rio de ver\u00e1 de Cingapura", "SGST"};
         String SLST[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT",
                                       "Fuso hor\u00e1rio de ver\u00e3o de Serra Leoa", "SLST"};
-        String TASMANIA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Tasm\u00e2nia)", "EST",
-                                          "Fuso hor\u00e1rio de ver\u00e3o oriental (Tasm\u00e2nia)", "EST"};
+        String TASMANIA[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Tasm\u00E2nia)", "EST",
+                                          "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Tasm\u00E2nia)", "EST"};
         String TMT[] = new String[] {"Fuso hor\u00e1rio do Turcomenist\u00e3o", "TMT",
                                      "Fuso hor\u00e1rio de ver\u00e3o do Turcomenist\u00e3o", "TMST"};
-        String TRUT[] = new String[] {"Fuso hor\u00e1rio de Chuuk", "CHUT",
-                                      "Fuso hor\u00e1rio de ver\u00e3o de Chuuk", "CHUST"};
+        String TRUT[] = new String[] {"Fuso Hor\u00E1rio de Chuuk", "CHUT",
+                                      "Fuso Hor\u00E1rio de Ver\u00E3o de Chuuk", "CHUST"};
         String ULAT[]= new String[] {"Fuso hor\u00e1rio de Ulan Bator", "ULAT",
                                      "Fuso hor\u00e1rio de ver\u00e3o de Ulan Bator", "ULAST"};
         String WAT[] = new String[] {"Fuso hor\u00e1rio da \u00c1frica Ocidental", "WAT",
                                      "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica Ocidental", "WAST"};
         String WET[] = new String[] {"Fuso hor\u00e1rio da Europa Ocidental", "WET",
                                      "Fuso hor\u00e1rio de ver\u00e3o da Europa Ocidental", "WEST"};
-        String WIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Ocidental", "WIT",
+        String WIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Ocidental", "WIB",
                                      "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Ocidental", "WIST"};
-        String WST_AUS[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o ocidental (Austr\u00e1lia)", "WST",
-                                         "Fuso hor\u00e1rio de ver\u00e3o ocidental (Austr\u00e1lia)", "WST"};
+        String WST_AUS[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Ocidental (Austr\u00E1lia)", "WST",
+                                         "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental (Austr\u00E1lia)", "WST"};
         String SAMOA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Samoa", "SST",
                                        "Hor\u00e1rio de luz natural de Samoa", "SDT"};
         String WST_SAMOA[] = new String[] {"Fuso hor\u00e1rio de Samoa Ocidental", "WST",
                                            "Fuso hor\u00e1rio de ver\u00e3o de Samoa Ocidental", "WSDT"};
         String ChST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Chamorro", "ChST",
                                       "Hor\u00e1rio de luz natural de Chamorro", "ChDT"};
-        String VICTORIA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Victoria)", "EST",
-                                          "Fuso hor\u00e1rio de ver\u00e3o oriental (Victoria)", "EST"};
+        String VICTORIA[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Victoria)", "EST",
+                                          "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Victoria)", "EST"};
         String UTC[] = new String[] {"Tempo universal coordenado", "UTC",
                                      "Tempo universal coordenado", "UTC"};
         String UZT[] = new String[] {"Fuso hor\u00e1rio do Uzbequist\u00e3o", "UZT",
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"Hor\u00E1rio Padr\u00E3o de Metlakatla", "MeST",
+                                                 "Hor\u00E1rio de Luz Natural de Metlakatla", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Fuso hor\u00e1rio padr\u00e3o de S\u00e3o Pedro e Miquelon", "PMST",
                                                "Hor\u00e1rio de luz natural de S\u00e3o Pedro e Miquelon", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "Fuso hor\u00e1rio de ver\u00e3o de Davis", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"Fuso hor\u00e1rio de Dumont-d'Urville", "DDUT",
                                                         "Fuso hor\u00e1rio de ver\u00e3o de Dumont-d'Urville", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"Fuso Hor\u00E1rio da Ilha de Macquarie", "MIST",
+                                                   "Fuso Hor\u00E1rio de Ver\u00E3o da Ilha de Macquarie", "MIST"}},
             {"Antarctica/Mawson", new String[] {"Fuso hor\u00e1rio de Mawson", "MAWT",
                                                 "Fuso hor\u00e1rio de ver\u00e3o de Mawson", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"Fuso hor\u00e1rio de Alma-Ata", "ALMT",
                                           "Fuso hor\u00e1rio de ver\u00e3o de Alma-Ata", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"Fuso hor\u00e1rio de Anadyr", "ANAT",
                                           "Fuso hor\u00e1rio de ver\u00e3o de Anadyr", "ANAST"}},
             {"Asia/Aqtau", new String[] {"Fuso hor\u00e1rio de Aqtau", "AQTT",
@@ -525,7 +523,7 @@
                                            "Fuso hor\u00e1rio de ver\u00e3o de Irkutsk", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Oriental", "EIT",
+            {"Asia/Jayapura", new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Oriental", "WIT",
                                             "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Oriental", "EIST"}},
             {"Asia/Kabul", new String[] {"Fuso hor\u00e1rio do Afeganist\u00e3o", "AFT",
                                          "Fuso hor\u00e1rio de ver\u00e3o do Afeganist\u00e3o", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"Hor\u00E1rio de Khandyga", "YAKT",
+                                            "Hor\u00E1rio de Ver\u00E3o de Khandyga", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Fuso hor\u00e1rio de Krasnoyarsk", "KRAT",
                                                "Fuso hor\u00e1rio de ver\u00e3o de Krasnoyarsk", "KRAST"}},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"Hor\u00E1rio de Ust-Nera", "VLAT",
+                                            "Hor\u00E1rio de Ver\u00E3o de Ust-Nera", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"Fuso hor\u00e1rio de Vladivostok", "VLAT",
                                                "Fuso hor\u00e1rio de ver\u00e3o de Vladivostok", "VLAST"}},
@@ -618,8 +616,8 @@
             {"Australia/Canberra", EST_NSW},
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
-            {"Australia/Eucla", new String[] {"Fuso hor\u00e1rio ocidental central (Austr\u00e1lia)", "CWST",
-                                              "Fuso hor\u00e1rio de ver\u00e3o ocidental central (Austr\u00e1lia)", "CWST"}},
+            {"Australia/Eucla", new String[] {"Fuso Hor\u00E1rio Ocidental Central (Austr\u00E1lia)", "CWST",
+                                              "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental Central (Austr\u00E1lia)", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/sv/LocaleNames_sv.properties	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/sv/LocaleNames_sv.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -1106,7 +1106,7 @@
 WS=Samoa
 YE=Jemen
 YT=Mayotte
-ZA=Sydafrika 
+ZA=Sydafrika
 ZM=Zambia
 ZW=Zimbabwe
 
--- a/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"Acre, normaltid", "ACT",
-                                     "Acre, sommartid", "ACST"};
-        String ADELAIDE[] = new String[] {"Central normaltid (S\u00f6dra Australien)", "CST",
-                                          "Central sommartid (S\u00f6dra Australien)", "CST"};
+        String ADELAIDE[] = new String[] {"Central standardtid (Sydaustralien)", "CST",
+                                          "Central sommartid (South Australia)", "CST"};
         String AGT[] = new String[] {"Argentina, normaltid", "ART",
                                      "Argentina, sommartid", "ARST"};
         String AKST[] = new String[] {"Alaska, normaltid", "AKST",
@@ -63,10 +61,10 @@
                                      "Atlantisk sommartid", "ADT"};
         String BDT[] = new String[] {"Bangladesh, normaltid", "BDT",
                                      "Bangladesh, sommartid", "BDST"};
-        String BRISBANE[] = new String[] {"\u00d6stlig normaltid (Queensland)", "EST",
-                                          "\u00d6stlig sommartid (Queensland)", "EST"};
-        String BROKEN_HILL[] = new String[] {"Central normaltid (S\u00f6dra Australien/Nya Sydwales)", "CST",
-                                             "Central sommartid (S\u00f6dra Australien/Nya Sydwales)", "CST"};
+        String BRISBANE[] = new String[] {"\u00D6stlig standardtid (Queensland)", "EST",
+                                          "\u00D6stlig sommartid (Queensland)", "EST"};
+        String BROKEN_HILL[] = new String[] {"Central standardtid (Sydaustralien)/New South Wales)", "CST",
+                                             "Central sommartid (South Australia/New South Wales)", "CST"};
         String BRT[] = new String[] {"Brasilien, normaltid", "BRT",
                                      "Brasilien, sommartid", "BRST"};
         String BTT[] = new String[] {"Bhutan, normaltid", "BTT",
@@ -77,9 +75,9 @@
                                      "Centraleuropeisk sommartid", "CEST"};
         String CHAST[] = new String[] {"Chatham, normaltid", "CHAST",
                                        "Chatham, sommartid", "CHADT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"Centralindonesisk tid", "CIT",
+        String CHUT[] = new String[] {"Chuuk, normaltid", "CHUT",
+                                      "Chuuk, sommartid", "CHUST"};
+        String CIT[] = new String[] {"Centralindonesisk tid", "WITA",
                                      "Centralindonesisk sommartid", "CIST"};
         String CLT[] = new String[] {"Chile, normaltid", "CLT",
                                      "Chile, sommartid", "CLST"};
@@ -89,7 +87,7 @@
                                      "Kina, sommartid", "CDT"};
         String CUBA[] = new String[] {"Kuba, normaltid", "CST",
                                       "Kuba, sommartid", "CDT"};
-        String DARWIN[] = new String[] {"Central normaltid (Nordterritoriet)", "CST",
+        String DARWIN[] = new String[] {"Central standardtid (Nordterritoriet)", "CST",
                                         "Central sommartid (Nordterritoriet)", "CST"};
         String DUBLIN[] = new String[] {"Greenwichtid", "GMT",
                                         "Irland, sommartid", "IST"};
@@ -103,10 +101,10 @@
                                      "\u00d6stgr\u00f6nl\u00e4ndsk sommartid", "EGST"};
         String EST[] = new String[] {"Eastern, normaltid", "EST",
                                      "Eastern, sommartid", "EDT"};
-        String EST_NSW[] = new String[] {"Eastern, normaltid (Nya Sydwales)", "EST",
-                                         "Eastern, sommartid (Nya Sydwales)", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String EST_NSW[] = new String[] {"\u00D6stlig standardtid (New South Wales)", "EST",
+                                         "\u00D6stlig sommartid (New South Wales)", "EST"};
+        String FET[] = new String[] {"Kaliningradtid", "FET",
+                                     "\u00D6steuropeisk sommartid", "FEST"};
         String GHMT[] = new String[] {"Ghana, normaltid", "GMT",
                                       "Ghana, sommartid", "GHST"};
         String GAMBIER[] =  new String[] {"Gambier, normaltid", "GAMT",
@@ -159,8 +157,8 @@
                                           "Pitcairn, sommartid", "PDT"};
         String PKT[] = new String[] {"Pakistan, normaltid", "PKT",
                                      "Pakistan, sommartid", "PKST"};
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"Pohnpei, normaltid", "PONT",
+                                      "Pohnpei, sommartid", "PONST"};
         String PST[] = new String[] {"Stilla havet, normaltid", "PST",
                                      "Stilla havet, sommartid", "PDT"};
         String SAST[] = new String[] {"Sydafrika, normaltid", "SAST",
@@ -171,8 +169,8 @@
                                      "Singapore, sommartid", "SGST"};
         String SLST[] = new String[] {"Greenwichtid", "GMT",
                                       "Sierra Leone, sommartid", "SLST"};
-        String TASMANIA[] = new String[] {"Eastern, normaltid (Tasmanien)", "EST",
-                                          "Eastern, sommartid (Tasmanien)", "EST"};
+        String TASMANIA[] = new String[] {"\u00D6stlig standardtid (Tasmania)", "EST",
+                                          "\u00D6stlig sommartid (Tasmanien)", "EST"};
         String TMT[] = new String[] {"Turkmenistan, normaltid", "TMT",
                                      "Turkmenistan, sommartid", "TMST"};
         String ULAT[]= new String[] {"Ulaanbaatar, normaltid", "ULAT",
@@ -183,18 +181,18 @@
                                      "V\u00e4stafrikansk sommartid", "WAST"};
         String WET[] = new String[] {"V\u00e4steuropeisk tid", "WET",
                                      "V\u00e4steuropeisk sommartid", "WEST"};
-        String WIT[] = new String[] {"V\u00e4stindonesisk tid", "WIT",
+        String WIT[] = new String[] {"V\u00e4stindonesisk tid", "WIB",
                                      "V\u00e4stindonesisk sommartid", "WIST"};
-        String WST_AUS[] = new String[] {"V\u00e4stlig normaltid (Australien)", "WST",
-                                         "V\u00e4stlig sommartid (Australien)", "WST"};
+        String WST_AUS[] = new String[] {"Western Standard Time (Australien)", "WST",
+                                         "V\u00E4stlig sommartid (Australien)", "WST"};
         String SAMOA[] = new String[] {"Samoa, normaltid", "SST",
                                        "Samoa, sommartid", "SDT"};
         String WST_SAMOA[] = new String[] {"V\u00e4stsamoansk tid", "WST",
                                            "V\u00e4stsamoansk sommartid", "WSDT"};
         String ChST[] = new String[] {"Chamorro, normaltid", "ChST",
                                       "Chamorro, sommartid", "ChDT"};
-        String VICTORIA[] = new String[] {"\u00d6stlig normaltid (Victoria)", "EST",
-                                          "\u00d6stlig sommartid (Victoria)", "EST"};
+        String VICTORIA[] = new String[] {"\u00D6stlig standardtid (Victoria)", "EST",
+                                          "\u00D6stlig sommartid (Victoria)", "EST"};
         String UTC[] = new String[] {"Koordinerad universell tid", "UTC",
                                      "Koordinerad universell tid", "UTC"};
         String UZT[] = new String[] {"Uzbekistan, normaltid", "UZT",
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"Metlakatla, normaltid", "MeST",
+                                                 "Metlakatla, sommartid", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Saint-Pierre-et-Miquelon, normaltid", "PMST",
                                                "Saint-Pierre-et-Miquelon, sommartid", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "Davis, sommartid", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville, normaltid", "DDUT",
                                                         "Dumont-d'Urville, sommartid", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"Macquarie\u00F6n, normaltid", "MIST",
+                                                   "Macquarie\u00F6n, sommartid", "MIST"}},
             {"Antarctica/Mawson", new String[] {"Mawson, normaltid", "MAWT",
                                                 "Mawson, sommartid", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"Alma-Ata, normaltid", "ALMT",
                                           "Alma-Ata, sommartid", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"Anadyr, normaltid", "ANAT",
                                           "Anadyr, sommartid", "ANAST"}},
             {"Asia/Aqtau", new String[] {"Aqtau, normaltid", "AQTT",
@@ -525,7 +523,7 @@
                                            "Irkutsk, sommartid", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"\u00d6stindonesisk tid", "EIT",
+            {"Asia/Jayapura", new String[] {"\u00d6stindonesisk tid", "WIT",
                                             "\u00d6stindonesisk sommartid", "EIST"}},
             {"Asia/Kabul", new String[] {"Afghanistan, normaltid", "AFT",
                                          "Afghanistan, sommartid", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"Khandyga, normaltid", "YAKT",
+                                            "Khandyga, sommartid", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"Krasnojarsk, normaltid", "KRAT",
                                                "Krasnojarsk, sommartid", "KRAST"}},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"Ust-Nera, normaltid", "VLAT",
+                                            "Ust-Nera, sommartid", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"Vladivostok, normaltid", "VLAT",
                                                "Vladivostok, sommartid", "VLAST"}},
@@ -618,8 +616,8 @@
             {"Australia/Canberra", EST_NSW},
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
-            {"Australia/Eucla", new String[] {"Central v\u00e4stlig normaltid (Australien)", "CWST",
-                                              "Central v\u00e4stlig sommartid (Australien)", "CWST"}},
+            {"Australia/Eucla", new String[] {"Central v\u00E4stlig normaltid (Australien)", "CWST",
+                                              "Central v\u00E4stlig sommartid (Australien)", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"Acre \u65f6\u95f4", "ACT",
-                                     "Acre \u590f\u4ee4\u65f6", "ACST"};
-        String ADELAIDE[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5357\u6fb3\u5927\u5229\u4e9a\uff09", "CST",
-                                          "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5357\u6fb3\u5927\u5229\u4e9a\uff09", "CST"};
+        String ADELAIDE[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST",
+                                          "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST"};
         String AGT[] = new String[] {"\u963f\u6839\u5ef7\u65f6\u95f4", "ART",
                                      "\u963f\u6839\u5ef7\u590f\u4ee4\u65f6", "ARST"};
         String AKST[] = new String[] {"\u963f\u62c9\u65af\u52a0\u6807\u51c6\u65f6\u95f4", "AKST",
@@ -63,10 +61,10 @@
                                      "\u5927\u897f\u6d0b\u590f\u4ee4\u65f6", "ADT"};
         String BDT[] = new String[] {"\u5b5f\u52a0\u62c9\u65f6\u95f4", "BDT",
                                      "\u5b5f\u52a0\u62c9\u590f\u4ee4\u65f6", "BDST"};
-        String BRISBANE[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6606\u58eb\u5170\uff09", "EST",
-                                          "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u6606\u58eb\u5170\uff09", "EST"};
-        String BROKEN_HILL[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5357\u6fb3\u5927\u5229\u4e9a/\u65b0\u5357\u5a01\u5c14\u65af\uff09", "CST",
-                                             "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5357\u6fb3\u5927\u5229\u4e9a/\u65b0\u5357\u5a01\u5c14\u65af\uff09", "CST"};
+        String BRISBANE[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u6606\u58EB\u5170)", "EST",
+                                          "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u6606\u58EB\u5170)", "EST"};
+        String BROKEN_HILL[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST",
+                                             "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST"};
         String BRT[] = new String[] {"\u5df4\u897f\u5229\u4e9a\u65f6\u95f4", "BRT",
                                      "\u5df4\u897f\u5229\u4e9a\u590f\u4ee4\u65f6", "BRST"};
         String BTT[] = new String[] {"\u4e0d\u4e39\u65f6\u95f4", "BTT",
@@ -77,9 +75,9 @@
                                      "\u4e2d\u6b27\u590f\u4ee4\u65f6", "CEST"};
         String CHAST[] = new String[] {"\u67e5\u8428\u59c6\u6807\u51c6\u65f6\u95f4", "CHAST",
                                        "\u67e5\u8428\u59c6\u590f\u4ee4\u65f6", "CHADT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "CIT",
+        String CHUT[] = new String[] {"\u4E18\u514B\u65F6\u95F4", "CHUT",
+                                      "\u4E18\u514B\u590F\u4EE4\u65F6", "CHUST"};
+        String CIT[] = new String[] {"\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WITA",
                                      "\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "CIST"};
         String CLT[] = new String[] {"\u667a\u5229\u65f6\u95f4", "CLT",
                                      "\u667a\u5229\u590f\u4ee4\u65f6", "CLST"};
@@ -89,8 +87,8 @@
                                      "\u4e2d\u56fd\u590f\u4ee4\u65f6", "CDT"};
         String CUBA[] = new String[] {"\u53e4\u5df4\u6807\u51c6\u65f6\u95f4", "CST",
                                       "\u53e4\u5df4\u590f\u4ee4\u65f6", "CDT"};
-        String DARWIN[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5317\u9886\u5730\uff09", "CST",
-                                        "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5317\u9886\u5730\uff09", "CST"};
+        String DARWIN[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5317\u9886\u5730)", "CST",
+                                        "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5317\u9886\u5730)", "CST"};
         String DUBLIN[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT",
                                         "\u7231\u5c14\u5170\u590f\u4ee4\u65f6", "IST"};
         String EAT[] = new String[] {"\u4e1c\u975e\u65f6\u95f4", "EAT",
@@ -103,10 +101,10 @@
                                      "\u4e1c\u683c\u6797\u5c9b\u590f\u4ee4\u65f6", "EGST"};
         String EST[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4", "EST",
                                      "\u4e1c\u90e8\u590f\u4ee4\u65f6", "EDT"};
-        String EST_NSW[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09", "EST",
-                                         "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String EST_NSW[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST",
+                                         "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST"};
+        String FET[] = new String[] {"\u8FDC\u4E1C\u6B27\u65F6\u95F4", "FET",
+                                     "\u8FDC\u4E1C\u6B27\u590F\u4EE4\u65F6", "FEST"};
         String GHMT[] = new String[] {"\u52a0\u7eb3\u65f6\u95f4", "GMT",
                                      "\u52a0\u7eb3\u590f\u4ee4\u65f6", "GHST"};
         String GAMBIER[] =  new String[] {"\u5188\u6bd4\u4e9a\u65f6\u95f4", "GAMT",
@@ -159,8 +157,8 @@
                                           "\u76ae\u7279\u5eb7\u5c9b\u590f\u4ee4\u65f6", "PDT"};
         String PKT[] = new String[] {"\u5df4\u57fa\u65af\u5766\u65f6\u95f4", "PKT",
                                      "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u65f6", "PKST"};
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"\u6CE2\u7EB3\u4F69\u65F6\u95F4", "PONT",
+                                      "\u6CE2\u7EB3\u4F69\u590F\u4EE4\u65F6", "PONST"};
         String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6807\u51c6\u65f6\u95f4", "PST",
                                      "\u592a\u5e73\u6d0b\u590f\u4ee4\u65f6", "PDT"};
         String SAST[] = new String[] {"\u5357\u975e\u6807\u51c6\u65f6\u95f4", "SAST",
@@ -171,8 +169,8 @@
                                      "\u65b0\u52a0\u5761\u590f\u4ee4\u65f6", "SGST"};
         String SLST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT",
                                       "\u585e\u62c9\u5229\u6602\u590f\u4ee4\u65f6", "SLST"};
-        String TASMANIA[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u5854\u65af\u9a6c\u5c3c\u4e9a\uff09", "EST",
-                                          "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u5854\u65af\u9a6c\u5c3c\u4e9a\uff09", "EST"};
+        String TASMANIA[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST",
+                                          "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST"};
         String TMT[] = new String[] {"\u571f\u5e93\u66fc\u65f6\u95f4", "TMT",
                                      "\u571f\u5e93\u66fc\u590f\u4ee4\u65f6", "TMST"};
         String ULAT[]= new String[] {"\u5e93\u4f26\u65f6\u95f4", "ULAT",
@@ -183,18 +181,18 @@
                                      "\u897f\u975e\u590f\u4ee4\u65f6", "WAST"};
         String WET[] = new String[] {"\u897f\u6b27\u65f6\u95f4", "WET",
                                      "\u897f\u6b27\u590f\u4ee4\u65f6", "WEST"};
-        String WIT[] = new String[] {"\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIT",
+        String WIT[] = new String[] {"\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIB",
                                      "\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "WIST"};
-        String WST_AUS[] = new String[] {"\u897f\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "WST",
-                                         "\u897f\u90e8\u590f\u4ee4\u65f6\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "WST"};
+        String WST_AUS[] = new String[] {"\u897F\u90E8\u6807\u51C6\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "WST",
+                                         "\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "WST"};
         String SAMOA[] = new String[] {"\u8428\u6469\u4e9a\u7fa4\u5c9b\u6807\u51c6\u65f6\u95f4", "SST",
                                        "\u8428\u6469\u4e9a\u7fa4\u5c9b\u590f\u4ee4\u65f6", "SDT"};
         String WST_SAMOA[] = new String[] {"\u897f\u8428\u6469\u4e9a\u65f6\u95f4", "WST",
                                            "\u897f\u8428\u6469\u4e9a\u590f\u4ee4\u65f6", "WSDT"};
         String ChST[] = new String[] {"Chamorro \u6807\u51c6\u65f6\u95f4", "ChST",
                                       "Chamorro \u590f\u4ee4\u65f6", "ChDT"};
-        String VICTORIA[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u7ef4\u591a\u5229\u4e9a\uff09", "EST",
-                                          "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u7ef4\u591a\u5229\u4e9a\uff09", "EST"};
+        String VICTORIA[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u7EF4\u591A\u5229\u4E9A)", "EST",
+                                          "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u7EF4\u591A\u5229\u4E9A)", "EST"};
         String UTC[] = new String[] {"\u534f\u8c03\u4e16\u754c\u65f6\u95f4", "UTC",
                                      "\u534f\u8c03\u4e16\u754c\u65f6\u95f4", "UTC"};
         String UZT[] = new String[] {"\u4e4c\u5179\u522b\u514b\u65af\u5766\u65f6\u95f4", "UZT",
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"\u6885\u7279\u62C9\u5361\u7279\u62C9\u6807\u51C6\u65F6\u95F4", "MeST",
+                                                 "\u6885\u7279\u62C9\u5361\u7279\u62C9\u590F\u4EE4\u65F6", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u6807\u51c6\u65f6\u95f4", "PMST",
                                                "\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u590f\u4ee4\u65f6", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "\u6234\u7ef4\u65af\u590f\u4ee4\u65f6", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville \u65f6\u95f4", "DDUT",
                                                         "Dumont-d'Urville \u590f\u4ee4\u65f6", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"\u9EA6\u5938\u91CC\u5C9B\u65F6\u95F4", "MIST",
+                                                   "\u9EA6\u5938\u91CC\u5C9B\u590F\u4EE4\u65F6", "MIST"}},
             {"Antarctica/Mawson", new String[] {"\u83ab\u68ee\u65f6\u95f4", "MAWT",
                                                 "\u83ab\u68ee\u590f\u4ee4\u65f6", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"Alma-Ata \u65f6\u95f4", "ALMT",
                                           "Alma-Ata \u590f\u4ee4\u65f6", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"\u963f\u90a3\u5e95\u6cb3\u65f6\u95f4", "ANAT",
                                           "\u963f\u90a3\u5e95\u6cb3\u590f\u4ee4\u65f6", "ANAST"}},
             {"Asia/Aqtau", new String[] {"Aqtau \u65f6\u95f4", "AQTT",
@@ -525,7 +523,7 @@
                                            "\u4f0a\u5c14\u5e93\u6b21\u514b\u590f\u4ee4\u65f6", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "EIT",
+            {"Asia/Jayapura", new String[] {"\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIT",
                                             "\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "EIST"}},
             {"Asia/Kabul", new String[] {"\u963f\u5bcc\u6c57\u65f6\u95f4", "AFT",
                                          "\u963f\u5bcc\u6c57\u590f\u4ee4\u65f6", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"\u6C49\u5FB7\u52A0\u65F6\u95F4", "YAKT",
+                                            "\u6C49\u5FB7\u52A0\u590F\u4EE4\u65F6", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u65f6\u95f4", "KRAT",
                                                "\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u590f\u4ee4\u65f6", "KRAST"}},
@@ -585,8 +583,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"\u4E4C\u65AF\u5B63\u6D85\u62C9\u65F6\u95F4", "VLAT",
+                                            "\u4E4C\u65AF\u5B63\u6D85\u62C9\u590F\u4EE4\u65F6", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"\u6d77\u53c2\u5d34\u65f6\u95f4", "VLAT",
                                                "\u6d77\u53c2\u5d34\u590f\u4ee4\u65f6", "VLAST"}},
@@ -618,8 +616,8 @@
             {"Australia/Canberra", EST_NSW},
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
-            {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "CWST",
-                                              "\u4e2d\u897f\u90e8\u590f\u4ee4\u65f6\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "CWST"}},
+            {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6807\u51C6\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "CWST",
+                                              "\u4E2D\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -675,6 +673,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java	Wed Oct 30 18:38:20 2013 +0000
@@ -45,10 +45,8 @@
 public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
 
     protected final Object[][] getContents() {
-        String ACT[] = new String[] {"Acre \u6642\u9593", "ACT",
-                                     "Acre \u590f\u4ee4\u6642\u9593", "ACST"};
-        String ADELAIDE[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340)", "CST",
-                                          "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340)", "CST"};
+        String ADELAIDE[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u90E8)", "CST",
+                                          "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340)", "CST"};
         String AGT[] = new String[] {"\u963f\u6839\u5ef7\u6642\u9593", "ART",
                                      "\u963f\u6839\u5ef7\u590f\u4ee4\u6642\u9593", "ARST"};
         String AKST[] = new String[] {"\u963f\u62c9\u65af\u52a0\u6a19\u6e96\u6642\u9593", "AKST",
@@ -63,10 +61,10 @@
                                      "\u5927\u897f\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ADT"};
         String BDT[] = new String[] {"\u5b5f\u52a0\u62c9\u6642\u9593", "BDT",
                                      "\u5b5f\u52a0\u62c9\u590f\u4ee4\u6642\u9593", "BDST"};
-        String BRISBANE[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u6606\u58eb\u862d)", "EST",
-                                          "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u6606\u58eb\u862d)", "EST"};
-        String BROKEN_HILL[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340/\u65b0\u5357\u5a01\u723e\u65af)", "CST",
-                                             "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340/\u65b0\u5357\u5a01\u723e\u65af)", "CST"};
+        String BRISBANE[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u6606\u58EB\u862D)", "EST",
+                                          "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u6606\u58EB\u862D)", "EST"};
+        String BROKEN_HILL[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST",
+                                             "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST"};
         String BRT[] = new String[] {"\u5df4\u897f\u5229\u4e9e\u6642\u9593", "BRT",
                                      "\u5df4\u897f\u5229\u4e9e\u590f\u4ee4\u6642\u9593", "BRST"};
         String BTT[] = new String[] {"\u4e0d\u4e39\u6642\u9593", "BTT",
@@ -77,9 +75,9 @@
                                      "\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "CEST"};
         String CHAST[] = new String[] {"\u67e5\u5766\u6a19\u6e96\u6642\u9593", "CHAST",
                                        "\u67e5\u5766\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CHADT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
-        String CIT[] = new String[] {"\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "CIT",
+        String CHUT[] = new String[] {"\u695A\u514B\u6642\u9593", "CHUT",
+                                      "\u695A\u514B\u590F\u4EE4\u6642\u9593", "CHUST"};
+        String CIT[] = new String[] {"\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "WITA",
                                      "\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u4ee4\u6642\u9593", "CIST"};
         String CLT[] = new String[] {"\u667a\u5229\u6642\u9593", "CLT",
                                      "\u667a\u5229\u590f\u4ee4\u6642\u9593", "CLST"};
@@ -89,8 +87,8 @@
                                      "\u4e2d\u570b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"};
         String CUBA[] = new String[] {"\u53e4\u5df4\u6a19\u6e96\u6642\u9593", "CST",
                                       "\u53e4\u5df4\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"};
-        String DARWIN[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u5317\u90e8\u5404\u5730\u5340)", "CST",
-                                        "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u5317\u90e8\u5404\u5730\u5340)", "CST"};
+        String DARWIN[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST",
+                                        "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST"};
         String DUBLIN[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT",
                                         "\u611b\u723e\u862d\u590f\u4ee4\u6642\u9593", "IST"};
         String EAT[] = new String[] {"\u6771\u975e\u6642\u9593", "EAT",
@@ -103,10 +101,10 @@
                                      "\u6771\u683c\u6797\u5cf6\u590f\u4ee4\u6642\u9593", "EGST"};
         String EST[] = new String[] {"\u6771\u65b9\u6a19\u6e96\u6642\u9593", "EST",
                                      "\u6771\u65b9\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "EDT"};
-        String EST_NSW[] = new String[] {"\u6771\u65b9\u6a19\u6e96\u6642\u9593 (\u65b0\u5357\u5a01\u723e\u65af)", "EST",
-                                         "\u6771\u65b9\u590f\u4ee4\u6642\u9593 (\u65b0\u5357\u5a01\u723e\u65af)", "EST"};
-        String FET[] = new String[] {"Further-eastern European Time", "FET",
-                                     "Further-eastern European Summer Time", "FEST"};
+        String EST_NSW[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST",
+                                         "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST"};
+        String FET[] = new String[] {"\u6771\u6B50\u5167\u9678\u6642\u9593", "FET",
+                                     "\u6771\u6B50\u5167\u9678\u590F\u4EE4\u6642\u9593", "FEST"};
         String GHMT[] = new String[] {"\u8fe6\u7d0d\u5e73\u5747\u6642\u9593", "GMT",
                                       "\u8fe6\u7d0d\u590f\u4ee4\u6642\u9593", "GHST"};
         String GAMBIER[] =  new String[] {"\u7518\u6bd4\u723e\u6642\u9593", "GAMT",
@@ -159,8 +157,8 @@
                                         "\u76ae\u7279\u5eb7\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT"};
         String PKT[] = new String[] {"\u5df4\u57fa\u65af\u5766\u6642\u9593", "PKT",
                                      "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u6642\u9593", "PKST"};
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"\u6CE2\u7D0D\u4F69\u6642\u9593", "PONT",
+                                      "\u6CE2\u7D0D\u4F69\u590F\u4EE4\u6642\u9593", "PONST"};
         String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6a19\u6e96\u6642\u9593", "PST",
                                      "\u592a\u5e73\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT"};
         String SAST[] = new String[] {"\u5357\u975e\u6a19\u6e96\u6642\u9593", "SAST",
@@ -171,8 +169,8 @@
                                      "\u65b0\u52a0\u5761\u590f\u4ee4\u6642\u9593", "SGST"};
         String SLST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT",
                                       "\u7345\u5b50\u5c71\u590f\u4ee4\u6642\u9593", "SLST"};
-        String TASMANIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u5854\u65af\u6885\u5c3c\u4e9e\u5cf6)", "EST",
-                                          "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u5854\u65af\u6885\u5c3c\u4e9e\u5cf6)", "EST"};
+        String TASMANIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST",
+                                          "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST"};
         String TMT[] = new String[] {"\u571f\u5eab\u66fc\u6642\u9593", "TMT",
                                      "\u571f\u5eab\u66fc\u590f\u4ee4\u6642\u9593", "TMST"};
         String ULAT[]= new String[] {"\u5eab\u502b\u6642\u9593", "ULAT",
@@ -183,18 +181,18 @@
                                      "\u897f\u975e\u590f\u4ee4\u6642\u9593", "WAST"};
         String WET[] = new String[] {"\u897f\u6b50\u6642\u9593", "WET",
                                      "\u897f\u6b50\u590f\u4ee4\u6642\u9593", "WEST"};
-        String WIT[] = new String[] {"\u897f\u5370\u5c3c\u6642\u9593", "WIT",
+        String WIT[] = new String[] {"\u897f\u5370\u5c3c\u6642\u9593", "WIB",
                                      "\u897f\u5370\u5c3c\u590f\u4ee4\u6642\u9593", "WIST"};
-        String WST_AUS[] = new String[] {"\u897f\u65b9\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "WST",
-                                         "\u897f\u65b9\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "WST"};
+        String WST_AUS[] = new String[] {"\u897F\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST",
+                                         "\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST"};
         String SAMOA[] = new String[] {"\u85a9\u6469\u4e9e\u6a19\u6e96\u6642\u9593", "SST",
                                        "\u85a9\u6469\u4e9e\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "SDT"};
         String WST_SAMOA[] = new String[] {"\u897f\u85a9\u6469\u4e9e\u6642\u9593", "WST",
                                            "\u897f\u85a9\u6469\u4e9e\u590f\u4ee4\u6642\u9593", "WSDT"};
         String ChST[] = new String[] {"\u67e5\u83ab\u6d1b\u6a19\u6e96\u6642\u9593", "ChST",
                                      "\u67e5\u83ab\u6d1b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ChDT"};
-        String VICTORIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u7dad\u591a\u5229\u4e9e\u90a6)", "EST",
-                                          "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u7dad\u591a\u5229\u4e9e\u90a6)", "EST"};
+        String VICTORIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST",
+                                          "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST"};
         String UTC[] = new String[] {"\u5354\u8abf\u4e16\u754c\u6642\u9593", "UTC",
                                      "\u5354\u8abf\u4e16\u754c\u6642\u9593", "UTC"};
         String UZT[] = new String[] {"\u70cf\u8332\u5225\u514b\u65af\u5766\u6642\u9593", "UZT",
@@ -306,7 +304,7 @@
             {"America/Argentina/Rio_Gallegos", AGT},
             {"America/Argentina/Salta", AGT},
             {"America/Argentina/San_Juan", AGT},
-            {"America/Argentina/San_Luis", WART},
+            {"America/Argentina/San_Luis", AGT},
             {"America/Argentina/Tucuman", AGT},
             {"America/Argentina/Ushuaia", AGT},
             {"America/Aruba", AST},
@@ -399,8 +397,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"\u6885\u7279\u62C9\u5361\u7279\u62C9\u6A19\u6E96\u6642\u9593", "MeST",
+                                                 "\u6885\u7279\u62C9\u5361\u7279\u62C9\u65E5\u5149\u7BC0\u7D04\u6642\u9593", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u6a19\u6e96\u6642\u9593", "PMST",
                                                "\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PMDT"}},
@@ -464,8 +462,8 @@
                                                "\u81fa\u7dad\u65af\u590f\u4ee4\u6642\u9593", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville \u6642\u9593", "DDUT",
                                                         "Dumont-d'Urville \u590f\u4ee4\u6642\u9593", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"\u9EA5\u5938\u5229\u5CF6\u6642\u9593", "MIST",
+                                                   "\u9EA5\u5938\u5229\u5CF6\u590F\u4EE4\u6642\u9593", "MIST"}},
             {"Antarctica/Mawson", new String[] {"\u83ab\u68ee\u6642\u9593", "MAWT",
                                                 "\u83ab\u68ee\u590f\u4ee4\u6642\u9593", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
@@ -481,7 +479,7 @@
             {"Asia/Aden", ARAST},
             {"Asia/Almaty", new String[] {"Alma-Ata \u6642\u9593", "ALMT",
                                           "Alma-Ata \u590f\u4ee4\u6642\u9593", "ALMST"}},
-            {"Asia/Amman", EET},
+            {"Asia/Amman", ARAST},
             {"Asia/Anadyr", new String[] {"\u963f\u90a3\u5e95\u6cb3\u6642\u9593", "ANAT",
                                           "\u963f\u90a3\u5e95\u6cb3\u590f\u4ee4\u6642\u9593", "ANAST"}},
             {"Asia/Aqtau", new String[] {"Aqtau \u6642\u9593", "AQTT",
@@ -525,7 +523,7 @@
                                            "Irkutsk \u590f\u4ee4\u6642\u9593", "IRKST"}},
             {"Asia/Istanbul", EET},
             {"Asia/Jakarta", WIT},
-            {"Asia/Jayapura", new String[] {"\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "EIT",
+            {"Asia/Jayapura", new String[] {"\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "WIT",
                                             "\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u65e5\u6642\u9593", "EIST"}},
             {"Asia/Kabul", new String[] {"\u963f\u5bcc\u6c57\u6642\u9593", "AFT",
                                          "\u963f\u5bcc\u6c57\u590f\u4ee4\u6642\u9593", "AFST"}},
@@ -535,8 +533,8 @@
             {"Asia/Kashgar", CTT},
             {"Asia/Kathmandu", NPT},
             {"Asia/Katmandu", NPT},
-            {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT",
-                                            "Khandyga Summer Time", "YAKST"}},
+            {"Asia/Khandyga", new String[] {"\u6F22\u5730\u52A0 (Khandyga) \u6642\u9593", "YAKT",
+                                            "\u6F22\u5730\u52A0 (Khandyga) \u590F\u4EE4\u6642\u9593", "YAKST"}},
             {"Asia/Kolkata", IST},
             {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u6642\u9593", "KRAT",
                                                "\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u590f\u4ee4\u6642\u9593", "KRAST"}},
@@ -586,8 +584,8 @@
             {"Asia/Ulaanbaatar", ULAT},
             {"Asia/Ulan_Bator", ULAT},
             {"Asia/Urumqi", CTT},
-            {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT",
-                                            "Ust-Nera Summer Time", "VLAST"}},
+            {"Asia/Ust-Nera", new String[] {"\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u6642\u9593", "VLAT",
+                                            "\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u590F\u4EE4\u6642\u9593", "VLAST"}},
             {"Asia/Vientiane", ICT},
             {"Asia/Vladivostok", new String[] {"\u6d77\u53c3\u5d34\u6642\u9593", "VLAT",
                                                "\u6d77\u53c3\u5d34\u590f\u4ee4\u6642\u9593", "VLAST"}},
@@ -619,8 +617,8 @@
             {"Australia/Canberra", EST_NSW},
             {"Australia/Currie", EST_NSW},
             {"Australia/Darwin", DARWIN},
-            {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "CWST",
-                                              "\u4e2d\u897f\u90e8\u65e5\u5149\u7bc0\u7d04\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "CWST"}},
+            {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST",
+                                              "\u4E2D\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST"}},
             {"Australia/Hobart", TASMANIA},
             {"Australia/LHI", LORD_HOWE},
             {"Australia/Lindeman", BRISBANE},
@@ -676,6 +674,7 @@
             {"Europe/Bratislava", CET},
             {"Europe/Brussels", CET},
             {"Europe/Budapest", CET},
+            {"Europe/Busingen", CET},
             {"Europe/Chisinau", EET},
             {"Europe/Copenhagen", CET},
             {"Europe/Dublin", DUBLIN},
--- a/src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java	Wed Oct 30 18:38:20 2013 +0000
@@ -28,6 +28,7 @@
 import java.io.*;
 import java.util.*;
 import java.nio.charset.*;
+import java.util.Map.Entry;
 import org.xml.sax.*;
 import org.w3c.dom.*;
 import javax.xml.parsers.*;
@@ -153,11 +154,15 @@
         }
 
         synchronized (props) {
-            for (String key : props.stringPropertyNames()) {
-                Element entry = (Element)properties.appendChild(
-                    doc.createElement("entry"));
-                entry.setAttribute("key", key);
-                entry.appendChild(doc.createTextNode(props.getProperty(key)));
+            for (Entry<Object, Object> e : props.entrySet()) {
+                final Object k = e.getKey();
+                final Object v = e.getValue();
+                if (k instanceof String && v instanceof String) {
+                    Element entry = (Element)properties.appendChild(
+                        doc.createElement("entry"));
+                    entry.setAttribute("key", (String)k);
+                    entry.appendChild(doc.createTextNode((String)v));
+                }
             }
         }
         emitDocument(doc, os, encoding);
--- a/src/share/demo/jfc/Notepad/resources/Notepad_fr.properties	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-#
-# Resource strings for Notepad example
-
-Title=Notepad
-
-# Menu labels
-fileLabel=Fichier
-openLabel=Ouvrir
-newLabel=Nouveau
-saveLabel=Sauver
-exitLabel=Quitter
-
-editLabel=Edition
-cutLabel=Couper
-copyLabel=Copier
-pasteLabel=Coller
-
--- a/src/share/demo/jfc/Notepad/resources/Notepad_sv.properties	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-#
-# Resource strings for Notepad example
-
-Title=Notepad
-
-# Menu labels
-fileLabel=Arkiv
-openLabel=Öppna
-newLabel=Ny
-saveLabel=Spara
-exitLabel=Avsluta
-
-editLabel=Redigera
-cutLabel=Klippa
-copyLabel=Kopiera
-pasteLabel=Klistra
-
--- a/src/share/demo/jvmti/hprof/hprof_class.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/demo/jvmti/hprof/hprof_class.c	Wed Oct 30 18:38:20 2013 +0000
@@ -527,7 +527,12 @@
     jmethodID  method;
 
     info = get_info(index);
-    HPROF_ASSERT(mnum < info->method_count);
+    if (mnum >= info->method_count) {
+        jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
+        (*env)->ThrowNew(env, newExcCls, "Illegal mnum");
+
+        return NULL;
+    }
     method = info->method[mnum].method_id;
     if ( method == NULL ) {
         char * name;
@@ -535,7 +540,12 @@
         jclass clazz;
 
         name  = (char *)string_get(info->method[mnum].name_index);
-        HPROF_ASSERT(name!=NULL);
+        if (name==NULL) {
+            jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
+            (*env)->ThrowNew(env, newExcCls, "Name not found");
+
+            return NULL;
+        }
         sig   = (char *)string_get(info->method[mnum].sig_index);
         HPROF_ASSERT(sig!=NULL);
         clazz = class_get_class(env, index);
--- a/src/share/demo/jvmti/hprof/hprof_event.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/demo/jvmti/hprof/hprof_event.c	Wed Oct 30 18:38:20 2013 +0000
@@ -195,7 +195,12 @@
 
     HPROF_ASSERT(env!=NULL);
     HPROF_ASSERT(thread!=NULL);
-    HPROF_ASSERT(cnum!=0 && cnum!=gdata->tracker_cnum);
+    if (cnum == 0 || cnum == gdata->tracker_cnum) {
+        jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
+        (*env)->ThrowNew(env, newExcCls, "Illegal cnum.");
+
+        return;
+    }
 
     /* Prevent recursion into any BCI function for this thread (pstatus). */
     if ( tls_get_tracker_status(env, thread, JNI_FALSE,
@@ -204,8 +209,10 @@
 
         (*pstatus) = 1;
         method      = class_get_methodID(env, cnum, mnum);
-        HPROF_ASSERT(method!=NULL);
-        tls_push_method(tls_index, method);
+        if (method != NULL) {
+            tls_push_method(tls_index, method);
+        }
+
         (*pstatus) = 0;
     }
 }
@@ -248,7 +255,13 @@
 
     HPROF_ASSERT(env!=NULL);
     HPROF_ASSERT(thread!=NULL);
-    HPROF_ASSERT(cnum!=0 && cnum!=gdata->tracker_cnum);
+
+    if (cnum == 0 || cnum == gdata->tracker_cnum) {
+        jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
+        (*env)->ThrowNew(env, newExcCls, "Illegal cnum.");
+
+        return;
+    }
 
     /* Prevent recursion into any BCI function for this thread (pstatus). */
     if ( tls_get_tracker_status(env, thread, JNI_FALSE,
@@ -257,8 +270,10 @@
 
         (*pstatus) = 1;
         method      = class_get_methodID(env, cnum, mnum);
-        HPROF_ASSERT(method!=NULL);
-        tls_pop_method(tls_index, thread, method);
+        if (method != NULL) {
+            tls_pop_method(tls_index, thread, method);
+        }
+
         (*pstatus) = 0;
     }
 }
--- a/src/share/javavm/export/jvm.h	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/javavm/export/jvm.h	Wed Oct 30 18:38:20 2013 +0000
@@ -351,7 +351,7 @@
  * java.lang.Class and java.lang.ClassLoader
  */
 
-#define JVM_DEPTH -1
+#define JVM_CALLER_DEPTH -1
 
 /*
  * Returns the immediate caller class of the native method invoking
--- a/src/share/lib/security/java.security-linux	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/lib/security/java.security-linux	Wed Oct 30 18:38:20 2013 +0000
@@ -183,6 +183,7 @@
                com.sun.jmx.,\
                com.sun.media.sound.,\
                com.sun.proxy.,\
+               com.sun.corba.se.,\
                com.sun.org.apache.bcel.internal.,\
                com.sun.org.apache.regexp.internal.,\
                com.sun.org.apache.xerces.internal.,\
@@ -228,6 +229,7 @@
                    com.sun.jmx.,\
                    com.sun.media.sound.,\
                    com.sun.proxy.,\
+                   com.sun.corba.se.,\
                    com.sun.org.apache.bcel.internal.,\
                    com.sun.org.apache.regexp.internal.,\
                    com.sun.org.apache.xerces.internal.,\
--- a/src/share/lib/security/java.security-macosx	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/lib/security/java.security-macosx	Wed Oct 30 18:38:20 2013 +0000
@@ -184,6 +184,7 @@
                com.sun.jmx.,\
                com.sun.media.sound.,\
                com.sun.proxy.,\
+               com.sun.corba.se.,\
                com.sun.org.apache.bcel.internal.,\
                com.sun.org.apache.regexp.internal.,\
                com.sun.org.apache.xerces.internal.,\
@@ -205,12 +206,12 @@
                com.sun.org.glassfish.,\
                com.oracle.xmlns.internal.,\
                com.oracle.webservices.internal.,\
+               oracle.jrockit.jfr.,\
                org.jcp.xml.dsig.internal.,\
                jdk.internal.,\
                jdk.nashorn.internal.,\
                jdk.nashorn.tools.,\
-               apple.,\
-               oracle.jrockit.jfr.
+               apple.
 
 #
 # List of comma-separated packages that start with or equal this string
@@ -229,6 +230,7 @@
                    com.sun.jmx.,\
                    com.sun.media.sound.,\
                    com.sun.proxy.,\
+                   com.sun.corba.se.,\
                    com.sun.org.apache.bcel.internal.,\
                    com.sun.org.apache.regexp.internal.,\
                    com.sun.org.apache.xerces.internal.,\
@@ -250,12 +252,12 @@
                    com.sun.org.glassfish.,\
                    com.oracle.xmlns.internal.,\
                    com.oracle.webservices.internal.,\
+                   oracle.jrockit.jfr.,\
                    org.jcp.xml.dsig.internal.,\
                    jdk.internal.,\
                    jdk.nashorn.internal.,\
                    jdk.nashorn.tools.,\
-                   apple.,\
-                   oracle.jrockit.jfr.
+                   apple.
 
 #
 # Determines whether this properties file can be appended to
--- a/src/share/lib/security/java.security-solaris	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/lib/security/java.security-solaris	Wed Oct 30 18:38:20 2013 +0000
@@ -185,6 +185,7 @@
                com.sun.jmx.,\
                com.sun.media.sound.,\
                com.sun.proxy.,\
+               com.sun.corba.se.,\
                com.sun.org.apache.bcel.internal.,\
                com.sun.org.apache.regexp.internal.,\
                com.sun.org.apache.xerces.internal.,\
@@ -229,6 +230,7 @@
                    com.sun.jmx.,\
                    com.sun.media.sound.,\
                    com.sun.proxy.,\
+                   com.sun.corba.se.,\
                    com.sun.org.apache.bcel.internal.,\
                    com.sun.org.apache.regexp.internal.,\
                    com.sun.org.apache.xerces.internal.,\
--- a/src/share/lib/security/java.security-windows	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/lib/security/java.security-windows	Wed Oct 30 18:38:20 2013 +0000
@@ -184,6 +184,7 @@
                com.sun.jmx.,\
                com.sun.media.sound.,\
                com.sun.proxy.,\
+               com.sun.corba.se.,\
                com.sun.org.apache.bcel.internal.,\
                com.sun.org.apache.regexp.internal.,\
                com.sun.org.apache.xerces.internal.,\
@@ -229,6 +230,7 @@
                    com.sun.jmx.,\
                    com.sun.media.sound.,\
                    com.sun.proxy.,\
+                   com.sun.corba.se.,\
                    com.sun.org.apache.bcel.internal.,\
                    com.sun.org.apache.regexp.internal.,\
                    com.sun.org.apache.xerces.internal.,\
--- a/src/share/native/com/sun/java/util/jar/pack/zip.cpp	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/com/sun/java/util/jar/pack/zip.cpp	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, 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
@@ -62,7 +62,7 @@
 
 #endif // End of ZLIB
 
-#ifdef sparc
+#ifdef _BIG_ENDIAN
 #define SWAP_BYTES(a) \
     ((((a) << 8) & 0xff00) | 0x00ff) & (((a) >> 8) | 0xff00)
 #else
@@ -340,6 +340,10 @@
   struct tm sbuf;
   (void)memset((void*)&sbuf,0, sizeof(sbuf));
   struct tm* s = gmtime_r(&t, &sbuf);
+  if (s == NULL) {
+    fprintf(u->errstrm, "Error: gmtime failure, invalid input archive\n");
+    exit(2);
+  }
   modtime_cache = modtime;
   dostime_cache = dostime(s->tm_year + 1900, s->tm_mon + 1, s->tm_mday,
                           s->tm_hour, s->tm_min, s->tm_sec);
@@ -384,7 +388,7 @@
   }
 
   deflated.empty();
-  zs.next_out  = (uchar*) deflated.grow(len + (len/2));
+  zs.next_out  = (uchar*) deflated.grow(add_size(len, (len/2)));
   zs.avail_out = (int)deflated.size();
 
   zs.next_in = (uchar*)head.ptr;
--- a/src/share/native/java/lang/Class.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/java/lang/Class.c	Wed Oct 30 18:38:20 2013 +0000
@@ -69,7 +69,7 @@
     {"getDeclaredConstructors0","(Z)[" CTR, (void *)&JVM_GetClassDeclaredConstructors},
     {"getProtectionDomain0", "()" PD,       (void *)&JVM_GetProtectionDomain},
     {"getDeclaredClasses0",  "()[" CLS,      (void *)&JVM_GetDeclaredClasses},
-    {"getDeclaringClass",   "()" CLS,      (void *)&JVM_GetDeclaringClass},
+    {"getDeclaringClass0",   "()" CLS,      (void *)&JVM_GetDeclaringClass},
     {"getGenericSignature0", "()" STR,      (void *)&JVM_GetClassSignature},
     {"getRawAnnotations",      "()" BA,        (void *)&JVM_GetClassAnnotations},
     {"getConstantPool",     "()" CPL,       (void *)&JVM_GetClassConstantPool},
--- a/src/share/native/java/net/Inet6Address.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/java/net/Inet6Address.c	Wed Oct 30 18:38:20 2013 +0000
@@ -33,6 +33,8 @@
  */
 
 jclass ia6_class;
+jfieldID ia6_holder6ID;
+
 jfieldID ia6_ipaddressID;
 jfieldID ia6_scopeidID;
 jfieldID ia6_cachedscopeidID;
@@ -47,19 +49,24 @@
  */
 JNIEXPORT void JNICALL
 Java_java_net_Inet6Address_init(JNIEnv *env, jclass cls) {
+    jclass ia6h_class;
     jclass c = (*env)->FindClass(env, "java/net/Inet6Address");
     CHECK_NULL(c);
     ia6_class = (*env)->NewGlobalRef(env, c);
     CHECK_NULL(ia6_class);
-    ia6_ipaddressID = (*env)->GetFieldID(env, ia6_class, "ipaddress", "[B");
+    ia6h_class = (*env)->FindClass(env, "java/net/Inet6Address$Inet6AddressHolder");
+    CHECK_NULL(ia6h_class);
+    ia6_holder6ID = (*env)->GetFieldID(env, ia6_class, "holder6", "Ljava/net/Inet6Address$Inet6AddressHolder;");
+    CHECK_NULL(ia6_holder6ID);
+    ia6_ipaddressID = (*env)->GetFieldID(env, ia6h_class, "ipaddress", "[B");
     CHECK_NULL(ia6_ipaddressID);
-    ia6_scopeidID = (*env)->GetFieldID(env, ia6_class, "scope_id", "I");
+    ia6_scopeidID = (*env)->GetFieldID(env, ia6h_class, "scope_id", "I");
     CHECK_NULL(ia6_scopeidID);
     ia6_cachedscopeidID = (*env)->GetFieldID(env, ia6_class, "cached_scope_id", "I");
     CHECK_NULL(ia6_cachedscopeidID);
-    ia6_scopeidsetID = (*env)->GetFieldID(env, ia6_class, "scope_id_set", "Z");
+    ia6_scopeidsetID = (*env)->GetFieldID(env, ia6h_class, "scope_id_set", "Z");
     CHECK_NULL(ia6_scopeidID);
-    ia6_scopeifnameID = (*env)->GetFieldID(env, ia6_class, "scope_ifname", "Ljava/net/NetworkInterface;");
+    ia6_scopeifnameID = (*env)->GetFieldID(env, ia6h_class, "scope_ifname", "Ljava/net/NetworkInterface;");
     CHECK_NULL(ia6_scopeifnameID);
     ia6_ctrID = (*env)->GetMethodID(env, ia6_class, "<init>", "()V");
     CHECK_NULL(ia6_ctrID);
--- a/src/share/native/java/net/net_util.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/java/net/net_util.c	Wed Oct 30 18:38:20 2013 +0000
@@ -94,6 +94,92 @@
 extern jfieldID iac_addressID;
 extern jfieldID iac_familyID;
 
+/**
+ * set_ methods return JNI_TRUE on success JNI_FALSE on error
+ * get_ methods that return +ve int return -1 on error
+ * get_ methods that return objects return NULL on error.
+ */
+jobject getInet6Address_scopeifname(JNIEnv *env, jobject iaObj) {
+    jobject holder;
+
+    initInetAddrs(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID);
+    CHECK_NULL_RETURN(holder, NULL);
+    return (*env)->GetObjectField(env, holder, ia6_scopeifnameID);
+}
+
+int setInet6Address_scopeifname(JNIEnv *env, jobject iaObj, jobject scopeifname) {
+    jobject holder;
+
+    initInetAddrs(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID);
+    CHECK_NULL_RETURN(holder, JNI_FALSE);
+    (*env)->SetObjectField(env, holder, ia6_scopeifnameID, scopeifname);
+    return JNI_TRUE;
+}
+
+int getInet6Address_scopeid_set(JNIEnv *env, jobject iaObj) {
+    jobject holder;
+
+    initInetAddrs(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID);
+    CHECK_NULL_RETURN(holder, -1);
+    return (*env)->GetBooleanField(env, holder, ia6_scopeidsetID);
+}
+
+int getInet6Address_scopeid(JNIEnv *env, jobject iaObj) {
+    jobject holder;
+
+    initInetAddrs(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID);
+    CHECK_NULL_RETURN(holder, -1);
+    return (*env)->GetIntField(env, holder, ia6_scopeidID);
+}
+
+int setInet6Address_scopeid(JNIEnv *env, jobject iaObj, int scopeid) {
+    jobject holder;
+
+    initInetAddrs(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID);
+    CHECK_NULL_RETURN(holder, JNI_FALSE);
+    (*env)->SetIntField(env, holder, ia6_scopeidID, scopeid);
+    if (scopeid > 0) {
+            (*env)->SetBooleanField(env, holder, ia6_scopeidsetID, JNI_TRUE);
+    }
+    return JNI_TRUE;
+}
+
+
+int getInet6Address_ipaddress(JNIEnv *env, jobject iaObj, char *dest) {
+    jobject holder, addr;
+    jbyteArray barr;
+
+    initInetAddrs(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID);
+    CHECK_NULL_RETURN(holder, JNI_FALSE);
+    addr =  (*env)->GetObjectField(env, holder, ia6_ipaddressID);
+    CHECK_NULL_RETURN(addr, JNI_FALSE);
+    (*env)->GetByteArrayRegion(env, addr, 0, 16, (jbyte *)dest);
+    return JNI_TRUE;
+}
+
+int setInet6Address_ipaddress(JNIEnv *env, jobject iaObj, char *address) {
+    jobject holder;
+    jbyteArray addr;
+
+    initInetAddrs(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID);
+    CHECK_NULL_RETURN(holder, JNI_FALSE);
+    addr =  (jbyteArray)(*env)->GetObjectField(env, holder, ia6_ipaddressID);
+    if (addr == NULL) {
+        addr = (*env)->NewByteArray(env, 16);
+        CHECK_NULL_RETURN(addr, JNI_FALSE);
+        (*env)->SetObjectField(env, holder, ia6_ipaddressID, addr);
+    }
+    (*env)->SetByteArrayRegion(env, addr, 0, 16, (jbyte *)address);
+    return JNI_TRUE;
+}
+
 void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address) {
     jobject holder;
     initInetAddrs(env);
@@ -168,6 +254,7 @@
         } else {
             static jclass inet6Cls = 0;
             jint scope;
+            int ret;
             if (inet6Cls == 0) {
                 jclass c = (*env)->FindClass(env, "java/net/Inet6Address");
                 CHECK_NULL_RETURN(c, NULL);
@@ -177,18 +264,11 @@
             }
             iaObj = (*env)->NewObject(env, inet6Cls, ia6_ctrID);
             CHECK_NULL_RETURN(iaObj, NULL);
-            ipaddress = (*env)->NewByteArray(env, 16);
-            CHECK_NULL_RETURN(ipaddress, NULL);
-            (*env)->SetByteArrayRegion(env, ipaddress, 0, 16,
-                                       (jbyte *)&(him6->sin6_addr));
-
-            (*env)->SetObjectField(env, iaObj, ia6_ipaddressID, ipaddress);
-
+            ret = setInet6Address_ipaddress(env, iaObj, (char *)&(him6->sin6_addr));
+            CHECK_NULL_RETURN(ret, NULL);
             setInetAddress_family(env, iaObj, IPv6);
             scope = getScopeID(him);
-            (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope);
-            if (scope > 0)
-                (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
+            setInet6Address_scopeid(env, iaObj, scope);
         }
         *port = ntohs(him6->sin6_port);
     } else
@@ -248,9 +328,8 @@
             if (family == AF_INET) {
                 return JNI_FALSE;
             }
-            ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID);
-            scope = (*env)->GetIntField(env, iaObj, ia6_scopeidID);
-            (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddrCur);
+            scope = getInet6Address_scopeid(env, iaObj);
+            getInet6Address_ipaddress(env, iaObj, (char *)caddrCur);
             if (NET_IsEqual(caddrNew, caddrCur) && cmpScopeID(scope, him)) {
                 return JNI_TRUE;
             } else {
--- a/src/share/native/java/net/net_util.h	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/java/net/net_util.h	Wed Oct 30 18:38:20 2013 +0000
@@ -58,6 +58,19 @@
 extern jfieldID iac_hostNameID;
 extern jfieldID ia_preferIPv6AddressID;
 
+/** (Inet6Address accessors)
+ * set_ methods return JNI_TRUE on success JNI_FALSE on error
+ * get_ methods that return int/boolean, return -1 on error
+ * get_ methods that return objects return NULL on error.
+ */
+extern jobject getInet6Address_scopeifname(JNIEnv *env, jobject ia6Obj);
+extern int setInet6Address_scopeifname(JNIEnv *env, jobject ia6Obj, jobject scopeifname);
+extern int getInet6Address_scopeid_set(JNIEnv *env, jobject ia6Obj);
+extern int getInet6Address_scopeid(JNIEnv *env, jobject ia6Obj);
+extern int setInet6Address_scopeid(JNIEnv *env, jobject ia6Obj, int scopeid);
+extern int getInet6Address_ipaddress(JNIEnv *env, jobject ia6Obj, char *dest);
+extern int setInet6Address_ipaddress(JNIEnv *env, jobject ia6Obj, char *address);
+
 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);
@@ -93,12 +106,12 @@
 
 /* Inet6Address fields */
 extern jclass ia6_class;
+extern jfieldID ia6_holder6ID;
 extern jfieldID ia6_ipaddressID;
 extern jfieldID ia6_scopeidID;
 extern jfieldID ia6_cachedscopeidID;
 extern jfieldID ia6_scopeidsetID;
 extern jfieldID ia6_scopeifnameID;
-extern jfieldID ia6_scopeifnamesetID;
 extern jmethodID ia6_ctrID;
 
 /************************************************************************
--- a/src/share/native/sun/awt/image/awt_parseImage.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/sun/awt/image/awt_parseImage.c	Wed Oct 30 18:38:20 2013 +0000
@@ -873,363 +873,204 @@
     return 1;
 }
 
-/*
- * This routine will fill in a buffer of data for either 1 band or all
- * bands (if band == -1).
- */
 #define MAX_TO_GRAB (10240)
 
-int awt_getPixelByte(JNIEnv *env, int band, RasterS_t *rasterP,
-                     unsigned char *bufferP) {
-    int w = rasterP->width;
-    int h = rasterP->height;
-    int numBands = rasterP->numBands;
+typedef union {
+    void *pv;
+    unsigned char *pb;
+    unsigned short *ps;
+} PixelData_t;
+
+
+int awt_getPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP) {
+    const int w = rasterP->width;
+    const int h = rasterP->height;
+    const int numBands = rasterP->numBands;
     int y;
     int i;
-    int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w);
+    int maxLines;
     jobject jsm;
-    int off;
+    int off = 0;
     jarray jdata = NULL;
     jobject jdatabuffer;
     int *dataP;
-    int maxBytes = w;
+    int maxSamples;
+    PixelData_t p;
+
+    if (bufferP == NULL) {
+        return -1;
+    }
+
+    if (rasterP->dataType != BYTE_DATA_TYPE &&
+        rasterP->dataType != SHORT_DATA_TYPE)
+    {
+        return -1;
+    }
+
+    p.pv = bufferP;
+
+    if (!SAFE_TO_MULT(w, numBands)) {
+        return -1;
+    }
+    maxSamples = w * numBands;
+
+    maxLines = maxSamples > MAX_TO_GRAB ? 1 : (MAX_TO_GRAB / maxSamples);
+    if (maxLines > h) {
+        maxLines = h;
+    }
+
+    if (!SAFE_TO_MULT(maxSamples, maxLines)) {
+        return -1;
+    }
+
+    maxSamples *= maxLines;
 
     jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID);
     jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster,
                                          g_RasterDataBufferID);
-    jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines);
+
+    jdata = (*env)->NewIntArray(env, maxSamples);
     if (JNU_IsNull(env, jdata)) {
         JNU_ThrowOutOfMemoryError(env, "Out of Memory");
         return -1;
     }
 
-    /* Here is the generic code */
-    if (band >= 0) {
-        int dOff;
-        if (band >= numBands) {
+    for (y = 0; y < h; y += maxLines) {
+        if (y + maxLines > h) {
+            maxLines = h - y;
+            maxSamples = w * numBands * maxLines;
+        }
+
+        (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID,
+                                 0, y, w,
+                                 maxLines, jdata, jdatabuffer);
+
+        if ((*env)->ExceptionOccurred(env)) {
             (*env)->DeleteLocalRef(env, jdata);
-            JNU_ThrowInternalError(env, "Band out of range.");
             return -1;
         }
-        off = 0;
-        for (y=0; y < h; ) {
-            (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID,
-                                     0, y, w,
-                                     maxLines, jdata, jdatabuffer);
-            dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
-                                                              NULL);
-            if (dataP == NULL) {
-                (*env)->DeleteLocalRef(env, jdata);
-                return -1;
-            }
-            dOff = band;
-            for (i=0; i < maxBytes; i++, dOff += numBands) {
-                bufferP[off++] = (unsigned char) dataP[dOff];
-            }
 
-            (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
-                                                  JNI_ABORT);
-
-            if (y+maxLines < h) {
-                y += maxLines;
-            }
-            else {
-                y++;
-                maxBytes = w;
-            }
-        }
-    }
-    else {
-        off = 0;
-        maxBytes *= numBands;
-        for (y=0; y < h; ) {
-            (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID,
-                                     0, y, w,
-                                     maxLines, jdata, jdatabuffer);
-            dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
-                                                              NULL);
-            if (dataP == NULL) {
-                (*env)->DeleteLocalRef(env, jdata);
-                return -1;
-            }
-            for (i=0; i < maxBytes; i++) {
-                bufferP[off++] = (unsigned char) dataP[i];
-            }
-
-            (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
-                                                  JNI_ABORT);
-
-            if (y+maxLines < h) {
-                y += maxLines;
-            }
-            else {
-                y++;
-                maxBytes = w*numBands;
-            }
+        dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
+                                                          NULL);
+        if (dataP == NULL) {
+            (*env)->DeleteLocalRef(env, jdata);
+            return -1;
         }
 
+        switch (rasterP->dataType) {
+        case BYTE_DATA_TYPE:
+            for (i = 0; i < maxSamples; i ++) {
+                p.pb[off++] = (unsigned char) dataP[i];
+            }
+            break;
+        case SHORT_DATA_TYPE:
+            for (i = 0; i < maxSamples; i ++) {
+                p.ps[off++] = (unsigned short) dataP[i];
+            }
+            break;
+        }
+
+        (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
+                                              JNI_ABORT);
     }
     (*env)->DeleteLocalRef(env, jdata);
 
-    return 0;
+    return 1;
 }
-int awt_setPixelByte(JNIEnv *env, int band, RasterS_t *rasterP,
-                     unsigned char *bufferP) {
-    int w = rasterP->width;
-    int h = rasterP->height;
-    int numBands = rasterP->numBands;
+
+int awt_setPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP) {
+    const int w = rasterP->width;
+    const int h = rasterP->height;
+    const int numBands = rasterP->numBands;
+
     int y;
     int i;
-    int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w);
+    int maxLines;
     jobject jsm;
-    int off;
+    int off = 0;
     jarray jdata = NULL;
     jobject jdatabuffer;
     int *dataP;
-    int maxBytes = w;
+    int maxSamples;
+    PixelData_t p;
+
+    if (bufferP == NULL) {
+        return -1;
+    }
+
+    if (rasterP->dataType != BYTE_DATA_TYPE &&
+        rasterP->dataType != SHORT_DATA_TYPE)
+    {
+        return -1;
+    }
+
+    p.pv = bufferP;
+
+    if (!SAFE_TO_MULT(w, numBands)) {
+        return -1;
+    }
+    maxSamples = w * numBands;
+
+    maxLines = maxSamples > MAX_TO_GRAB ? 1 : (MAX_TO_GRAB / maxSamples);
+    if (maxLines > h) {
+        maxLines = h;
+    }
+
+    if (!SAFE_TO_MULT(maxSamples, maxLines)) {
+        return -1;
+    }
+
+    maxSamples *= maxLines;
 
     jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID);
     jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster,
                                          g_RasterDataBufferID);
-    /* Here is the generic code */
-    jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines);
+
+    jdata = (*env)->NewIntArray(env, maxSamples);
     if (JNU_IsNull(env, jdata)) {
         JNU_ThrowOutOfMemoryError(env, "Out of Memory");
         return -1;
     }
-    if (band >= 0) {
-        int dOff;
-        if (band >= numBands) {
+
+    for (y = 0; y < h; y += maxLines) {
+        if (y + maxLines > h) {
+            maxLines = h - y;
+            maxSamples = w * numBands * maxLines;
+        }
+        dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
+                                                          NULL);
+        if (dataP == NULL) {
             (*env)->DeleteLocalRef(env, jdata);
-            JNU_ThrowInternalError(env, "Band out of range.");
             return -1;
         }
-        off = 0;
-        for (y=0; y < h; y+=maxLines) {
-            if (y+maxLines > h) {
-                maxBytes = w*numBands;
-                maxLines = h - y;
-            }
-            dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
-                                                              NULL);
-            if (dataP == NULL) {
-                (*env)->DeleteLocalRef(env, jdata);
-                return -1;
-            }
-            dOff = band;
-            for (i=0; i < maxBytes; i++, dOff += numBands) {
-                dataP[dOff] = bufferP[off++];
+
+        switch (rasterP->dataType) {
+        case BYTE_DATA_TYPE:
+            for (i = 0; i < maxSamples; i ++) {
+                dataP[i] = p.pb[off++];
             }
-
-            (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
-                                                  JNI_ABORT);
-
-            (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID,
-                                   0, y, w,
-                                   maxLines, jdata, jdatabuffer);
-        }
-    }
-    else {
-        off = 0;
-        maxBytes *= numBands;
-        for (y=0; y < h; y+=maxLines) {
-            if (y+maxLines > h) {
-                maxBytes = w*numBands;
-                maxLines = h - y;
+            break;
+        case SHORT_DATA_TYPE:
+            for (i = 0; i < maxSamples; i ++) {
+                dataP[i] = p.ps[off++];
             }
-            dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
-                                                              NULL);
-            if (dataP == NULL) {
-                (*env)->DeleteLocalRef(env, jdata);
-                return -1;
-            }
-            for (i=0; i < maxBytes; i++) {
-                dataP[i] = bufferP[off++];
-            }
-
-            (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
-                                                  JNI_ABORT);
-
-            (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID,
-                                     0, y, w,
-                                     maxLines, jdata, jdatabuffer);
+            break;
         }
 
+        (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
+                                              JNI_ABORT);
+
+        (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID,
+                               0, y, w,
+                               maxLines, jdata, jdatabuffer);
+
+        if ((*env)->ExceptionOccurred(env)) {
+            (*env)->DeleteLocalRef(env, jdata);
+            return -1;
+        }
     }
 
     (*env)->DeleteLocalRef(env, jdata);
 
-    return 0;
+    return 1;
 }
-int awt_getPixelShort(JNIEnv *env, int band, RasterS_t *rasterP,
-                     unsigned short *bufferP) {
-    int w = rasterP->width;
-    int h = rasterP->height;
-    int numBands = rasterP->numBands;
-    int y;
-    int i;
-    int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w);
-    jobject jsm;
-    int off;
-    jarray jdata = NULL;
-    jobject jdatabuffer;
-    int *dataP;
-    int maxBytes = w*maxLines;
-
-    jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID);
-    jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster,
-                                         g_RasterDataBufferID);
-    jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines);
-    if (JNU_IsNull(env, jdata)) {
-        JNU_ThrowOutOfMemoryError(env, "Out of Memory");
-        return -1;
-    }
-    /* Here is the generic code */
-    if (band >= 0) {
-        int dOff;
-        if (band >= numBands) {
-            (*env)->DeleteLocalRef(env, jdata);
-            JNU_ThrowInternalError(env, "Band out of range.");
-            return -1;
-        }
-        off = 0;
-        for (y=0; y < h; y += maxLines) {
-            if (y+maxLines > h) {
-                maxBytes = w*numBands;
-                maxLines = h - y;
-            }
-            (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID,
-                                     0, y, w,
-                                     maxLines, jdata, jdatabuffer);
-            dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
-                                                              NULL);
-            if (dataP == NULL) {
-                (*env)->DeleteLocalRef(env, jdata);
-                return -1;
-            }
-
-            dOff = band;
-            for (i=0; i < maxBytes; i++, dOff += numBands) {
-                bufferP[off++] = (unsigned short) dataP[dOff];
-            }
-
-            (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
-                                                  JNI_ABORT);
-        }
-    }
-    else {
-        off = 0;
-        maxBytes *= numBands;
-        for (y=0; y < h; y+=maxLines) {
-            if (y+maxLines > h) {
-                maxBytes = w*numBands;
-                maxLines = h - y;
-            }
-            (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID,
-                                     0, y, w,
-                                     maxLines, jdata, jdatabuffer);
-            dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
-                                                              NULL);
-            if (dataP == NULL) {
-                (*env)->DeleteLocalRef(env, jdata);
-                return -1;
-            }
-            for (i=0; i < maxBytes; i++) {
-                bufferP[off++] = (unsigned short) dataP[i];
-            }
-
-            (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
-                                                  JNI_ABORT);
-        }
-
-    }
-
-    (*env)->DeleteLocalRef(env, jdata);
-    return 0;
-}
-int awt_setPixelShort(JNIEnv *env, int band, RasterS_t *rasterP,
-                      unsigned short *bufferP) {
-    int w = rasterP->width;
-    int h = rasterP->height;
-    int numBands = rasterP->numBands;
-    int y;
-    int i;
-    int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w);
-    jobject jsm;
-    int off;
-    jarray jdata = NULL;
-    jobject jdatabuffer;
-    int *dataP;
-    int maxBytes = w;
-
-    jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID);
-    jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster,
-                                         g_RasterDataBufferID);
-    if (band >= numBands) {
-        JNU_ThrowInternalError(env, "Band out of range.");
-        return -1;
-    }
-    /* Here is the generic code */
-    jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines);
-    if (JNU_IsNull(env, jdata)) {
-        JNU_ThrowOutOfMemoryError(env, "Out of Memory");
-        return -1;
-    }
-    if (band >= 0) {
-        int dOff;
-        off = 0;
-        for (y=0; y < h; y+=maxLines) {
-            if (y+maxLines > h) {
-                maxBytes = w*numBands;
-                maxLines = h - y;
-            }
-            dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
-                                                              NULL);
-            if (dataP == NULL) {
-                (*env)->DeleteLocalRef(env, jdata);
-                return -1;
-            }
-            dOff = band;
-            for (i=0; i < maxBytes; i++, dOff += numBands) {
-                dataP[dOff] = bufferP[off++];
-            }
-
-            (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
-                                                  JNI_ABORT);
-
-            (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID,
-                                   0, y, w,
-                                   maxLines, jdata, jdatabuffer);
-        }
-    }
-    else {
-        off = 0;
-        maxBytes *= numBands;
-        for (y=0; y < h; y+=maxLines) {
-            if (y+maxLines > h) {
-                maxBytes = w*numBands;
-                maxLines = h - y;
-            }
-            dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata,
-                                                              NULL);
-            if (dataP == NULL) {
-                (*env)->DeleteLocalRef(env, jdata);
-                return -1;
-            }
-            for (i=0; i < maxBytes; i++) {
-                dataP[i] = bufferP[off++];
-            }
-
-            (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP,
-                                                  JNI_ABORT);
-
-            (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID,
-                                   0, y, w,
-                                   maxLines, jdata, jdatabuffer);
-        }
-
-    }
-
-    (*env)->DeleteLocalRef(env, jdata);
-    return 0;
-}
--- a/src/share/native/sun/awt/image/awt_parseImage.h	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/sun/awt/image/awt_parseImage.h	Wed Oct 30 18:38:20 2013 +0000
@@ -188,13 +188,8 @@
 
 void awt_freeParsedImage(BufImageS_t *imageP, int freeImageP);
 
-int awt_getPixelByte(JNIEnv *env, int band, RasterS_t *rasterP,
-                     unsigned char *bufferP);
-int awt_setPixelByte(JNIEnv *env, int band, RasterS_t *rasterP,
-                     unsigned char *bufferP);
-int awt_getPixelShort(JNIEnv *env, int band, RasterS_t *rasterP,
-                     unsigned short *bufferP);
-int awt_setPixelShort(JNIEnv *env, int band, RasterS_t *rasterP,
-                      unsigned short *bufferP);
+int awt_getPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP);
+
+int awt_setPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP);
 
 #endif /* AWT_PARSE_IMAGE_H */
--- a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Wed Oct 30 18:38:20 2013 +0000
@@ -2706,6 +2706,15 @@
     bandSize = (*env)->GetIntArrayElements(env, bandSizes, NULL);
 
     for (i = 0; i < numBands; i++) {
+        if (bandSize[i] <= 0 || bandSize[i] > JPEG_BAND_SIZE) {
+            (*env)->ReleaseIntArrayElements(env, bandSizes,
+                                            bandSize, JNI_ABORT);
+            JNU_ThrowByName(env, "javax/imageio/IIOException", "Invalid Image");
+            return JNI_FALSE;;
+        }
+    }
+
+    for (i = 0; i < numBands; i++) {
         if (bandSize[i] != JPEG_BAND_SIZE) {
             if (scale == NULL) {
                 scale = (UINT8**) calloc(numBands, sizeof(UINT8*));
--- a/src/share/native/sun/awt/medialib/awt_ImagingLib.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/sun/awt/medialib/awt_ImagingLib.c	Wed Oct 30 18:38:20 2013 +0000
@@ -700,22 +700,7 @@
 
     /* Means that we couldn't write directly into the destination buffer */
     if (ddata == NULL) {
-        unsigned char *bdataP;
-        unsigned short *sdataP;
-
-        /* Punt for now */
-        switch (dstRasterP->dataType) {
-        case BYTE_DATA_TYPE:
-            bdataP  = (unsigned char *) mlib_ImageGetData(dst);
-            retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ;
-            break;
-        case SHORT_DATA_TYPE:
-            sdataP  = (unsigned short *) mlib_ImageGetData(dst);
-            retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ;
-            break;
-        default:
-            retStatus = 0;
-        }
+        retStatus = awt_setPixels(env, dstRasterP, mlib_ImageGetData(dst));
     }
 
     /* Release the pinned memory */
@@ -1119,24 +1104,9 @@
 
     /* Means that we couldn't write directly into the destination buffer */
     if (ddata == NULL) {
-        unsigned char *bdataP;
-        unsigned short *sdataP;
-
         /* Need to store it back into the array */
         if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) {
-            /* Punt for now */
-            switch (dst->type) {
-            case MLIB_BYTE:
-                bdataP  = (unsigned char *) mlib_ImageGetData(dst);
-                retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ;
-                break;
-            case MLIB_SHORT:
-                sdataP  = (unsigned short *) mlib_ImageGetData(dst);
-                retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ;
-                break;
-            default:
-                retStatus = 0;
-            }
+            retStatus = awt_setPixels(env, dstRasterP, mlib_ImageGetData(dst));
         }
     }
 
@@ -1704,21 +1674,7 @@
      * the destination buffer
      */
     if (ddata == NULL) {
-        unsigned char*  bdataP;
-        unsigned short* sdataP;
-
-        switch (dstRasterP->dataType) {
-          case BYTE_DATA_TYPE:
-            bdataP  = (unsigned char *) mlib_ImageGetData(dst);
-            retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ;
-            break;
-          case SHORT_DATA_TYPE:
-            sdataP  = (unsigned short *) mlib_ImageGetData(dst);
-            retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ;
-            break;
-          default:
-            retStatus = 0;
-        }
+        retStatus = awt_setPixels(env, dstRasterP, mlib_ImageGetData(dst));
     }
 
     /* Release the LUT */
@@ -2029,21 +1985,25 @@
     return 0;
 }
 
+#define NUM_LINES    10
+
 static int
 cvtCustomToDefault(JNIEnv *env, BufImageS_t *imageP, int component,
                    unsigned char *dataP) {
-    ColorModelS_t *cmP = &imageP->cmodel;
-    RasterS_t *rasterP = &imageP->raster;
+    const RasterS_t *rasterP = &imageP->raster;
+    const int w = rasterP->width;
+    const int h = rasterP->height;
+
     int y;
-    jobject jpixels = NULL;
+    jintArray jpixels = NULL;
     jint *pixels;
     unsigned char *dP = dataP;
-#define NUM_LINES    10
-    int numLines = NUM_LINES;
+    int numLines = h > NUM_LINES ? NUM_LINES : h;
+
     /* it is safe to calculate the scan length, because width has been verified
      * on creation of the mlib image
      */
-    int scanLength = rasterP->width * 4;
+    const int scanLength = w * 4;
 
     int nbytes = 0;
     if (!SAFE_TO_MULT(numLines, scanLength)) {
@@ -2052,42 +2012,70 @@
 
     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;
+    jpixels = (*env)->NewIntArray(env, nbytes);
+    if (JNU_IsNull(env, jpixels)) {
+        JNU_ThrowOutOfMemoryError(env, "Out of Memory");
+        return -1;
+    }
+
+    for (y = 0; y < h; y += numLines) {
+        if (y + numLines > h) {
+            numLines = h - y;
             nbytes = numLines * scanLength;
         }
-        jpixels = (*env)->CallObjectMethod(env, imageP->jimage,
-                                           g_BImgGetRGBMID, 0, y,
-                                           rasterP->width, numLines,
-                                           jpixels,0, rasterP->width);
-        if (jpixels == NULL) {
-            JNU_ThrowInternalError(env, "Can't retrieve pixels.");
+
+        (*env)->CallObjectMethod(env, imageP->jimage,
+                                 g_BImgGetRGBMID, 0, y,
+                                 w, numLines,
+                                 jpixels, 0, w);
+        if ((*env)->ExceptionOccurred(env)) {
+            (*env)->DeleteLocalRef(env, jpixels);
             return -1;
         }
 
         pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL);
+        if (pixels == NULL) {
+            (*env)->DeleteLocalRef(env, jpixels);
+            return -1;
+        }
+
         memcpy(dP, pixels, nbytes);
         dP += nbytes;
+
         (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels,
                                               JNI_ABORT);
     }
+
+    /* Need to release the array */
+    (*env)->DeleteLocalRef(env, jpixels);
+
     return 0;
 }
 
 static int
 cvtDefaultToCustom(JNIEnv *env, BufImageS_t *imageP, int component,
                    unsigned char *dataP) {
-    ColorModelS_t *cmP = &imageP->cmodel;
-    RasterS_t *rasterP = &imageP->raster;
+    const RasterS_t *rasterP = &imageP->raster;
+    const int w = rasterP->width;
+    const int h = rasterP->height;
+
     int y;
+    jintArray jpixels = NULL;
     jint *pixels;
     unsigned char *dP = dataP;
-#define NUM_LINES    10
-    int numLines = NUM_LINES;
-    int nbytes = rasterP->width*4*NUM_LINES;
-    jintArray jpixels;
+    int numLines = h > NUM_LINES ? NUM_LINES : h;
+
+    /* it is safe to calculate the scan length, because width has been verified
+     * on creation of the mlib image
+     */
+    const int scanLength = w * 4;
+
+    int nbytes = 0;
+    if (!SAFE_TO_MULT(numLines, scanLength)) {
+        return -1;
+    }
+
+    nbytes = numLines * scanLength;
 
     jpixels = (*env)->NewIntArray(env, nbytes);
     if (JNU_IsNull(env, jpixels)) {
@@ -2095,14 +2083,15 @@
         return -1;
     }
 
-    for (y=0; y < rasterP->height; y+=NUM_LINES) {
-        if (y+numLines > rasterP->height) {
-            numLines = rasterP->height - y;
-            nbytes = rasterP->width*4*numLines;
+    for (y = 0; y < h; y += numLines) {
+        if (y + numLines > h) {
+            numLines = h - y;
+            nbytes = numLines * scanLength;
         }
+
         pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL);
         if (pixels == NULL) {
-            /* JNI error */
+            (*env)->DeleteLocalRef(env, jpixels);
             return -1;
         }
 
@@ -2111,12 +2100,11 @@
 
        (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels, 0);
 
-       /* setData, one scanline at a time */
-       /* Fix 4223648, 4184283 */
        (*env)->CallVoidMethod(env, imageP->jimage, g_BImgSetRGBMID, 0, y,
-                                rasterP->width, numLines, jpixels, 0,
-                                rasterP->width);
+                                w, numLines, jpixels,
+                                0, w);
        if ((*env)->ExceptionOccurred(env)) {
+           (*env)->DeleteLocalRef(env, jpixels);
            return -1;
        }
     }
@@ -2298,7 +2286,6 @@
                     mlib_image **mlibImagePP, void **dataPP, int isSrc) {
     void *dataP;
     unsigned char *cDataP;
-    unsigned short *sdataP;
     int dataType = BYTE_DATA_TYPE;
     int width;
     int height;
@@ -2484,8 +2471,7 @@
             return -1;
         }
         if (isSrc) {
-            cDataP  = (unsigned char *) mlib_ImageGetData(*mlibImagePP);
-            if (awt_getPixelByte(env, -1, rasterP, cDataP) < 0) {
+            if (awt_getPixels(env, rasterP, mlib_ImageGetData(*mlibImagePP)) < 0) {
                 (*sMlibSysFns.deleteImageFP)(*mlibImagePP);
                 return -1;
             }
@@ -2499,8 +2485,7 @@
             return -1;
         }
         if (isSrc) {
-            sdataP  = (unsigned short *) mlib_ImageGetData(*mlibImagePP);
-            if (awt_getPixelShort(env, -1, rasterP, sdataP) < 0) {
+            if (awt_getPixels(env, rasterP, mlib_ImageGetData(*mlibImagePP)) < 0) {
                 (*sMlibSysFns.deleteImageFP)(*mlibImagePP);
                 return -1;
             }
@@ -2550,60 +2535,6 @@
     }
 }
 
-static int
-storeDstArray(JNIEnv *env,  BufImageS_t *srcP, BufImageS_t *dstP,
-              mlibHintS_t *hintP, mlib_image *mlibImP, void *ddata) {
-    RasterS_t *rasterP = &dstP->raster;
-
-    /* Nothing to do since it is the same image type */
-    if (srcP->imageType == dstP->imageType
-        && srcP->imageType != java_awt_image_BufferedImage_TYPE_CUSTOM
-        && srcP->imageType != java_awt_image_BufferedImage_TYPE_BYTE_INDEXED
-        && srcP->imageType != java_awt_image_BufferedImage_TYPE_BYTE_BINARY) {
-        /* REMIND: Should check the ICM LUTS to see if it is the same */
-        return 0;
-    }
-
-    /* These types are compatible with TYPE_INT_RGB */
-    if (srcP->imageType == java_awt_image_BufferedImage_TYPE_INT_RGB
-        && (dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_ARGB ||
-           dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_ARGB_PRE)){
-        return 0;
-    }
-
-    if (hintP->cvtSrcToDefault &&
-        (srcP->cmodel.isAlphaPre == dstP->cmodel.isAlphaPre)) {
-        if (srcP->cmodel.isAlphaPre) {
-            if (dstP->imageType ==
-                java_awt_image_BufferedImage_TYPE_INT_ARGB_PRE)
-            {
-                return 0;
-            }
-            if (!srcP->cmodel.supportsAlpha &&
-                dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_RGB){
-                return 0;
-            }
-        }
-        else {
-            /* REMIND: */
-        }
-    }
-
-    if (dstP->cmodel.cmType == DIRECT_CM_TYPE) {
-        /* Just need to move bits */
-        if (mlibImP->type == MLIB_BYTE) {
-            return awt_setPixelByte(env, -1, &dstP->raster,
-                                    (unsigned char *) mlibImP->data);
-        }
-        else if (mlibImP->type == MLIB_SHORT) {
-            return awt_setPixelByte(env, -1, &dstP->raster,
-                                    (unsigned char *) mlibImP->data);
-        }
-    }
-
-    return 0;
-}
-
 #define ERR_BAD_IMAGE_LAYOUT (-2)
 
 #define CHECK_DST_ARRAY(start_offset, elements_per_scan, elements_per_pixel) \
@@ -2709,8 +2640,7 @@
             }
         }
         else if (mlibImP->type == MLIB_SHORT) {
-            return awt_setPixelShort(env, -1, rasterP,
-                                    (unsigned short *) mlibImP->data);
+            return awt_setPixels(env, rasterP, mlibImP->data);
         }
     }
     else {
--- a/src/share/native/sun/font/layout/SunLayoutEngine.cpp	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/sun/font/layout/SunLayoutEngine.cpp	Wed Oct 30 18:38:20 2013 +0000
@@ -104,6 +104,10 @@
 
 int putGV(JNIEnv* env, jint gmask, jint baseIndex, jobject gvdata, const LayoutEngine* engine, int glyphCount) {
     int count = env->GetIntField(gvdata, gvdCountFID);
+    if (count < 0) {
+      JNU_ThrowInternalError(env, "count negative");
+      return 0;
+    }
 
     jarray glyphArray = (jarray)env->GetObjectField(gvdata, gvdGlyphsFID);
     if (IS_NULL(glyphArray)) {
--- a/src/share/native/sun/java2d/cmm/lcms/cmsio0.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/sun/java2d/cmm/lcms/cmsio0.c	Wed Oct 30 18:38:20 2013 +0000
@@ -1074,6 +1074,27 @@
 }
 
 
+static
+cmsBool SanityCheck(_cmsICCPROFILE* profile)
+{
+    cmsIOHANDLER* io = profile->IOhandler;
+    if (!io) {
+        return FALSE;
+    }
+
+    if (!io->Seek ||
+        !(io->Seek==NULLSeek || io->Seek==MemorySeek || io->Seek==FileSeek))
+    {
+        return FALSE;
+    }
+    if (!io->Read ||
+        !(io->Read==NULLRead || io->Read==MemoryRead || io->Read==FileRead))
+    {
+        return FALSE;
+    }
+
+    return TRUE;
+}
 
 // Dump tag contents. If the profile is being modified, untouched tags are copied from FileOrig
 static
@@ -1087,6 +1108,7 @@
     cmsTagTypeSignature TypeBase;
     cmsTagTypeHandler* TypeHandler;
 
+    if (!SanityCheck(FileOrig)) return FALSE;
 
     for (i=0; i < Icc -> TagCount; i++) {
 
@@ -1292,8 +1314,8 @@
     // Should we just calculate the needed space?
     if (MemPtr == NULL) {
 
-           *BytesNeeded =  cmsSaveProfileToIOhandler(hProfile, NULL);
-            return TRUE;
+        *BytesNeeded = cmsSaveProfileToIOhandler(hProfile, NULL);
+        return (*BytesNeeded == 0 ? FALSE : TRUE);
     }
 
     // That is a real write operation
--- a/src/share/native/sun/management/HotSpotDiagnostic.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/sun/management/HotSpotDiagnostic.c	Wed Oct 30 18:38:20 2013 +0000
@@ -29,7 +29,7 @@
 #include "sun_management_HotSpotDiagnostic.h"
 
 JNIEXPORT void JNICALL
-Java_sun_management_HotSpotDiagnostic_dumpHeap
+Java_sun_management_HotSpotDiagnostic_dumpHeap0
   (JNIEnv *env, jobject dummy, jstring outputfile, jboolean live)
 {
     jmm_interface->DumpHeap0(env, outputfile, live);
--- a/src/share/native/sun/reflect/Reflection.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/share/native/sun/reflect/Reflection.c	Wed Oct 30 18:38:20 2013 +0000
@@ -26,10 +26,16 @@
 #include "jvm.h"
 #include "sun_reflect_Reflection.h"
 
-JNIEXPORT jclass JNICALL Java_sun_reflect_Reflection_getCallerClass
+JNIEXPORT jclass JNICALL Java_sun_reflect_Reflection_getCallerClass__
 (JNIEnv *env, jclass unused)
 {
-    return JVM_GetCallerClass(env, JVM_DEPTH); // JVM_DEPTH is only the expected value
+    return JVM_GetCallerClass(env, JVM_CALLER_DEPTH);
+}
+
+JNIEXPORT jclass JNICALL Java_sun_reflect_Reflection_getCallerClass__I
+(JNIEnv *env, jclass unused, jint depth)
+{
+    return JVM_GetCallerClass(env, depth);
 }
 
 JNIEXPORT jint JNICALL Java_sun_reflect_Reflection_getClassAccessFlags
--- a/src/solaris/bin/java_md_solinux.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/bin/java_md_solinux.c	Wed Oct 30 18:38:20 2013 +0000
@@ -957,9 +957,27 @@
 
 void* SplashProcAddress(const char* name) {
     if (!hSplashLib) {
-        const char * splashLibPath;
-        splashLibPath = SPLASHSCREEN_SO;
-        hSplashLib = dlopen(splashLibPath, RTLD_LAZY | RTLD_GLOBAL);
+        int ret;
+        char jrePath[MAXPATHLEN];
+        char splashPath[MAXPATHLEN];
+
+        if (!GetJREPath(jrePath, sizeof(jrePath), GetArch(), JNI_FALSE)) {
+            JLI_ReportErrorMessage(JRE_ERROR1);
+            return NULL;
+        }
+        ret = JLI_Snprintf(splashPath, sizeof(splashPath), "%s/lib/%s/%s",
+                     jrePath, GetArch(), SPLASHSCREEN_SO);
+
+        if (ret >= (int) sizeof(splashPath)) {
+            JLI_ReportErrorMessage(JRE_ERROR11);
+            return NULL;
+        }
+        if (ret < 0) {
+            JLI_ReportErrorMessage(JRE_ERROR13);
+            return NULL;
+        }
+        hSplashLib = dlopen(splashPath, RTLD_LAZY | RTLD_GLOBAL);
+        JLI_TraceLauncher("Info: loaded %s\n", splashPath);
     }
     if (hSplashLib) {
         void* sym = dlsym(hSplashLib, name);
--- a/src/solaris/classes/java/lang/UNIXProcess.java.bsd	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/java/lang/UNIXProcess.java.bsd	Wed Oct 30 18:38:20 2013 +0000
@@ -337,40 +337,54 @@
      * able to read any buffered data lingering in the OS pipe buffer.
      */
     static class ProcessPipeInputStream extends BufferedInputStream {
+        private final Object closeLock = new Object();
+
         ProcessPipeInputStream(int fd) {
             super(new FileInputStream(newFileDescriptor(fd)));
         }
 
-        private static byte[] drainInputStream(InputStream in)
+        private InputStream drainInputStream(InputStream in)
                 throws IOException {
-            if (in == null) return null;
             int n = 0;
             int j;
             byte[] a = null;
-            while ((j = in.available()) > 0) {
+            synchronized (closeLock) {
+                if (buf == null) // asynchronous close()?
+                    return null; // discard
+                j = in.available();
+            }
+            while (j > 0) {
                 a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j);
-                n += in.read(a, n, j);
+                synchronized (closeLock) {
+                    if (buf == null) // asynchronous close()?
+                        return null; // discard
+                    n += in.read(a, n, j);
+                    j = in.available();
+                }
             }
-            return (a == null || n == a.length) ? a : Arrays.copyOf(a, n);
+            return (a == null) ?
+                    ProcessBuilder.NullInputStream.INSTANCE :
+                    new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n));
         }
 
         /** Called by the process reaper thread when the process exits. */
         synchronized void processExited() {
-            // Most BufferedInputStream methods are synchronized, but close()
-            // is not, and so we have to handle concurrent racing close().
             try {
                 InputStream in = this.in;
                 if (in != null) {
-                    byte[] stragglers = drainInputStream(in);
+                    InputStream stragglers = drainInputStream(in);
                     in.close();
-                    this.in = (stragglers == null) ?
-                        ProcessBuilder.NullInputStream.INSTANCE :
-                        new ByteArrayInputStream(stragglers);
-                    if (buf == null) // asynchronous close()?
-                        this.in = null;
+                    this.in = stragglers;
                 }
-            } catch (IOException ignored) {
-                // probably an asynchronous close().
+            } catch (IOException ignored) { }
+        }
+
+        @Override
+        public void close() throws IOException {
+            // BufferedInputStream#close() is not synchronized unlike most other methods.
+            // Synchronizing helps avoid racing with drainInputStream().
+            synchronized (closeLock) {
+                super.close();
             }
         }
     }
--- a/src/solaris/classes/java/lang/UNIXProcess.java.linux	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/java/lang/UNIXProcess.java.linux	Wed Oct 30 18:38:20 2013 +0000
@@ -339,40 +339,54 @@
      * able to read any buffered data lingering in the OS pipe buffer.
      */
     static class ProcessPipeInputStream extends BufferedInputStream {
+        private final Object closeLock = new Object();
+
         ProcessPipeInputStream(int fd) {
             super(new FileInputStream(newFileDescriptor(fd)));
         }
 
-        private static byte[] drainInputStream(InputStream in)
+        private InputStream drainInputStream(InputStream in)
                 throws IOException {
-            if (in == null) return null;
             int n = 0;
             int j;
             byte[] a = null;
-            while ((j = in.available()) > 0) {
+            synchronized (closeLock) {
+                if (buf == null) // asynchronous close()?
+                    return null; // discard
+                j = in.available();
+            }
+            while (j > 0) {
                 a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j);
-                n += in.read(a, n, j);
+                synchronized (closeLock) {
+                    if (buf == null) // asynchronous close()?
+                        return null; // discard
+                    n += in.read(a, n, j);
+                    j = in.available();
+                }
             }
-            return (a == null || n == a.length) ? a : Arrays.copyOf(a, n);
+            return (a == null) ?
+                    ProcessBuilder.NullInputStream.INSTANCE :
+                    new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n));
         }
 
         /** Called by the process reaper thread when the process exits. */
         synchronized void processExited() {
-            // Most BufferedInputStream methods are synchronized, but close()
-            // is not, and so we have to handle concurrent racing close().
             try {
                 InputStream in = this.in;
                 if (in != null) {
-                    byte[] stragglers = drainInputStream(in);
+                    InputStream stragglers = drainInputStream(in);
                     in.close();
-                    this.in = (stragglers == null) ?
-                        ProcessBuilder.NullInputStream.INSTANCE :
-                        new ByteArrayInputStream(stragglers);
-                    if (buf == null) // asynchronous close()?
-                        this.in = null;
+                    this.in = stragglers;
                 }
-            } catch (IOException ignored) {
-                // probably an asynchronous close().
+            } catch (IOException ignored) { }
+        }
+
+        @Override
+        public void close() throws IOException {
+            // BufferedInputStream#close() is not synchronized unlike most other methods.
+            // Synchronizing helps avoid racing with drainInputStream().
+            synchronized (closeLock) {
+                super.close();
             }
         }
     }
--- a/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java	Wed Oct 30 18:38:20 2013 +0000
@@ -70,12 +70,12 @@
                 // GIO may access file so need permission check
                 path.checkRead();
                 byte[] type = probeUsingGio(buffer.address());
-                return (type == null) ? null : new String(type);
+                return (type == null) ? null : Util.toString(type);
             } else {
                 byte[] type = probeUsingGnomeVfs(buffer.address());
                 if (type == null)
                     return null;
-                String s = new String(type);
+                String s = Util.toString(type);
                 return s.equals(GNOME_VFS_MIME_TYPE_UNKNOWN) ? null : s;
             }
         } finally {
--- a/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java	Wed Oct 30 18:38:20 2013 +0000
@@ -51,7 +51,7 @@
     private static final String HIDDEN_NAME = "hidden";
 
     private static final String DOS_XATTR_NAME = "user.DOSATTRIB";
-    private static final byte[] DOS_XATTR_NAME_AS_BYTES = DOS_XATTR_NAME.getBytes();
+    private static final byte[] DOS_XATTR_NAME_AS_BYTES = Util.toBytes(DOS_XATTR_NAME);
 
     private static final int DOS_XATTR_READONLY = 0x01;
     private static final int DOS_XATTR_HIDDEN   = 0x02;
@@ -225,7 +225,7 @@
                 byte[] buf = new byte[len];
                 unsafe.copyMemory(null, buffer.address(), buf,
                     Unsafe.ARRAY_BYTE_BASE_OFFSET, len);
-                String value = new String(buf); // platform encoding
+                String value = Util.toString(buf);
 
                 // should be something like 0x20
                 if (value.length() >= 3 && value.startsWith("0x")) {
@@ -263,7 +263,7 @@
                 newValue &= ~flag;
             }
             if (newValue != oldValue) {
-                byte[] value = ("0x" + Integer.toHexString(newValue)).getBytes();
+                byte[] value = Util.toBytes("0x" + Integer.toHexString(newValue));
                 NativeBuffer buffer = NativeBuffers.asNativeBuffer(value);
                 try {
                     LinuxNativeDispatcher.fsetxattr(fd, DOS_XATTR_NAME_AS_BYTES,
--- a/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	Wed Oct 30 18:38:20 2013 +0000
@@ -98,7 +98,8 @@
             int fd = path.openForAttributeAccess(false);
             try {
                 // fgetxattr returns size if called with size==0
-                LinuxNativeDispatcher.fgetxattr(fd, "user.java".getBytes(), 0L, 0);
+                byte[] name = Util.toBytes("user.java");
+                LinuxNativeDispatcher.fgetxattr(fd, name, 0L, 0);
                 return true;
             } catch (UnixException e) {
                 // attribute does not exist
--- a/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java	Wed Oct 30 18:38:20 2013 +0000
@@ -78,7 +78,7 @@
     Iterable<UnixMountEntry> getMountEntries(String fstab) {
         ArrayList<UnixMountEntry> entries = new ArrayList<>();
         try {
-            long fp = setmntent(fstab.getBytes(), "r".getBytes());
+            long fp = setmntent(Util.toBytes(fstab), Util.toBytes("r"));
             try {
                 for (;;) {
                     UnixMountEntry entry = new UnixMountEntry();
--- a/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java	Wed Oct 30 18:38:20 2013 +0000
@@ -53,7 +53,7 @@
         if (name == null)
             throw new NullPointerException("'name' is null");
         name = USER_NAMESPACE + name;
-        byte[] bytes = name.getBytes();
+        byte[] bytes = Util.toBytes(name);
         if (bytes.length > XATTR_NAME_MAX) {
             throw new FileSystemException(file.getPathForExceptionMessage(),
                 null, "'" + name + "' is too big");
@@ -72,7 +72,7 @@
                 byte[] value = new byte[len];
                 unsafe.copyMemory(null, address+start, value,
                     Unsafe.ARRAY_BYTE_BASE_OFFSET, len);
-                String s = new String(value);
+                String s = Util.toString(value);
                 if (s.startsWith(USER_NAMESPACE)) {
                     s = s.substring(USER_NAMESPACE.length());
                     list.add(s);
--- a/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java	Wed Oct 30 18:38:20 2013 +0000
@@ -42,9 +42,11 @@
 class SolarisUserDefinedFileAttributeView
     extends AbstractUserDefinedFileAttributeView
 {
+    private static final byte[] HERE = { '.' };
+
     private byte[] nameAsBytes(UnixPath file, String name) throws IOException {
-        byte[] bytes = name.getBytes();
-        //  "", "." and ".." not allowed
+        byte[] bytes = Util.toBytes(name);
+        // "", "." and ".." not allowed
         if (bytes.length == 0 || bytes[0] == '.') {
             if (bytes.length <= 1 ||
                 (bytes.length == 2 && bytes[1] == '.'))
@@ -73,7 +75,7 @@
         try {
             try {
                 // open extended attribute directory
-                int dfd = openat(fd, ".".getBytes(), (O_RDONLY|O_XATTR), 0);
+                int dfd = openat(fd, HERE, (O_RDONLY|O_XATTR), 0);
                 long dp;
                 try {
                     dp = fdopendir(dfd);
@@ -87,7 +89,7 @@
                 try {
                     byte[] name;
                     while ((name = readdir(dp)) != null) {
-                        String s = new String(name);
+                        String s = Util.toString(name);
                         if (!s.equals(".") && !s.equals(".."))
                             list.add(s);
                     }
@@ -217,7 +219,7 @@
 
         int fd = file.openForAttributeAccess(followLinks);
         try {
-            int dfd = openat(fd, ".".getBytes(), (O_RDONLY|O_XATTR), 0);
+            int dfd = openat(fd, HERE, (O_RDONLY|O_XATTR), 0);
             try {
                 unlinkat(dfd, nameAsBytes(file,name), 0);
             } finally {
@@ -243,7 +245,7 @@
     static void copyExtendedAttributes(int ofd, int nfd) {
         try {
             // open extended attribute directory
-            int dfd = openat(ofd, ".".getBytes(), (O_RDONLY|O_XATTR), 0);
+            int dfd = openat(ofd, HERE, (O_RDONLY|O_XATTR), 0);
             long dp = 0L;
             try {
                 dp = fdopendir(dfd);
--- a/src/solaris/classes/sun/nio/fs/UnixException.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/UnixException.java	Wed Oct 30 18:38:20 2013 +0000
@@ -61,7 +61,7 @@
         if (msg != null) {
             return msg;
         } else {
-            return new String(UnixNativeDispatcher.strerror(errno()));
+            return Util.toString(UnixNativeDispatcher.strerror(errno()));
         }
     }
 
--- a/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Wed Oct 30 18:38:20 2013 +0000
@@ -196,7 +196,7 @@
 
     @Override
     public String toString() {
-        StringBuilder sb = new StringBuilder(new String(entry.dir()));
+        StringBuilder sb = new StringBuilder(Util.toString(entry.dir()));
         sb.append(" (");
         sb.append(entry.name());
         sb.append(")");
--- a/src/solaris/classes/sun/nio/fs/UnixFileSystem.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/UnixFileSystem.java	Wed Oct 30 18:38:20 2013 +0000
@@ -49,7 +49,7 @@
     // package-private
     UnixFileSystem(UnixFileSystemProvider provider, String dir) {
         this.provider = provider;
-        this.defaultDirectory = UnixPath.normalizeAndCheck(dir).getBytes();
+        this.defaultDirectory = Util.toBytes(UnixPath.normalizeAndCheck(dir));
         if (this.defaultDirectory[0] != '/') {
             throw new RuntimeException("default directory must be absolute");
         }
@@ -204,7 +204,7 @@
                 SecurityManager sm = System.getSecurityManager();
                 if (sm != null) {
                     try {
-                        sm.checkRead(new String(entry.dir()));
+                        sm.checkRead(Util.toString(entry.dir()));
                     } catch (SecurityException x) {
                         continue;
                     }
--- a/src/solaris/classes/sun/nio/fs/UnixMountEntry.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/UnixMountEntry.java	Wed Oct 30 18:38:20 2013 +0000
@@ -43,12 +43,12 @@
     }
 
     String name() {
-        return new String(name);
+        return Util.toString(name);
     }
 
     String fstype() {
         if (fstypeAsString == null)
-            fstypeAsString = new String(fstype);
+            fstypeAsString = Util.toString(fstype);
         return fstypeAsString;
     }
 
@@ -65,7 +65,7 @@
      */
     boolean hasOption(String requested) {
         if (optionsAsString == null)
-            optionsAsString = new String(opts);
+            optionsAsString = Util.toString(opts);
         for (String opt: Util.split(optionsAsString, ',')) {
             if (opt.equals(requested))
                 return true;
--- a/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java	Wed Oct 30 18:38:20 2013 +0000
@@ -100,7 +100,7 @@
      */
     static long fopen(UnixPath filename, String mode) throws UnixException {
         NativeBuffer pathBuffer = copyToNativeBuffer(filename);
-        NativeBuffer modeBuffer = NativeBuffers.asNativeBuffer(mode.getBytes());
+        NativeBuffer modeBuffer = NativeBuffers.asNativeBuffer(Util.toBytes(mode));
         try {
             return fopen0(pathBuffer.address(), modeBuffer.address());
         } finally {
@@ -473,7 +473,7 @@
      * @return  passwd->pw_uid
      */
     static int getpwnam(String name) throws UnixException {
-        NativeBuffer buffer = NativeBuffers.asNativeBuffer(name.getBytes());
+        NativeBuffer buffer = NativeBuffers.asNativeBuffer(Util.toBytes(name));
         try {
             return getpwnam0(buffer.address());
         } finally {
@@ -488,7 +488,7 @@
      * @return  group->gr_name
      */
     static int getgrnam(String name) throws UnixException {
-        NativeBuffer buffer = NativeBuffers.asNativeBuffer(name.getBytes());
+        NativeBuffer buffer = NativeBuffers.asNativeBuffer(Util.toBytes(name));
         try {
             return getgrnam0(buffer.address());
         } finally {
--- a/src/solaris/classes/sun/nio/fs/UnixPath.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/UnixPath.java	Wed Oct 30 18:38:20 2013 +0000
@@ -120,7 +120,7 @@
         SoftReference<CharsetEncoder> ref = encoder.get();
         CharsetEncoder ce = (ref != null) ? ref.get() : null;
         if (ce == null) {
-            ce = Charset.defaultCharset().newEncoder()
+            ce = Util.jnuEncoding().newEncoder()
                 .onMalformedInput(CodingErrorAction.REPORT)
                 .onUnmappableCharacter(CodingErrorAction.REPORT);
             encoder.set(new SoftReference<CharsetEncoder>(ce));
@@ -186,7 +186,7 @@
     // use this path for permission checks
     String getPathForPermissionCheck() {
         if (getFileSystem().needToResolveAgainstDefaultDirectory()) {
-            return new String(getByteArrayForSysCalls());
+            return Util.toString(getByteArrayForSysCalls());
         } else {
             return toString();
         }
@@ -758,7 +758,7 @@
     public String toString() {
         // OK if two or more threads create a String
         if (stringValue == null) {
-            stringValue = fs.normalizeJavaPath(new String(path));     // platform encoding
+            stringValue = fs.normalizeJavaPath(Util.toString(path));     // platform encoding
         }
         return stringValue;
     }
--- a/src/solaris/classes/sun/nio/fs/UnixUserPrincipals.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/classes/sun/nio/fs/UnixUserPrincipals.java	Wed Oct 30 18:38:20 2013 +0000
@@ -115,7 +115,7 @@
     static User fromUid(int uid) {
         String name = null;
         try {
-            name = new String(getpwuid(uid));
+            name = Util.toString(getpwuid(uid));
         } catch (UnixException x) {
             name = Integer.toString(uid);
         }
@@ -126,7 +126,7 @@
     static Group fromGid(int gid) {
         String name = null;
         try {
-            name = new String(getgrgid(gid));
+            name = Util.toString(getgrgid(gid));
         } catch (UnixException x) {
             name = Integer.toString(gid);
         }
--- a/src/solaris/doc/sun/man/man1/ja/javaws.1	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-." Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
-." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-."
-." This code is free software; you can redistribute 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.
-."
-.TH javaws 1 "07 May 2011"
-
-.LP
-.SH "̾Á°"
-\f2javaws\fP ¥³¥Þ¥ó¥É¹Ô
-.LP
-.SH "̾Á°"
-.LP
-.LP
-\f2javaws\fP \- Java Web Start µ¯Æ°¥³¥Þ¥ó¥É
-.LP
-.SH "·Á¼°"
-.LP
-.LP
-\f2javaws [run\-options] <jnlp>\fP
-.LP
-.LP
-\f2javaws [control\-options]\fP
-.LP
-.SH "¥Ñ¥é¥á¡¼¥¿"
-.LP
-.LP
-\f2[run\-options]\fP
-.LP
-.LP
-¥³¥Þ¥ó¥É¹Ô¼Â¹Ô¥ª¥×¥·¥ç¥ó¡£¼Â¹Ô¥ª¥×¥·¥ç¥ó¤ÏǤ°Õ¤Î½ç½ø¤Ç»ØÄê¤Ç¤­¤Þ¤¹¡£³Æ¼ï¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤Ï¡¢²¼¤Î ¡Ö¼Â¹Ô¥ª¥×¥·¥ç¥ó¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.LP
-.LP
-\f2<jnlp>\fP
-.LP
-.LP
-JNLP (Java Network Launching Protocol) ¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹¤Þ¤¿¤Ï URL (Uniform Resource Locator) ¤Î¤É¤Á¤é¤«¤Ç¤¹¡£
-.LP
-.LP
-\f2[control\-options]\fP
-.LP
-.LP
-¥³¥Þ¥ó¥É¹ÔÀ©¸æ¥ª¥×¥·¥ç¥ó¡£À©¸æ¥ª¥×¥·¥ç¥ó¤ÏǤ°Õ¤Î½ç½ø¤Ç»ØÄê¤Ç¤­¤Þ¤¹¡£³Æ¼ï¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤Ï¡¢²¼¤Î ¡ÖÀ©¸æ¥ª¥×¥·¥ç¥ó¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.LP
-.SH "ÀâÌÀ"
-.LP
-.LP
-\f2javaws\fP ¥³¥Þ¥ó¥É¤Ï¡¢JNLP (Java Network Launching Protocol) ¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¼ÂÁõ¤Ç¤¢¤ë Java Web Start ¤òµ¯Æ°¤·¤Þ¤¹¡£Java Web Start ¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯¾å¤ÇÆ°ºî¤¹¤ë Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Þ¤¿¤Ï¥¢¥×¥ì¥Ã¥È¤òµ¯Æ°¤·¤Þ¤¹¡£
-.LP
-.LP
-JNLP ¥Õ¥¡¥¤¥ë¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢ \f2javaws\fP ¤Ï¡¢¤½¤Î JNLP ¥Õ¥¡¥¤¥ë¤Ç»ØÄꤵ¤ì¤¿ Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó/¥¢¥×¥ì¥Ã¥È¤òµ¯Æ°¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2javaws\fP µ¯Æ°¥Ä¡¼¥ë¤Ë¤Ï¡¢¸½ºß¤Î¥ê¥ê¡¼¥¹¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë 1 ÁȤΥª¥×¥·¥ç¥ó¤¬¤¢¤ê¤Þ¤¹¡£¤¿¤À¤·¡¢¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤Ï¾­Íè¤Î¥ê¥ê¡¼¥¹¤Ç¤Ïºï½ü¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£
-.LP
-.SH "¼Â¹Ô¥ª¥×¥·¥ç¥ó"
-.LP
-.LP
-\f2\-offline\fP
-.LP
-.LP
-Java Web Start ¤ò¥ª¥Õ¥é¥¤¥ó¥â¡¼¥É¤Ç¼Â¹Ô¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-Xnosplash\fP
-.LP
-.LP
-½é´ü¥¹¥×¥é¥Ã¥·¥å²èÌ̤òɽ¼¨¤·¤Þ¤»¤ó¡£
-.LP
-.LP
-\f2\-open <arguments>\fP
-.LP
-.LP
-¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢JNLP ¥Õ¥¡¥¤¥ëÆâ¤Î°ú¿ô¤¬ \f2\-open <arguments>\fP ¤ËÃÖ¤­´¹¤ï¤ê¤Þ¤¹¡£
-.LP
-.LP
-\f2\-print <arguments>\fP
-.LP
-.LP
-¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢JNLP ¥Õ¥¡¥¤¥ëÆâ¤Î°ú¿ô¤¬ \f2\-print <arguments>\fP ¤ËÃÖ¤­´¹¤ï¤ê¤Þ¤¹¡£
-.LP
-.LP
-\f2\-online\fP
-.LP
-.LP
-¥ª¥ó¥é¥¤¥ó¥â¡¼¥É¤ò»ÈÍѤ·¤Þ¤¹ (¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî)¡£
-.LP
-.LP
-\f2\-wait\fP
-.LP
-.LP
-¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¾ì¹ç¡¢ \f2javaws\fP ¥×¥í¥»¥¹¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬½ªÎ»¤¹¤ë¤Þ¤Ç½ªÎ»¤·¤Þ¤»¤ó¡£Windows ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¾å¤Ç¤Ï¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤ÏÀâÌÀ¤·¤¿¤È¤ª¤ê¤Ëµ¡Ç½¤·¤Þ¤»¤ó¡£
-.LP
-.LP
-\f2\-verbose\fP
-.LP
-.LP
-ÄɲäνÐÎϤòɽ¼¨¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-J<option>\fP
-.LP
-.LP
-vm ¤Ë¥ª¥×¥·¥ç¥ó¤òÊ䤤¤Þ¤¹¡£
-.LP
-.LP
-\f2\-system\fP
-.LP
-.LP
-¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥·¥¹¥Æ¥à¥­¥ã¥Ã¥·¥å¤«¤é¤Î¤ß¼Â¹Ô¤·¤Þ¤¹¡£
-.LP
-.SH "À©¸æ¥ª¥×¥·¥ç¥ó"
-.LP
-.LP
-\f2\-viewer\fP
-.LP
-.LP
-Java ¥³¥ó¥È¥í¡¼¥ë¥Ñ¥Í¥ë¤Ç¥­¥ã¥Ã¥·¥å¥Ó¥å¡¼¥¢¤òɽ¼¨¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-clearcache\fP
-.LP
-.LP
-¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¤¹¤Ù¤Æ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥­¥ã¥Ã¥·¥å¤«¤éºï½ü¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-userConfig <property name>\fP
-.LP
-.LP
-»ØÄꤵ¤ì¤¿ÇÛÈ÷¥×¥í¥Ñ¥Æ¥£¡¼¤ò¥¯¥ê¥¢¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-userConfig <property name> <property value>\fP
-.LP
-.LP
-»ØÄꤵ¤ì¤¿ÇÛÈ÷¥×¥í¥Ñ¥Æ¥£¡¼¤ò»ØÄꤵ¤ì¤¿ÃͤËÀßÄꤷ¤Þ¤¹¡£
-.LP
-.LP
-\f2\-uninstall\fP
-.LP
-.LP
-¥­¥ã¥Ã¥·¥å¤«¤é¤¹¤Ù¤Æ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òºï½ü¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-uninstall <jnlp>\fP
-.LP
-.LP
-¥­¥ã¥Ã¥·¥å¤«¤é¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òºï½ü¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-import [import\-options] <jnlp>\fP
-.LP
-.LP
-¥­¥ã¥Ã¥·¥å¤Ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥¤¥ó¥Ý¡¼¥È¤·¤Þ¤¹¡£
-.LP
-.SH "¥¤¥ó¥Ý¡¼¥È¥ª¥×¥·¥ç¥ó"
-.LP
-.LP
-\f2\-silent\fP
-.LP
-.LP
-¥µ¥¤¥ì¥ó¥È¥â¡¼¥É¤Ç¥¤¥ó¥Ý¡¼¥È¤·¤Þ¤¹ (UI ¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó)¡£
-.LP
-.LP
-\f2\-system\fP
-.LP
-.LP
-¥·¥¹¥Æ¥à¥­¥ã¥Ã¥·¥å¤Ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥¤¥ó¥Ý¡¼¥È¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-codebase <url>\fP
-.LP
-.LP
-Ǥ°Õ¤Î codebase ¤«¤é¥ê¥½¡¼¥¹¤ò¼èÆÀ¤·¤Þ¤¹¡£
-.LP
-.LP
-\f2\-shortcut\fP
-.LP
-.LP
-¥æ¡¼¥¶¡¼µöÍÆ¥×¥í¥ó¥×¥È¤Î¤è¤¦¤Ë¥·¥ç¡¼¥È¥«¥Ã¥È¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢ \f2\-silent\fP ¥ª¥×¥·¥ç¥ó¤â»ÈÍѤ·¤Ê¤¤¤È¸ú²Ì¤¬¤¢¤ê¤Þ¤»¤ó¡£
-.LP
-.LP
-\f2\-association\fP
-.LP
-.LP
-¥æ¡¼¥¶¡¼µöÍÆ¥×¥í¥ó¥×¥È¤Î¤è¤¦¤Ë´ØÏ¢ÉÕ¤±¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢ \f2\-silent\fP ¥ª¥×¥·¥ç¥ó¤â»ÈÍѤ·¤Ê¤¤¤È¸ú²Ì¤¬¤¢¤ê¤Þ¤»¤ó¡£
-.LP
-.SH "¥Õ¥¡¥¤¥ë"
-.LP
-.LP
-¥æ¡¼¥¶¡¼¥­¥ã¥Ã¥·¥å¡¢¥·¥¹¥Æ¥à¥­¥ã¥Ã¥·¥å¡¢¤ª¤è¤Ó deployment.properties ¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¤Ï¡¢
-.na
-\f2¥·¥¹¥Æ¥à¥ì¥Ù¥ë¤ª¤è¤Ó¥æ¡¼¥¶¡¼¥ì¥Ù¥ë¤Î¥×¥í¥Ñ¥Æ¥£¡¼\fP @
-.fi
-http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment\-guide/properties.html¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.LP
-.SH "¾ÜºÙ¾ðÊó"
-.LP
-.LP
-Java Web Start ¤Î¾ÜºÙ¤Ï¡¢
-.na
-\f2¡ÖJava Web Start¡×\fP @
-.fi
-http://java.sun.com/javase/6/docs/technotes/guides/javaws/index.html¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.LP
- 
--- a/src/solaris/doc/sun/man/man1/javaws.1	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-." Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
-." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-."
-." This code is free software; you can redistribute 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.
-."
-.TH javaws 1 "10 May 2011"
-
-.LP
-.SH "Name"
-\f2javaws\fP Command Line
-.LP
-.SH "NAME"
-.LP
-.LP
-\f2javaws\fP \- Java Web Start launcher command
-.LP
-.SH "SYNOPSIS"
-.LP
-.LP
-\f2javaws [run\-options] <jnlp>\fP
-.LP
-.LP
-\f2javaws [control\-options]\fP
-.LP
-.SH "PARAMETERS"
-.LP
-.LP
-\f2[run\-options]\fP
-.LP
-.LP
-Command\-line run\-options. run\-options may be in any order. For a discussion of the various run\-options, see RUN\-OPTIONS below.
-.LP
-.LP
-\f2<jnlp>\fP
-.LP
-.LP
-This can be either the path of, or the Uniform Resource Locater (URL) of the JNLP (Java Network Launching Protocol) file.
-.LP
-.LP
-\f2[control\-options]\fP
-.LP
-.LP
-Command\-line control\-options. control\-options may be in any order. For a discussion of the various control\-options, see CONTROL\-OPTIONS below.
-.LP
-.SH "DESCRIPTION"
-.LP
-.LP
-The \f2javaws\fP command launches Java Web Start, which is the reference implementation of the Java Network Launching Protocol (JNLP). Java Web Start launches Java applications/applets hosted on a network.
-.LP
-.LP
-If a JNLP file is specified, \f2javaws\fP will launch the Java application/applet specified in the JNLP file.
-.LP
-.LP
-The \f2javaws\fP launcher has a set of options that are supported in the current release. However, the options may be removed in a future release.
-.LP
-.SH "RUN\-OPTIONS"
-.LP
-.LP
-\f2\-offline\fP
-.LP
-.LP
-Run Java Web Start in offline mode.
-.LP
-.LP
-\f2\-Xnosplash\fP
-.LP
-.LP
-Do not display the initial splash screen.
-.LP
-.LP
-\f2\-open <arguments>\fP
-.LP
-.LP
-If specified, replaces the arguments in the jnlp file with \f2\-open <arguments>\fP.
-.LP
-.LP
-\f2\-print <arguments>\fP
-.LP
-.LP
-If specified, replaces the arguments in the jnlp file with \f2\-print <arguments>\fP.
-.LP
-.LP
-\f2\-online\fP
-.LP
-.LP
-Use online mode (default behavior).
-.LP
-.LP
-\f2\-wait\fP
-.LP
-.LP
-If specified, the \f2javaws\fP process will not exit until the application exits. This option does not function as described on Windows platforms.
-.LP
-.LP
-\f2\-verbose\fP
-.LP
-.LP
-Display additional output.
-.LP
-.LP
-\f2\-J<option>\fP
-.LP
-.LP
-Supply options to the VM.
-.LP
-.LP
-\f2\-system\fP
-.LP
-.LP
-Run the application from the system cache only.
-.LP
-.SH "CONTROL\-OPTIONS"
-.LP
-.LP
-\f2\-viewer\fP
-.LP
-.LP
-Show the Cache Viewer in the Java Control Panel.
-.LP
-.LP
-\f2\-clearcache\fP
-.LP
-.LP
-Remove all non\-installed applications from the cache.
-.LP
-.LP
-\f2\-userConfig <property name>\fP
-.LP
-.LP
-Clear the specified deployment property.
-.LP
-.LP
-\f2\-userConfig <property name> <property value>\fP
-.LP
-.LP
-Set the specified deployment property to the specified value.
-.LP
-.LP
-\f2\-uninstall\fP
-.LP
-.LP
-Remove all applications from the cache.
-.LP
-.LP
-\f2\-uninstall <jnlp>\fP
-.LP
-.LP
-Remove the application from the cache.
-.LP
-.LP
-\f2\-import [import\-options] <jnlp>\fP
-.LP
-.LP
-Import the application to the cache.
-.LP
-.SH "IMPORT\-OPTIONS"
-.LP
-.LP
-\f2\-silent\fP
-.LP
-.LP
-Import silently (with no user interface).
-.LP
-.LP
-\f2\-system\fP
-.LP
-.LP
-Import application to the system cache.
-.LP
-.LP
-\f2\-codebase <url>\fP
-.LP
-.LP
-Retrieve resources from the given codebase.
-.LP
-.LP
-\f2\-shortcut\fP
-.LP
-.LP
-Install shortcuts as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used.
-.LP
-.LP
-\f2\-association\fP
-.LP
-.LP
-Install associations as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used.
-.LP
-.SH "FILES"
-.LP
-.LP
-For information about the user and system cache and deployment.properties files, see 
-.na
-\f2System\- and User\-Level Properties\fP @
-.fi
-http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/properties.html.
-.LP
-.SH "MORE INFORMATION"
-.LP
-.LP
-For more information about Java Web Start, see 
-.na
-\f2Java Web Start\fP @
-.fi
-http://download.oracle.com/javase/7/docs/technotes/guides/javaws/index.html.
-.LP
- 
--- a/src/solaris/native/java/net/Inet4AddressImpl.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/native/java/net/Inet4AddressImpl.c	Wed Oct 30 18:38:20 2013 +0000
@@ -70,6 +70,8 @@
 
 
 #if defined(_ALLBSD_SOURCE) && !defined(HAS_GLIBC_GETHOSTBY_R)
+extern jobjectArray lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6);
+
 /* Use getaddrinfo(3), which is thread safe */
 /************************************************************************
  * Inet4AddressImpl
@@ -178,8 +180,7 @@
 
     if (error) {
         /* report error */
-        JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException",
-                        (char *)hostname);
+        ThrowUnknownHostExceptionWithGaiError(env, hostname, error);
         JNU_ReleaseStringPlatformChars(env, host, hostname);
         return NULL;
     } else {
@@ -379,8 +380,6 @@
     return (*env)->NewStringUTF(env, hostname);
 }
 
-extern jobjectArray lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6);
-
 /*
  * Find an internet address for a given hostname.  Note that this
  * code only works for addresses of type INET. The translation
--- a/src/solaris/native/java/net/Inet6AddressImpl.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/native/java/net/Inet6AddressImpl.c	Wed Oct 30 18:38:20 2013 +0000
@@ -122,10 +122,11 @@
 static jclass ni_ia6cls;
 static jmethodID ni_ia4ctrID;
 static jmethodID ni_ia6ctrID;
-static jfieldID ni_ia6ipaddressID;
+static jboolean preferIPv6Address;
 
 static void initializeInetClasses(JNIEnv *env)
 {
+    jfieldID ni_preferIPv6AddressID;
     static int initialized = 0;
     if (!initialized) {
         ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
@@ -136,7 +137,10 @@
         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_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
+        ni_preferIPv6AddressID =
+            (*env)->GetStaticFieldID(env, ni_iacls, "preferIPv6Address", "Z");
+        preferIPv6Address =
+            (*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID);
         initialized = 1;
     }
 }
@@ -147,7 +151,6 @@
 lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6)
 {
     jobjectArray result = NULL;
-    jboolean preferIPv6Address;
     char myhostname[NI_MAXHOST+1];
     struct ifaddrs *ifa = NULL;
     int familyOrder = 0;
@@ -159,9 +162,6 @@
     // Make sure static variables we need are set.
     initializeInetClasses(env);
 
-    /* get the address preference */
-    preferIPv6Address = (*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID);
-
     /* If the requested name matches this host's hostname, return IP addresses
      * from all attached interfaces. (#2844683 et al) This prevents undesired
      * PPP dialup, but may return addresses that don't actually correspond to
@@ -280,7 +280,6 @@
     const char *hostname;
     jobjectArray ret = 0;
     int retLen = 0;
-    jboolean preferIPv6Address;
 
     int error=0;
 #ifdef AF_INET6
@@ -298,36 +297,18 @@
 
 #ifdef MACOSX
     /*
-     * If getaddrinfo has failed and we're looking up the local machine, we
-     * attempt to get the address from getifaddrs. This ensures we get an
-     * IPv6 address for the local machine.
+     * If we're looking up the local machine, attempt to get the address
+     * from getifaddrs. This ensures we get an IPv6 address for the local
+     * machine.
      */
-    if (error) {
-        ret = lookupIfLocalhost(env, hostname, JNI_TRUE);
-        if (ret != NULL || (*env)->ExceptionCheck(env)) {
-            JNU_ReleaseStringPlatformChars(env, host, hostname);
-            return ret;
-        }
+    ret = lookupIfLocalhost(env, hostname, JNI_TRUE);
+    if (ret != NULL || (*env)->ExceptionCheck(env)) {
+        JNU_ReleaseStringPlatformChars(env, host, hostname);
+        return ret;
     }
 #endif
 
 #ifdef AF_INET6
-    static jfieldID ia_preferIPv6AddressID;
-    if (ia_preferIPv6AddressID == NULL) {
-        jclass c = (*env)->FindClass(env,"java/net/InetAddress");
-        if (c)  {
-            ia_preferIPv6AddressID =
-                (*env)->GetStaticFieldID(env, c, "preferIPv6Address", "Z");
-        }
-        if (ia_preferIPv6AddressID == NULL) {
-            JNU_ReleaseStringPlatformChars(env, host, hostname);
-            return NULL;
-        }
-    }
-    /* get the address preference */
-    preferIPv6Address
-        = (*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID);
-
     /* Try once, with our static buffer. */
     memset(&hints, 0, sizeof(hints));
     hints.ai_flags = AI_CANONNAME;
@@ -447,6 +428,7 @@
         }
 
         while (iterator != NULL) {
+            int ret1;
             if (iterator->ai_family == AF_INET) {
                 jobject iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID);
                 if (IS_NULL(iaObj)) {
@@ -459,26 +441,22 @@
                 inetIndex++;
             } else if (iterator->ai_family == AF_INET6) {
                 jint scope = 0;
-                jbyteArray ipaddress;
 
                 jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID);
                 if (IS_NULL(iaObj)) {
                     ret = NULL;
                     goto cleanupAndReturn;
                 }
-                ipaddress = (*env)->NewByteArray(env, 16);
-                if (IS_NULL(ipaddress)) {
+                ret1 = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr));
+                if (!ret1) {
                     ret = NULL;
                     goto cleanupAndReturn;
                 }
-                (*env)->SetByteArrayRegion(env, ipaddress, 0, 16,
-                                           (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr));
+
                 scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id;
                 if (scope != 0) { /* zero is default value, no need to set */
-                    (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope);
-                    (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
+                    setInet6Address_scopeid(env, iaObj, scope);
                 }
-                (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress);
                 setInetAddress_hostName(env, iaObj, host);
                 (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj);
                 inet6Index++;
--- a/src/solaris/native/java/net/NetworkInterface.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/native/java/net/NetworkInterface.c	Wed Oct 30 18:38:20 2013 +0000
@@ -118,7 +118,6 @@
 static jmethodID ni_ia4ctrID;
 static jmethodID ni_ia6ctrID;
 static jmethodID ni_ibctrID;
-static jfieldID ni_ia6ipaddressID;
 static jfieldID ni_ibaddressID;
 static jfieldID ni_ib4broadcastID;
 static jfieldID ni_ib4maskID;
@@ -171,32 +170,56 @@
 JNIEXPORT void JNICALL
 Java_java_net_NetworkInterface_init(JNIEnv *env, jclass cls) {
     ni_class = (*env)->FindClass(env,"java/net/NetworkInterface");
+    CHECK_NULL(ni_class);
     ni_class = (*env)->NewGlobalRef(env, ni_class);
+    CHECK_NULL(ni_class);
     ni_nameID = (*env)->GetFieldID(env, ni_class,"name", "Ljava/lang/String;");
+    CHECK_NULL(ni_nameID);
     ni_indexID = (*env)->GetFieldID(env, ni_class, "index", "I");
+    CHECK_NULL(ni_indexID);
     ni_addrsID = (*env)->GetFieldID(env, ni_class, "addrs", "[Ljava/net/InetAddress;");
+    CHECK_NULL(ni_addrsID);
     ni_bindsID = (*env)->GetFieldID(env, ni_class, "bindings", "[Ljava/net/InterfaceAddress;");
+    CHECK_NULL(ni_bindsID);
     ni_descID = (*env)->GetFieldID(env, ni_class, "displayName", "Ljava/lang/String;");
+    CHECK_NULL(ni_descID);
     ni_virutalID = (*env)->GetFieldID(env, ni_class, "virtual", "Z");
+    CHECK_NULL(ni_virutalID);
     ni_childsID = (*env)->GetFieldID(env, ni_class, "childs", "[Ljava/net/NetworkInterface;");
+    CHECK_NULL(ni_childsID);
     ni_parentID = (*env)->GetFieldID(env, ni_class, "parent", "Ljava/net/NetworkInterface;");
+    CHECK_NULL(ni_parentID);
     ni_ctrID = (*env)->GetMethodID(env, ni_class, "<init>", "()V");
+    CHECK_NULL(ni_ctrID);
 
     ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
+    CHECK_NULL(ni_iacls);
     ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
+    CHECK_NULL(ni_iacls);
     ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
+    CHECK_NULL(ni_ia4cls);
     ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
+    CHECK_NULL(ni_ia4cls);
     ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address");
+    CHECK_NULL(ni_ia6cls);
     ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls);
+    CHECK_NULL(ni_ia6cls);
     ni_ibcls = (*env)->FindClass(env, "java/net/InterfaceAddress");
+    CHECK_NULL(ni_ibcls);
     ni_ibcls = (*env)->NewGlobalRef(env, ni_ibcls);
+    CHECK_NULL(ni_ibcls);
     ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
+    CHECK_NULL(ni_ia4ctrID);
     ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
+    CHECK_NULL(ni_ia6ctrID);
     ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "<init>", "()V");
-    ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
+    CHECK_NULL(ni_ibctrID);
     ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;");
+    CHECK_NULL(ni_ibaddressID);
     ni_ib4broadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;");
+    CHECK_NULL(ni_ib4broadcastID);
     ni_ib4maskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S");
+    CHECK_NULL(ni_ib4maskID);
     ni_defaultIndexID = (*env)->GetStaticFieldID(env, ni_class, "defaultIndex", "I");
 }
 
@@ -332,11 +355,9 @@
 #ifdef AF_INET6
                 if (family == AF_INET6) {
                     jbyte *bytes = (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr);
-                    jbyteArray ipaddress = (*env)->GetObjectField(env, iaObj, ni_ia6ipaddressID);
                     jbyte caddr[16];
                     int i;
-
-                    (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr);
+                    getInet6Address_ipaddress(env, iaObj, (char *)caddr);
                     i = 0;
                     while (i < 16) {
                         if (caddr[i] != bytes[i]) {
@@ -668,21 +689,17 @@
             int scope=0;
             iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID);
             if (iaObj) {
-                jbyteArray ipaddress = (*env)->NewByteArray(env, 16);
-                if (ipaddress == NULL) {
+                int ret = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr));
+                if (ret == JNI_FALSE) {
                     return NULL;
                 }
-                (*env)->SetByteArrayRegion(env, ipaddress, 0, 16,
-                                                                        (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr));
 
                 scope = ((struct sockaddr_in6*)addrP->addr)->sin6_scope_id;
 
                 if (scope != 0) { /* zero is default value, no need to set */
-                    (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope);
-                    (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
-                    (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj);
+                    setInet6Address_scopeid(env, iaObj, scope);
+                    setInet6Address_scopeifname(env, iaObj, netifObj);
                 }
-                (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress);
             }
             ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
             if (ibObj) {
--- a/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Wed Oct 30 18:38:20 2013 +0000
@@ -2148,8 +2148,7 @@
             caddr[14] = ((address >> 8) & 0xff);
             caddr[15] = (address & 0xff);
         } else {
-            ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID);
-            (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr);
+            getInet6Address_ipaddress(env, iaObj, caddr);
         }
 
         memcpy((void *)&(mname6.ipv6mr_multiaddr), caddr, sizeof(struct in6_addr));
--- a/src/solaris/native/java/net/net_util_md.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/native/java/net/net_util_md.c	Wed Oct 30 18:38:20 2013 +0000
@@ -782,7 +782,6 @@
     /* needs work. 1. family 2. clean up him6 etc deallocate memory */
     if (ipv6_available() && !(family == IPv4 && v4MappedAddress == JNI_FALSE)) {
         struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)him;
-        jbyteArray ipaddress;
         jbyte caddr[16];
         jint address;
 
@@ -803,8 +802,7 @@
                 caddr[15] = (address & 0xff);
             }
         } else {
-            ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID);
-            (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr);
+            getInet6Address_ipaddress(env, iaObj, (char *)caddr);
         }
         memset((char *)him6, 0, sizeof(struct sockaddr_in6));
         him6->sin6_port = htons(port);
@@ -840,7 +838,7 @@
                  */
                 if (!cached_scope_id) {
                     if (ia6_scopeidID) {
-                        scope_id = (int)(*env)->GetIntField(env,iaObj,ia6_scopeidID);
+                        scope_id = getInet6Address_scopeid(env, iaObj);
                     }
                     if (scope_id != 0) {
                         /* check user-specified value for loopback case
@@ -884,7 +882,7 @@
 
         if (family != IPv4) {
             if (ia6_scopeidID) {
-                him6->sin6_scope_id = (int)(*env)->GetIntField(env, iaObj, ia6_scopeidID);
+                him6->sin6_scope_id = getInet6Address_scopeid(env, iaObj);
             }
         }
 #endif
--- a/src/solaris/native/sun/net/spi/DefaultProxySelector.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/solaris/native/sun/net/spi/DefaultProxySelector.c	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 #include "sun_net_spi_DefaultProxySelector.h"
 #include <dlfcn.h>
 #include <stdio.h>
+#include <stdlib.h>
 #if defined(__linux__) || defined(_ALLBSD_SOURCE)
 #include <string.h>
 #else
@@ -60,6 +61,10 @@
  * - /system/proxy/no_proxy_for                 list
  * - /system/proxy/gopher_host                  string
  * - /system/proxy/gopher_port                  int
+ *
+ * The following keys are not used in the new gnome 3
+ * - /system/http_proxy/use_http_proxy
+ * - /system/http_proxy/use_same_proxy
  */
 typedef void* gconf_client_get_default_func();
 typedef char* gconf_client_get_string_func(void *, char *, void**);
@@ -74,6 +79,36 @@
 gconf_init_func* my_gconf_init_func = NULL;
 g_type_init_func* my_g_type_init_func = NULL;
 
+
+/*
+ * GProxyResolver provides synchronous and asynchronous network
+ * proxy resolution. It is based on GSettings, which is the standard
+ * of Gnome 3, to get system settings.
+ *
+ * In the current implementation, GProxyResolver has a higher priority
+ * than the old GConf. And we only resolve the proxy synchronously. In
+ * the future, we can also do the asynchronous network proxy resolution
+ * if necessary.
+ *
+ */
+typedef struct _GProxyResolver GProxyResolver;
+typedef struct _GSocketConnectable GSocketConnectable;
+typedef struct GError GError;
+typedef GProxyResolver* g_proxy_resolver_get_default_func();
+typedef char** g_proxy_resolver_lookup_func();
+typedef GSocketConnectable* g_network_address_parse_uri_func();
+typedef const char* g_network_address_get_hostname_func();
+typedef unsigned short g_network_address_get_port_func();
+typedef void g_strfreev_func();
+
+static g_proxy_resolver_get_default_func* g_proxy_resolver_get_default = NULL;
+static g_proxy_resolver_lookup_func* g_proxy_resolver_lookup = NULL;
+static g_network_address_parse_uri_func* g_network_address_parse_uri = NULL;
+static g_network_address_get_hostname_func* g_network_address_get_hostname = NULL;
+static g_network_address_get_port_func* g_network_address_get_port = NULL;
+static g_strfreev_func* g_strfreev = NULL;
+
+
 static jclass proxy_class;
 static jclass isaddr_class;
 static jclass ptype_class;
@@ -83,11 +118,363 @@
 static jfieldID ptype_httpID;
 static jfieldID ptype_socksID;
 
-static int gconf_ver = 0;
+
 static void* gconf_client = NULL;
 
+static int use_gproxyResolver = 0;
+static int use_gconf = 0;
+
 #define CHECK_NULL(X) { if ((X) == NULL) fprintf (stderr,"JNI errror at line %d\n", __LINE__); }
 
+
+static int initGConf() {
+    /**
+     * Let's try to load GConf-2 library
+     */
+    if (dlopen(JNI_LIB_NAME("gconf-2"), RTLD_GLOBAL | RTLD_LAZY) != NULL ||
+        dlopen(VERSIONED_JNI_LIB_NAME("gconf-2", "4"),
+               RTLD_GLOBAL | RTLD_LAZY) != NULL)
+    {
+        /*
+         * Now let's get pointer to the functions we need.
+         */
+        my_g_type_init_func =
+                (g_type_init_func*)dlsym(RTLD_DEFAULT, "g_type_init");
+        my_get_default_func =
+                (gconf_client_get_default_func*)dlsym(RTLD_DEFAULT,
+                        "gconf_client_get_default");
+
+        if (my_g_type_init_func != NULL && my_get_default_func != NULL) {
+            /**
+             * Try to connect to GConf.
+             */
+            (*my_g_type_init_func)();
+            gconf_client = (*my_get_default_func)();
+            if (gconf_client != NULL) {
+                my_get_string_func =
+                        (gconf_client_get_string_func*)dlsym(RTLD_DEFAULT,
+                                "gconf_client_get_string");
+                my_get_int_func =
+                        (gconf_client_get_int_func*)dlsym(RTLD_DEFAULT,
+                                "gconf_client_get_int");
+                my_get_bool_func =
+                        (gconf_client_get_bool_func*)dlsym(RTLD_DEFAULT,
+                                "gconf_client_get_bool");
+                if (my_get_int_func != NULL && my_get_string_func != NULL &&
+                        my_get_bool_func != NULL)
+                {
+                    /**
+                     * We did get all we need. Let's enable the System Proxy Settings.
+                     */
+                    return 1;
+                }
+            }
+        }
+    }
+    return 0;
+}
+
+static jobject getProxyByGConf(JNIEnv *env, const char* cproto,
+                               const char* chost)
+{
+    char *phost = NULL;
+    char *mode = NULL;
+    int pport = 0;
+    int use_proxy = 0;
+    int use_same_proxy = 0;
+    jobject isa = NULL;
+    jobject proxy = NULL;
+    jobject type_proxy = NULL;
+
+    // We only check manual proxy configurations
+    mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
+    if (mode && !strcasecmp(mode, "manual")) {
+        /*
+         * Even though /system/http_proxy/use_same_proxy is no longer used,
+         * its value is set to false in gnome 3. So it is not harmful to check
+         * it first in case jdk is used with an old gnome.
+         */
+        use_same_proxy = (*my_get_bool_func)(gconf_client, "/system/http_proxy/use_same_proxy", NULL);
+        if (use_same_proxy) {
+            phost = (*my_get_string_func)(gconf_client, "/system/http_proxy/host", NULL);
+            pport = (*my_get_int_func)(gconf_client, "/system/http_proxy/port", NULL);
+            use_proxy = (phost != NULL && pport != 0);
+            if (use_proxy)
+                type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
+        }
+
+        if (!use_proxy) {
+            /**
+             * HTTP:
+             * /system/http_proxy/use_http_proxy (boolean) - it's no longer used
+             * /system/http_proxy/host (string)
+             * /system/http_proxy/port (integer)
+             */
+            if (strcasecmp(cproto, "http") == 0) {
+                phost = (*my_get_string_func)(gconf_client, "/system/http_proxy/host", NULL);
+                pport = (*my_get_int_func)(gconf_client, "/system/http_proxy/port", NULL);
+                use_proxy = (phost != NULL && pport != 0);
+                if (use_proxy)
+                    type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
+            }
+
+            /**
+             * HTTPS:
+             * /system/proxy/mode (string) [ "manual" means use proxy settings ]
+             * /system/proxy/secure_host (string)
+             * /system/proxy/secure_port (integer)
+             */
+            if (strcasecmp(cproto, "https") == 0) {
+                phost = (*my_get_string_func)(gconf_client, "/system/proxy/secure_host", NULL);
+                pport = (*my_get_int_func)(gconf_client, "/system/proxy/secure_port", NULL);
+                use_proxy = (phost != NULL && pport != 0);
+                if (use_proxy)
+                    type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
+            }
+
+            /**
+             * FTP:
+             * /system/proxy/mode (string) [ "manual" means use proxy settings ]
+             * /system/proxy/ftp_host (string)
+             * /system/proxy/ftp_port (integer)
+             */
+            if (strcasecmp(cproto, "ftp") == 0) {
+                phost = (*my_get_string_func)(gconf_client, "/system/proxy/ftp_host", NULL);
+                pport = (*my_get_int_func)(gconf_client, "/system/proxy/ftp_port", NULL);
+                use_proxy = (phost != NULL && pport != 0);
+                if (use_proxy)
+                    type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
+            }
+
+            /**
+             * GOPHER:
+             * /system/proxy/mode (string) [ "manual" means use proxy settings ]
+             * /system/proxy/gopher_host (string)
+             * /system/proxy/gopher_port (integer)
+             */
+            if (strcasecmp(cproto, "gopher") == 0) {
+                phost = (*my_get_string_func)(gconf_client, "/system/proxy/gopher_host", NULL);
+                pport = (*my_get_int_func)(gconf_client, "/system/proxy/gopher_port", NULL);
+                use_proxy = (phost != NULL && pport != 0);
+                if (use_proxy)
+                    type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
+            }
+
+            /**
+             * SOCKS:
+             * /system/proxy/mode (string) [ "manual" means use proxy settings ]
+             * /system/proxy/socks_host (string)
+             * /system/proxy/socks_port (integer)
+             */
+            if (strcasecmp(cproto, "socks") == 0) {
+                phost = (*my_get_string_func)(gconf_client, "/system/proxy/socks_host", NULL);
+                pport = (*my_get_int_func)(gconf_client, "/system/proxy/socks_port", NULL);
+                use_proxy = (phost != NULL && pport != 0);
+                if (use_proxy)
+                    type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_socksID);
+            }
+        }
+    }
+
+    if (use_proxy) {
+        jstring jhost;
+        char *noproxyfor;
+        char *s;
+
+        /**
+         * check for the exclude list (aka "No Proxy For" list).
+         * It's a list of comma separated suffixes (e.g. domain name).
+         */
+        noproxyfor = (*my_get_string_func)(gconf_client, "/system/proxy/no_proxy_for", NULL);
+        if (noproxyfor != NULL) {
+            char *tmpbuf[512];
+            s = strtok_r(noproxyfor, ", ", tmpbuf);
+
+            while (s != NULL && strlen(s) <= strlen(chost)) {
+                if (strcasecmp(chost+(strlen(chost) - strlen(s)), s) == 0) {
+                    /**
+                     * the URL host name matches with one of the sufixes,
+                     * therefore we have to use a direct connection.
+                     */
+                    use_proxy = 0;
+                    break;
+                }
+                s = strtok_r(NULL, ", ", tmpbuf);
+            }
+        }
+        if (use_proxy) {
+            CHECK_NULL(type_proxy);
+            jhost = (*env)->NewStringUTF(env, phost);
+            isa = (*env)->CallStaticObjectMethod(env, isaddr_class, isaddr_createUnresolvedID, jhost, pport);
+            proxy = (*env)->NewObject(env, proxy_class, proxy_ctrID, type_proxy, isa);
+        }
+    }
+
+    return proxy;
+}
+
+static int initGProxyResolver() {
+    void *gio_handle;
+
+    gio_handle = dlopen("libgio-2.0.so", RTLD_LAZY);
+    if (!gio_handle) {
+        gio_handle = dlopen("libgio-2.0.so.0", RTLD_LAZY);
+        if (!gio_handle) {
+            return 0;
+        }
+    }
+
+    my_g_type_init_func = (g_type_init_func*)dlsym(gio_handle, "g_type_init");
+
+    g_proxy_resolver_get_default =
+            (g_proxy_resolver_get_default_func*)dlsym(gio_handle,
+                    "g_proxy_resolver_get_default");
+
+    g_proxy_resolver_lookup =
+            (g_proxy_resolver_lookup_func*)dlsym(gio_handle,
+                    "g_proxy_resolver_lookup");
+
+    g_network_address_parse_uri =
+            (g_network_address_parse_uri_func*)dlsym(gio_handle,
+                    "g_network_address_parse_uri");
+
+    g_network_address_get_hostname =
+            (g_network_address_get_hostname_func*)dlsym(gio_handle,
+                    "g_network_address_get_hostname");
+
+    g_network_address_get_port =
+            (g_network_address_get_port_func*)dlsym(gio_handle,
+                    "g_network_address_get_port");
+
+    g_strfreev = (g_strfreev_func*)dlsym(gio_handle, "g_strfreev");
+
+    if (!my_g_type_init_func ||
+        !g_proxy_resolver_get_default ||
+        !g_proxy_resolver_lookup ||
+        !g_network_address_parse_uri ||
+        !g_network_address_get_hostname ||
+        !g_network_address_get_port ||
+        !g_strfreev)
+    {
+        dlclose(gio_handle);
+        return 0;
+    }
+
+    (*my_g_type_init_func)();
+    return 1;
+}
+
+static jobject getProxyByGProxyResolver(JNIEnv *env, const char* cproto,
+                                        const char* chost)
+{
+    GProxyResolver* resolver = NULL;
+    char** proxies = NULL;
+    GError *error = NULL;
+
+    size_t protoLen = 0;
+    size_t hostLen = 0;
+    char* uri = NULL;
+
+    jobject objProxy = NULL;
+
+    resolver = (*g_proxy_resolver_get_default)();
+    if (resolver == NULL) {
+        return NULL;
+    }
+
+    // Construct the uri, cproto + "://" + chost
+    protoLen = strlen(cproto);
+    hostLen = strlen(chost);
+    uri = malloc(protoLen + hostLen + 4);
+    if (!uri) {
+        // Out of memory
+        return NULL;
+    }
+    memcpy(uri, cproto, protoLen);
+    memcpy(uri + protoLen, "://", 3);
+    memcpy(uri + protoLen + 3, chost, hostLen + 1);
+
+    /*
+     * Looks into the system proxy configuration to determine what proxy,
+     * if any, to use to connect to uri. The returned proxy URIs are of
+     * the form <protocol>://[user[:password]@]host:port or direct://,
+     * where <protocol> could be http, rtsp, socks or other proxying protocol.
+     * direct:// is used when no proxy is needed.
+     */
+    proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error);
+    free(uri);
+
+    if (proxies) {
+        if (!error) {
+            int i;
+            for(i = 0; proxies[i] && !objProxy; i++) {
+                if (strcmp(proxies[i], "direct://")) {
+                    GSocketConnectable* conn =
+                            (*g_network_address_parse_uri)(proxies[i], 0,
+                                                           &error);
+                    if (conn && !error) {
+                        const char* phost = NULL;
+                        unsigned short pport = 0;
+                        phost = (*g_network_address_get_hostname)(conn);
+                        pport = (*g_network_address_get_port)(conn);
+                        if (phost && pport > 0) {
+                            jobject type_proxy = NULL;
+                            jstring jhost = NULL;
+                            jobject isa = NULL;
+                            jfieldID ptype_ID = ptype_httpID;
+                            if (!strncmp(proxies[i], "socks", 5)) {
+                                ptype_ID = ptype_socksID;
+                            }
+
+                            type_proxy = (*env)->GetStaticObjectField(env,
+                                    ptype_class, ptype_ID);
+                            CHECK_NULL(type_proxy);
+                            jhost = (*env)->NewStringUTF(env, phost);
+                            CHECK_NULL(jhost);
+                            isa = (*env)->CallStaticObjectMethod(env,
+                                    isaddr_class, isaddr_createUnresolvedID,
+                                    jhost, pport);
+                            CHECK_NULL(isa);
+                            objProxy = (*env)->NewObject(env, proxy_class,
+                                    proxy_ctrID, type_proxy, isa);
+                        }
+                    }
+                }
+            }
+        }
+        (*g_strfreev)(proxies);
+    }
+
+    return objProxy;
+}
+
+static void initJavaClass(JNIEnv *env) {
+    jclass cls = NULL;
+    CHECK_NULL(cls = (*env)->FindClass(env,"java/net/Proxy"));
+    proxy_class = (*env)->NewGlobalRef(env, cls);
+    CHECK_NULL(cls = (*env)->FindClass(env,"java/net/Proxy$Type"));
+    ptype_class = (*env)->NewGlobalRef(env, cls);
+    CHECK_NULL(cls = (*env)->FindClass(env, "java/net/InetSocketAddress"));
+    isaddr_class = (*env)->NewGlobalRef(env, cls);
+    proxy_ctrID = (*env)->GetMethodID(env, proxy_class, "<init>",
+            "(Ljava/net/Proxy$Type;Ljava/net/SocketAddress;)V");
+    CHECK_NULL(proxy_ctrID);
+    pr_no_proxyID = (*env)->GetStaticFieldID(env, proxy_class, "NO_PROXY",
+            "Ljava/net/Proxy;");
+    CHECK_NULL(pr_no_proxyID);
+    ptype_httpID = (*env)->GetStaticFieldID(env, ptype_class, "HTTP",
+            "Ljava/net/Proxy$Type;");
+    CHECK_NULL(ptype_httpID);
+    ptype_socksID = (*env)->GetStaticFieldID(env, ptype_class, "SOCKS",
+            "Ljava/net/Proxy$Type;");
+    CHECK_NULL(ptype_socksID);
+    isaddr_createUnresolvedID = (*env)->GetStaticMethodID(env, isaddr_class,
+            "createUnresolved",
+            "(Ljava/lang/String;I)Ljava/net/InetSocketAddress;");
+    CHECK_NULL(isaddr_createUnresolvedID);
+}
+
+
 /*
  * Class:     sun_net_spi_DefaultProxySelector
  * Method:    init
@@ -95,57 +482,17 @@
  */
 JNIEXPORT jboolean JNICALL
 Java_sun_net_spi_DefaultProxySelector_init(JNIEnv *env, jclass clazz) {
-  jclass cls = NULL;
-  CHECK_NULL(cls = (*env)->FindClass(env,"java/net/Proxy"));
-  proxy_class = (*env)->NewGlobalRef(env, cls);
-  CHECK_NULL(cls = (*env)->FindClass(env,"java/net/Proxy$Type"));
-  ptype_class = (*env)->NewGlobalRef(env, cls);
-  CHECK_NULL(cls = (*env)->FindClass(env, "java/net/InetSocketAddress"));
-  isaddr_class = (*env)->NewGlobalRef(env, cls);
-  proxy_ctrID = (*env)->GetMethodID(env, proxy_class, "<init>", "(Ljava/net/Proxy$Type;Ljava/net/SocketAddress;)V");
-  pr_no_proxyID = (*env)->GetStaticFieldID(env, proxy_class, "NO_PROXY", "Ljava/net/Proxy;");
-  ptype_httpID = (*env)->GetStaticFieldID(env, ptype_class, "HTTP", "Ljava/net/Proxy$Type;");
-  ptype_socksID = (*env)->GetStaticFieldID(env, ptype_class, "SOCKS", "Ljava/net/Proxy$Type;");
-  isaddr_createUnresolvedID = (*env)->GetStaticMethodID(env, isaddr_class, "createUnresolved", "(Ljava/lang/String;I)Ljava/net/InetSocketAddress;");
+    use_gproxyResolver = initGProxyResolver();
+    if (!use_gproxyResolver)
+        use_gconf = initGConf();
 
-  /**
-   * Let's try to load le GConf-2 library
-   */
-  if (dlopen(JNI_LIB_NAME("gconf-2"), RTLD_GLOBAL | RTLD_LAZY) != NULL ||
-      dlopen(VERSIONED_JNI_LIB_NAME("gconf-2", "4"),
-             RTLD_GLOBAL | RTLD_LAZY) != NULL) {
-    gconf_ver = 2;
-  }
-  if (gconf_ver > 0) {
-    /*
-     * Now let's get pointer to the functions we need.
-     */
-    my_g_type_init_func = (g_type_init_func*) dlsym(RTLD_DEFAULT, "g_type_init");
-    my_get_default_func = (gconf_client_get_default_func*) dlsym(RTLD_DEFAULT, "gconf_client_get_default");
-    if (my_g_type_init_func != NULL && my_get_default_func != NULL) {
-      /**
-       * Try to connect to GConf.
-       */
-      (*my_g_type_init_func)();
-      gconf_client = (*my_get_default_func)();
-      if (gconf_client != NULL) {
-        my_get_string_func = (gconf_client_get_string_func*) dlsym(RTLD_DEFAULT, "gconf_client_get_string");
-        my_get_int_func = (gconf_client_get_int_func*) dlsym(RTLD_DEFAULT, "gconf_client_get_int");
-        my_get_bool_func = (gconf_client_get_bool_func*) dlsym(RTLD_DEFAULT, "gconf_client_get_bool");
-        if (my_get_int_func != NULL && my_get_string_func != NULL &&
-            my_get_bool_func != NULL) {
-          /**
-           * We did get all we need. Let's enable the System Proxy Settings.
-           */
-          return JNI_TRUE;
-        }
-      }
-    }
-  }
-  return JNI_FALSE;
+    if (use_gproxyResolver || use_gconf) {
+        initJavaClass(env);
+        return JNI_TRUE;
+    } else
+        return JNI_FALSE;
 }
 
-
 /*
  * Class:     sun_net_spi_DefaultProxySelector
  * Method:    getSystemProxy
@@ -157,179 +504,35 @@
                                                      jstring proto,
                                                      jstring host)
 {
-  char *phost = NULL;
-  char *mode = NULL;
-  int pport = 0;
-  int use_proxy = 0;
-  int use_same_proxy = 0;
-  const char* urlhost;
-  jobject isa = NULL;
-  jobject proxy = NULL;
-  jobject type_proxy = NULL;
-  jobject no_proxy = NULL;
-  const char *cproto;
-  jboolean isCopy;
-
-  if (gconf_ver > 0) {
-    if (gconf_client == NULL) {
-      (*my_g_type_init_func)();
-      gconf_client = (*my_get_default_func)();
-    }
-    if (gconf_client != NULL) {
-      cproto = (*env)->GetStringUTFChars(env, proto, &isCopy);
-      if (cproto != NULL) {
-        /**
-         * We will have to check protocol by protocol as they do use different
-         * entries.
-         */
-
-        use_same_proxy = (*my_get_bool_func)(gconf_client, "/system/http_proxy/use_same_proxy", NULL);
-        if (use_same_proxy) {
-          use_proxy = (*my_get_bool_func)(gconf_client, "/system/http_proxy/use_http_proxy", NULL);
-          if (use_proxy) {
-            phost = (*my_get_string_func)(gconf_client, "/system/http_proxy/host", NULL);
-            pport = (*my_get_int_func)(gconf_client, "/system/http_proxy/port", NULL);
-          }
-        }
+    const char* cproto;
+    const char* chost;
 
-        /**
-         * HTTP:
-         * /system/http_proxy/use_http_proxy (boolean)
-         * /system/http_proxy/host (string)
-         * /system/http_proxy/port (integer)
-         */
-        if (strcasecmp(cproto, "http") == 0) {
-          use_proxy = (*my_get_bool_func)(gconf_client, "/system/http_proxy/use_http_proxy", NULL);
-          if (use_proxy) {
-            if (!use_same_proxy) {
-              phost = (*my_get_string_func)(gconf_client, "/system/http_proxy/host", NULL);
-              pport = (*my_get_int_func)(gconf_client, "/system/http_proxy/port", NULL);
-            }
-            CHECK_NULL(type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID));
-          }
-        }
+    jboolean isProtoCopy;
+    jboolean isHostCopy;
 
-        /**
-         * HTTPS:
-         * /system/proxy/mode (string) [ "manual" means use proxy settings ]
-         * /system/proxy/secure_host (string)
-         * /system/proxy/secure_port (integer)
-         */
-        if (strcasecmp(cproto, "https") == 0) {
-          mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
-          if (mode != NULL && (strcasecmp(mode,"manual") == 0)) {
-            if (!use_same_proxy) {
-              phost = (*my_get_string_func)(gconf_client, "/system/proxy/secure_host", NULL);
-              pport = (*my_get_int_func)(gconf_client, "/system/proxy/secure_port", NULL);
-            }
-            use_proxy = (phost != NULL);
-            if (use_proxy)
-              type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
-          }
-        }
+    jobject proxy = NULL;
+
+    cproto = (*env)->GetStringUTFChars(env, proto, &isProtoCopy);
 
-        /**
-         * FTP:
-         * /system/proxy/mode (string) [ "manual" means use proxy settings ]
-         * /system/proxy/ftp_host (string)
-         * /system/proxy/ftp_port (integer)
-         */
-        if (strcasecmp(cproto, "ftp") == 0) {
-          mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
-          if (mode != NULL && (strcasecmp(mode,"manual") == 0)) {
-            if (!use_same_proxy) {
-              phost = (*my_get_string_func)(gconf_client, "/system/proxy/ftp_host", NULL);
-              pport = (*my_get_int_func)(gconf_client, "/system/proxy/ftp_port", NULL);
-            }
-            use_proxy = (phost != NULL);
-            if (use_proxy)
-              type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
-          }
-        }
-
-        /**
-         * GOPHER:
-         * /system/proxy/mode (string) [ "manual" means use proxy settings ]
-         * /system/proxy/gopher_host (string)
-         * /system/proxy/gopher_port (integer)
-         */
-        if (strcasecmp(cproto, "gopher") == 0) {
-          mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
-          if (mode != NULL && (strcasecmp(mode,"manual") == 0)) {
-            if (!use_same_proxy) {
-              phost = (*my_get_string_func)(gconf_client, "/system/proxy/gopher_host", NULL);
-              pport = (*my_get_int_func)(gconf_client, "/system/proxy/gopher_port", NULL);
-            }
-            use_proxy = (phost != NULL);
-            if (use_proxy)
-              type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_httpID);
-          }
-        }
+    if (cproto != NULL && (use_gproxyResolver || use_gconf)) {
+        chost = (*env)->GetStringUTFChars(env, host, &isHostCopy);
+        if (chost != NULL) {
+            if (use_gproxyResolver)
+                proxy = getProxyByGProxyResolver(env, cproto, chost);
+            else if (use_gconf)
+                proxy = getProxyByGConf(env, cproto, chost);
 
-        /**
-         * SOCKS:
-         * /system/proxy/mode (string) [ "manual" means use proxy settings ]
-         * /system/proxy/socks_host (string)
-         * /system/proxy/socks_port (integer)
-         */
-        if (strcasecmp(cproto, "socks") == 0) {
-          mode =  (*my_get_string_func)(gconf_client, "/system/proxy/mode", NULL);
-          if (mode != NULL && (strcasecmp(mode,"manual") == 0)) {
-            if (!use_same_proxy) {
-              phost = (*my_get_string_func)(gconf_client, "/system/proxy/socks_host", NULL);
-              pport = (*my_get_int_func)(gconf_client, "/system/proxy/socks_port", NULL);
-            }
-            use_proxy = (phost != NULL);
-            if (use_proxy)
-              type_proxy = (*env)->GetStaticObjectField(env, ptype_class, ptype_socksID);
-          }
+            if (isHostCopy == JNI_TRUE)
+                (*env)->ReleaseStringUTFChars(env, host, chost);
         }
-
-        if (isCopy == JNI_TRUE)
-          (*env)->ReleaseStringUTFChars(env, proto, cproto);
-
-        if (use_proxy && (phost != NULL)) {
-          jstring jhost;
-          char *noproxyfor;
-          char *s;
+        if (isProtoCopy == JNI_TRUE)
+            (*env)->ReleaseStringUTFChars(env, proto, cproto);
+    }
 
-          /**
-           * check for the exclude list (aka "No Proxy For" list).
-           * It's a list of comma separated suffixes (e.g. domain name).
-           */
-          noproxyfor = (*my_get_string_func)(gconf_client, "/system/proxy/no_proxy_for", NULL);
-          if (noproxyfor != NULL) {
-            char *tmpbuf[512];
+    if (proxy == NULL) {
+        CHECK_NULL(proxy = (*env)->GetStaticObjectField(env, proxy_class,
+                                                        pr_no_proxyID));
+    }
+    return proxy;
+}
 
-            s = strtok_r(noproxyfor, ", ", tmpbuf);
-            urlhost = (*env)->GetStringUTFChars(env, host, &isCopy);
-            if (urlhost != NULL) {
-              while (s != NULL && strlen(s) <= strlen(urlhost)) {
-                if (strcasecmp(urlhost+(strlen(urlhost) - strlen(s)), s) == 0) {
-                  /**
-                   * the URL host name matches with one of the sufixes,
-                   * therefore we have to use a direct connection.
-                   */
-                  use_proxy = 0;
-                  break;
-                }
-                s = strtok_r(NULL, ", ", tmpbuf);
-              }
-              if (isCopy == JNI_TRUE)
-                (*env)->ReleaseStringUTFChars(env, host, urlhost);
-            }
-          }
-          if (use_proxy) {
-            jhost = (*env)->NewStringUTF(env, phost);
-            isa = (*env)->CallStaticObjectMethod(env, isaddr_class, isaddr_createUnresolvedID, jhost, pport);
-            proxy = (*env)->NewObject(env, proxy_class, proxy_ctrID, type_proxy, isa);
-            return proxy;
-          }
-        }
-      }
-    }
-  }
-
-  CHECK_NULL(no_proxy = (*env)->GetStaticObjectField(env, proxy_class, pr_no_proxyID));
-  return no_proxy;
-}
--- a/src/windows/native/java/net/Inet4AddressImpl.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/windows/native/java/net/Inet4AddressImpl.c	Wed Oct 30 18:38:20 2013 +0000
@@ -241,6 +241,10 @@
           addrp++;
           i++;
         }
+    } else if (WSAGetLastError() == WSATRY_AGAIN) {
+        NET_ThrowByNameWithLastError(env,
+                                     JNU_JAVANETPKG "UnknownHostException",
+                                     hostname);
     } else {
         JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", hostname);
     }
--- a/src/windows/native/java/net/Inet6AddressImpl.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/windows/native/java/net/Inet6AddressImpl.c	Wed Oct 30 18:38:20 2013 +0000
@@ -77,7 +77,6 @@
 static jclass ni_ia6cls;
 static jmethodID ni_ia4ctrID;
 static jmethodID ni_ia6ctrID;
-static jfieldID ni_ia6ipaddressID;
 static int initialized = 0;
 
 JNIEXPORT jobjectArray JNICALL
@@ -101,7 +100,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_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
       initialized = 1;
     }
     if (IS_NULL(host)) {
@@ -134,11 +132,19 @@
     error = getaddrinfo(hostname, NULL, &hints, &res);
 
     if (error) {
-        /* report error */
-        JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException",
-                        (char *)hostname);
-        JNU_ReleaseStringPlatformChars(env, host, hostname);
-        return NULL;
+        if (WSAGetLastError() == WSATRY_AGAIN) {
+            NET_ThrowByNameWithLastError(env,
+                                         JNU_JAVANETPKG "UnknownHostException",
+                                         hostname);
+            JNU_ReleaseStringPlatformChars(env, host, hostname);
+            return NULL;
+        } else {
+            /* report error */
+            JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException",
+                            (char *)hostname);
+            JNU_ReleaseStringPlatformChars(env, host, hostname);
+            return NULL;
+        }
     } else {
         int i = 0;
         int inetCount = 0, inet6Count = 0, inetIndex, inet6Index;
@@ -242,26 +248,22 @@
               (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj);
                 inetIndex ++;
             } else if (iterator->ai_family == AF_INET6) {
-              jint scope = 0;
-              jbyteArray ipaddress;
+              jint scope = 0, ret1;
               jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID);
               if (IS_NULL(iaObj)) {
                 ret = NULL;
                 goto cleanupAndReturn;
               }
-              ipaddress = (*env)->NewByteArray(env, 16);
-              if (IS_NULL(ipaddress)) {
+              ret1 = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr));
+
+              if (ret1 == JNI_FALSE) {
                 ret = NULL;
                 goto cleanupAndReturn;
               }
-              (*env)->SetByteArrayRegion(env, ipaddress, 0, 16,
-                                         (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr));
               scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id;
               if (scope != 0) { /* zero is default value, no need to set */
-                (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope);
-                (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
+                setInet6Address_scopeid(env, iaObj, scope);
               }
-              (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress);
               setInetAddress_hostName(env, iaObj, host);
               (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj);
               inet6Index ++;
--- a/src/windows/native/java/net/NetworkInterface.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/windows/native/java/net/NetworkInterface.c	Wed Oct 30 18:38:20 2013 +0000
@@ -72,8 +72,6 @@
 
 jclass ni_ia6cls;           /* Inet6Address */
 jmethodID ni_ia6ctrID;      /* Inet6Address() */
-jfieldID ni_ia6ipaddressID;
-jfieldID ni_ia6ipaddressID;
 
 jclass ni_ibcls;            /* InterfaceAddress */
 jmethodID ni_ibctrID;       /* InterfaceAddress() */
@@ -502,33 +500,52 @@
      * Get the various JNI ids that we require
      */
     ni_class = (*env)->NewGlobalRef(env, cls);
+    CHECK_NULL(ni_class);
     ni_nameID = (*env)->GetFieldID(env, ni_class, "name", "Ljava/lang/String;");
+    CHECK_NULL(ni_nameID);
     ni_displayNameID = (*env)->GetFieldID(env, ni_class, "displayName", "Ljava/lang/String;");
+    CHECK_NULL(ni_displayNameID);
     ni_indexID = (*env)->GetFieldID(env, ni_class, "index", "I");
+    CHECK_NULL(ni_indexID);
     ni_addrsID = (*env)->GetFieldID(env, ni_class, "addrs", "[Ljava/net/InetAddress;");
+    CHECK_NULL(ni_addrsID);
     ni_bindsID = (*env)->GetFieldID(env, ni_class, "bindings", "[Ljava/net/InterfaceAddress;");
+    CHECK_NULL(ni_bindsID);
     ni_childsID = (*env)->GetFieldID(env, ni_class, "childs", "[Ljava/net/NetworkInterface;");
+    CHECK_NULL(ni_childsID);
     ni_ctor = (*env)->GetMethodID(env, ni_class, "<init>", "()V");
+    CHECK_NULL(ni_ctor);
 
     ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
+    CHECK_NULL(ni_iacls);
     ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
+    CHECK_NULL(ni_iacls);
 
     ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
+    CHECK_NULL(ni_ia4cls);
     ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
+    CHECK_NULL(ni_ia4cls);
     ni_ia4Ctor = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
+    CHECK_NULL(ni_ia4Ctor);
 
     ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address");
+    CHECK_NULL(ni_ia6cls);
     ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls);
+    CHECK_NULL(ni_ia6cls);
     ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
-    ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
+    CHECK_NULL(ni_ia6ctrID);
 
     ni_ibcls = (*env)->FindClass(env, "java/net/InterfaceAddress");
+    CHECK_NULL(ni_ibcls);
     ni_ibcls = (*env)->NewGlobalRef(env, ni_ibcls);
+    CHECK_NULL(ni_ibcls);
     ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "<init>", "()V");
+    CHECK_NULL(ni_ibctrID);
     ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;");
+    CHECK_NULL(ni_ibaddressID);
     ni_ibbroadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;");
+    CHECK_NULL(ni_ibbroadcastID);
     ni_ibmaskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S");
-
 }
 
 /*
@@ -621,19 +638,16 @@
             int scope;
             iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID);
             if (iaObj) {
-                jbyteArray ipaddress = (*env)->NewByteArray(env, 16);
-                if (ipaddress == NULL) {
+                int ret = setInet6Address_ipaddress(env, iaObj,  (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr));
+                if (ret == JNI_FALSE) {
                     return NULL;
                 }
-                (*env)->SetByteArrayRegion(env, ipaddress, 0, 16,
-                    (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr));
+
                 scope = addrs->addr.him6.sin6_scope_id;
                 if (scope != 0) { /* zero is default value, no need to set */
-                    (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope);
-                    (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
-                    (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj);
+                    setInet6Address_scopeid(env, iaObj, scope);
+                    setInet6Address_scopeifname(env, iaObj, netifObj);
                 }
-                (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress);
                 ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
                 if (ibObj == NULL) {
                   free_netaddr(netaddrP);
--- a/src/windows/native/java/net/NetworkInterface_winXP.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/windows/native/java/net/NetworkInterface_winXP.c	Wed Oct 30 18:38:20 2013 +0000
@@ -549,19 +549,15 @@
             int scope;
             iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID);
             if (iaObj) {
-                jbyteArray ipaddress = (*env)->NewByteArray(env, 16);
-                if (ipaddress == NULL) {
+                int ret = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr));
+                if (ret == JNI_FALSE) {
                     return NULL;
                 }
-                (*env)->SetByteArrayRegion(env, ipaddress, 0, 16,
-                    (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr));
                 scope = addrs->addr.him6.sin6_scope_id;
                 if (scope != 0) { /* zero is default value, no need to set */
-                    (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope);
-                    (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
-                    (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj);
+                    setInet6Address_scopeid(env, iaObj, scope);
+                    setInet6Address_scopeifname(env, iaObj, netifObj);
                 }
-                (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress);
                 ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
                 if (ibObj == NULL) {
                   free_netaddr(netaddrP);
--- a/src/windows/native/java/net/TwoStacksPlainSocketImpl.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/windows/native/java/net/TwoStacksPlainSocketImpl.c	Wed Oct 30 18:38:20 2013 +0000
@@ -728,7 +728,6 @@
         setInetAddress_family(env, socketAddressObj, IPv4);
         (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj);
     } else {
-        jbyteArray addr;
         /* AF_INET6 -> Inet6Address */
         if (inet6Cls == 0) {
             jclass c = (*env)->FindClass(env, "java/net/Inet6Address");
@@ -751,14 +750,10 @@
             NET_SocketClose(fd);
             return;
         }
-        addr = (*env)->GetObjectField (env, socketAddressObj, ia6_ipaddressID);
-        (*env)->SetByteArrayRegion (env, addr, 0, 16, (const char *)&him.him6.sin6_addr);
+        setInet6Address_ipaddress(env, socketAddressObj, (const char *)&him.him6.sin6_addr);
         setInetAddress_family(env, socketAddressObj, IPv6);
-        scope = him.him6.sin6_scope_id;
-        (*env)->SetIntField(env, socketAddressObj, ia6_scopeidID, scope);
-        if(scope>0) {
-            (*env)->SetBooleanField(env, socketAddressObj, ia6_scopeidsetID, JNI_TRUE);
-        }
+        setInet6Address_scopeid(env, socketAddressObj, him.him6.sin6_scope_id);
+
     }
     /* fields common to AF_INET and AF_INET6 */
 
--- a/src/windows/native/java/net/net_util_md.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/windows/native/java/net/net_util_md.c	Wed Oct 30 18:38:20 2013 +0000
@@ -851,7 +851,6 @@
     family = (iafam == IPv4)? AF_INET : AF_INET6;
     if (ipv6_available() && !(family == AF_INET && v4MappedAddress == JNI_FALSE)) {
         struct SOCKADDR_IN6 *him6 = (struct SOCKADDR_IN6 *)him;
-        jbyteArray ipaddress;
         jbyte caddr[16];
         jint address, scopeid = 0;
         jint cached_scope_id = 0;
@@ -872,10 +871,9 @@
                 caddr[15] = (address & 0xff);
             }
         } else {
-            ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID);
-            scopeid = (jint)(*env)->GetIntField(env, iaObj, ia6_scopeidID);
+            getInet6Address_ipaddress(env, iaObj, (char *)caddr);
+            scopeid = getInet6Address_scopeid(env, iaObj);
             cached_scope_id = (jint)(*env)->GetIntField(env, iaObj, ia6_cachedscopeidID);
-            (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr);
         }
 
         memset((char *)him6, 0, sizeof(struct SOCKADDR_IN6));
--- a/src/windows/native/sun/nio/ch/SocketDispatcher.c	Wed Oct 30 18:37:50 2013 +0000
+++ b/src/windows/native/sun/nio/ch/SocketDispatcher.c	Wed Oct 30 18:38:20 2013 +0000
@@ -192,45 +192,66 @@
                                          jobject fdo, jlong address, jint len)
 {
     /* set up */
-    int i = 0;
+    int next_index, next_offset, ret=0;
     DWORD written = 0;
     jint fd = fdval(env, fdo);
     struct iovec *iovp = (struct iovec *)address;
     WSABUF *bufs = malloc(len * sizeof(WSABUF));
-    jint rem = MAX_BUFFER_SIZE;
+    jlong count = 0;
 
     if (bufs == 0) {
         JNU_ThrowOutOfMemoryError(env, 0);
         return IOS_THROWN;
     }
 
-    /* copy iovec into WSABUF */
-    for(i=0; i<len; i++) {
-        jint iov_len = iovp[i].iov_len;
-        if (iov_len > rem)
-            iov_len = rem;
-        bufs[i].buf = (char *)iovp[i].iov_base;
-        bufs[i].len = (u_long)iov_len;
-        rem -= iov_len;
-        if (rem == 0) {
-            len = i+1;
+    // next buffer and offset to consume
+    next_index = 0;
+    next_offset = 0;
+
+    while (next_index  < len) {
+        DWORD buf_count = 0;
+
+        /* Prepare the WSABUF array to a maximum total size of MAX_BUFFER_SIZE */
+        jint rem = MAX_BUFFER_SIZE;
+        while (next_index < len && rem > 0) {
+            jint iov_len = iovp[next_index].iov_len - next_offset;
+            char* ptr = (char *)iovp[next_index].iov_base;
+            ptr += next_offset;
+            if (iov_len > rem) {
+                iov_len = rem;
+                next_offset += rem;
+            } else {
+                next_index ++;
+                next_offset = 0;
+            }
+
+            bufs[buf_count].buf = ptr;
+            bufs[buf_count].len = (u_long)iov_len;
+            buf_count++;
+
+            rem -= iov_len;
+        }
+
+        /* write the buffers */
+        ret = WSASend((SOCKET)fd,           /* Socket */
+                              bufs,         /* pointers to the buffers */
+                              buf_count,    /* number of buffers to process */
+                              &written,     /* receives number of bytes written */
+                              0,            /* no flags */
+                              0,            /* no overlapped sockets */
+                              0);           /* no completion routine */
+
+        if (ret == SOCKET_ERROR) {
             break;
         }
+
+        count += written;
     }
 
-    /* read into the buffers */
-    i = WSASend((SOCKET)fd, /* Socket */
-            bufs,           /* pointers to the buffers */
-            (DWORD)len,     /* number of buffers to process */
-            &written,       /* receives number of bytes written */
-            0,              /* no flags */
-            0,              /* no overlapped sockets */
-            0);             /* no completion routine */
-
     /* clean up */
     free(bufs);
 
-    if (i != 0) {
+    if (ret == SOCKET_ERROR && count == 0) {
         int theErr = (jint)WSAGetLastError();
         if (theErr == WSAEWOULDBLOCK) {
             return IOS_UNAVAILABLE;
@@ -239,7 +260,7 @@
         return IOS_THROWN;
     }
 
-    return convertLongReturnVal(env, (jlong)written, JNI_FALSE);
+    return convertLongReturnVal(env, count, JNI_FALSE);
 }
 
 JNIEXPORT void JNICALL
--- a/test/Makefile	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/Makefile	Wed Oct 30 18:38:20 2013 +0000
@@ -484,7 +484,8 @@
 	  com/sun/org/apache/xerces \
           com/sun/corba \
 	  com/sun/tracing \
-	  sun/usagetracker)
+	  sun/usagetracker \
+	  misc)
 	$(call RunBatch)
 
 JDK_ALL_TARGETS += jdk_net
--- a/test/ProblemList.txt	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/ProblemList.txt	Wed Oct 30 18:38:20 2013 +0000
@@ -134,9 +134,8 @@
 # 8021230
 java/lang/ThreadLocal/ThreadLocalSupplierTest.java              generic-all
 
-# 8023201
-java/lang/instrument/RetransformBigClass.sh                     generic-all
-java/lang/instrument/RedefineBigClass.sh                        generic-all
+# 8026502
+java/lang/invoke/MethodHandleConstants.java                     generic-all
 
 ############################################################################
 
@@ -183,9 +182,6 @@
 # Filed 7036666
 com/sun/net/httpserver/Test9a.java                              generic-all
 
-# 7079145 java/net/ipv6tests/UdpTest.java hang at IPv6 only data exchange
-java/net/ipv6tests/UdpTest.java                                 linux-all
-
 # 7102670
 java/net/InetAddress/CheckJNI.java                              linux-all
 
@@ -270,14 +266,8 @@
 sun/security/pkcs11/Secmod/AddPrivateKey.java			linux-all
 sun/security/pkcs11/Secmod/TrustAnchors.java 			linux-all
 
-# 7041639, Solaris DSA keypair generation bug (Note: jdk_util also affected)
+# 7041639, Solaris DSA keypair generation bug
 java/security/KeyPairGenerator/SolarisShortDSA.java             solaris-all
-sun/security/tools/jarsigner/onlymanifest.sh                    solaris-all
-sun/security/tools/jarsigner/ts.sh                              solaris-all
-sun/security/tools/keytool/emptysubject.sh                      solaris-all
-sun/security/tools/keytool/importreadall.sh                     solaris-all
-sun/security/tools/keytool/readjar.sh                           solaris-all
-sun/security/tools/keytool/selfissued.sh                        solaris-all
 sun/security/tools/keytool/standard.sh                          solaris-all
 
 # 8000439: NPG: REGRESSION : sun/security/krb5/auto/MaxRetries.java fails with timeout
@@ -322,6 +312,9 @@
 # 8007410
 tools/launcher/FXLauncherTest.java                              linux-all
 
+# 7144200
+java/lang/management/ClassLoadingMXBean/LoadCounts.java		generic-all
+
 ############################################################################
 
 # jdk_jdi
@@ -345,7 +338,7 @@
 # Filed 6772009
 java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java generic-all
 
-# 7041639, Solaris DSA keypair generation bug
-java/util/TimeZone/TimeZoneDatePermissionCheck.sh               solaris-all
+# 8026772: test/sun/util/resources/TimeZone/Bug6317929.java failing
+sun/util/resources/TimeZone/Bug6317929.java                     generic-all
 
 ############################################################################
--- a/test/TEST.groups	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/TEST.groups	Wed Oct 30 18:38:20 2013 +0000
@@ -86,7 +86,6 @@
 # java.util.stream (JSR-335)
 jdk_stream = \
     java/util/Optional \
-    java/util/SummaryStatistics \
     java/util/function \
     java/util/stream
 
@@ -126,7 +125,6 @@
     javax/security  \
     com/sun/security \
     com/sun/org/apache/xml/internal/security \
-    com/oracle/security \
     sun/security \
     lib/security
 
@@ -319,7 +317,6 @@
   java/net/URLClassLoader/closetest/GetResourceAsStream.java \
   java/util/Collections/EmptyIterator.java \
   java/util/concurrent/locks/Lock/TimedAcquireLeak.java \
-  java/util/jar/Manifest/CreateManifest.java \
   java/util/jar/JarInputStream/ExtraFileInMetaInf.java \
   java/util/logging/AnonLoggerWeakRefLeak.sh \
   java/util/logging/LoggerWeakRefLeak.sh \
@@ -328,7 +325,8 @@
   jdk/lambda/separate/Compiler.java \
   sun/management/jdp/JdpTest.sh \
   sun/management/jmxremote/bootstrap/JvmstatCountersTest.java \
-  sun/management/jmxremote/bootstrap/LocalManagementTest.sh \
+  sun/management/jmxremote/bootstrap/LocalManagementTest.java \
+  sun/management/jmxremote/bootstrap/CustomLauncherTest.java \
   sun/misc/JarIndex/metaInfFilenames/Basic.java \
   sun/misc/JarIndex/JarIndexMergeForClassLoaderTest.java \
   sun/reflect/CallerSensitive/CallerSensitiveFinder.java \
@@ -358,8 +356,10 @@
   java/net/URLConnection/HandleContentTypeWithAttrs.java \
   java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh \
   java/security/Security/ClassLoaderDeadlock/Deadlock.sh \
+  java/util/jar/Manifest/CreateManifest.java \
   java/util/logging/Listeners.java \
   java/util/logging/ListenersWithSM.java \
+  java/util/logging/TestMainAppContext.java \
   java/util/ResourceBundle/Control/Bug6530694.java \
   java/text/Bidi/BidiConformance.java \
   java/text/Bidi/BidiEmbeddingTest.java \
@@ -527,10 +527,10 @@
   java/net/CookieHandler/EmptyCookieHeader.java \
   java/net/HttpCookie/IllegalCookieNameTest.java \
   java/net/HttpURLConnection/UnmodifiableMaps.java \
-  java/net/HttpURLPermission/URLTest.java \
   java/net/ResponseCache/Test.java \
   java/net/URLClassLoader/ClassLoad.java \
   java/net/URLClassLoader/closetest/CloseTest.java \
+  java/net/URLPermission/URLTest.java \
   java/nio/Buffer/Chars.java  \
   java/nio/file/Files/StreamTest.java  \
   java/security/BasicPermission/Wildcard.java \
@@ -538,7 +538,6 @@
   java/util/Arrays/SetAllTest.java  \
   java/util/BitSet/BitSetStreamTest.java  \
   java/util/Collection/CollectionDefaults.java  \
-  java/util/Collection/ListDefaults.java  \
   java/util/Collections/CheckedIdentityMap.java  \
   java/util/Collections/CheckedMapBash.java  \
   java/util/Collections/CheckedSetBash.java  \
@@ -550,6 +549,7 @@
   java/util/Comparator/TypeTest.java  \
   java/util/Iterator/IteratorDefaults.java  \
   java/util/Iterator/PrimitiveIteratorDefaults.java  \
+  java/util/List/ListDefaults.java  \
   java/util/Map/BasicSerialization.java  \
   java/util/Map/Defaults.java  \
   java/util/Map/EntryComparators.java  \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/corba/5036554/JavaBug.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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 bug;
+
+public class JavaBug {
+    public static void main(String[] args) {
+        try {
+            org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null);
+            org.omg.CORBA.Any any = orb.create_any();
+            myStringHelper.insert(any, "hello");
+            System.out.println("Any: " + myStringHelper.extract(any));
+        } catch( Exception e ) {
+            e.printStackTrace();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/corba/5036554/README	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+Bug # 5036554 unmarshal error on CORBA alias type in CORBA any
+
+Platform : ALL 
+
+Testcase directory :  <.../corba>
+
+Test Procedure : <STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
+Step 1: create a file bug.idl with the following content:
+
+// IDL file bug.idl
+module bug {
+    typedef string myString;
+};
+
+Step 2: Translate bug.idl with the command: idlj bug.idl
+This will create the file bug/myStringHelper.java
+
+Step 3:
+Create the file JavaBug.java in directory bug with the following content:
+
+// Java file JavaBug.java
+package bug;
+
+public class JavaBug {
+    public static void main(String[] args) {
+        try {
+            org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null);
+            org.omg.CORBA.Any any = orb.create_any();
+            myStringHelper.insert(any, "hello");
+            System.out.println("Any: " + myStringHelper.extract(any));
+        } catch( Exception e ) {
+            e.printStackTrace();
+        }
+    }
+}  
+
+Step 4:
+Compile all java files with the command: javac -d . bug\*.java
+
+Step 5:
+Execute the program with the command: java -cp . bug/JavaBug
+
+Step 6: Note the null pointer exception in the the output!
+
+
+Without Fix behaviour :  <java.lang.NullPointerException
+        at com.sun.corba.se.internal.corba.TCUtility.unmarshalIn(TCUtility.java:290)
+        at com.sun.corba.se.internal.corba.AnyImpl.read_value(AnyImpl.java:561)
+        at bug.myStringHelper.insert(myStringHelper.java:20)
+        at bug.JavaBug.main(JavaBug.java:8)>
+        
+With Fix behaviour :  <The output message printed on the console: "Any: hello">
+
+Other Comments :  <Test case is automated.>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/corba/5036554/TestCorbaBug.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,112 @@
+#!/bin/sh
+#
+# 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 5036554 6357706
+# @summary unmarshal error on CORBA alias type in CORBA any
+# @run shell TestCorbaBug.sh
+
+if [ "${TESTSRC}" = "" ]
+then TESTSRC=.
+fi
+
+if [ "${TESTJAVA}" = "" ]
+then
+  PARENT=`dirname \`which java\``
+  TESTJAVA=`dirname ${PARENT}`
+  echo "TESTJAVA not set, selecting " ${TESTJAVA}
+  echo "If this is incorrect, try setting the variable manually."
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+  SunOS | Linux | Darwin )
+    PS=":"
+    FS="/"
+    ;;
+  CYGWIN* )
+    PS=";"
+    FS="/"
+    ;;
+  Windows* )
+    PS=";"
+    FS="\\"
+    ;;
+  * )
+    echo "Unrecognized system!"
+    exit 1;
+    ;;
+esac
+
+CLASSPATH=.${PS}${TESTCLASSES}; export CLASSPATH
+
+THIS_DIR=`pwd`
+
+${TESTJAVA}${FS}bin${FS}java -version
+
+mkdir bug
+
+cp ${TESTSRC}${FS}bug.idl .
+${TESTJAVA}${FS}bin${FS}idlj bug.idl
+
+cp ${TESTSRC}${FS}JavaBug.java bug
+
+chmod -fR 777 bug
+
+${TESTJAVA}${FS}bin${FS}javac -d . bug${FS}*.java
+
+${TESTJAVA}${FS}bin${FS}java -cp . bug/JavaBug > test.out 2>&1 
+
+grep "NullPointerException" test.out
+
+ERROR=$?
+
+cat test.out
+
+if [ $ERROR = 0 ]
+then
+    echo "Test Failed"
+    exit 1
+fi
+
+grep "Any: hello" test.out
+
+STATUS=$?
+
+if [ $STATUS = 0 ]
+then
+    echo "Test Passed"
+    exit 0
+else
+    echo "Invalid output"
+    cat test.out
+    exit 2
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/corba/5036554/bug.idl	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,4 @@
+// IDL file bug.idl
+module bug {
+    typedef string myString;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/GetUninitializedStringValue.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,91 @@
+/*
+ * 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 8021897
+ *  @summary Test getting the value for an uninitialized String object
+ *
+ *  @author Staffan Larsen
+ *
+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
+ *  @run compile -g GetUninitializedStringValue.java
+ *  @run main GetUninitializedStringValue
+ */
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.StackFrame;
+import com.sun.jdi.StringReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.event.BreakpointEvent;
+
+ /********** target program **********/
+
+class GetUninitializedStringValueTarg {
+    public static void main(String[] args) {
+        new String("foo");
+        System.out.println("Goodbye from GetUninitializedStringValueTarg!");
+    }
+}
+
+ /********** test program **********/
+
+public class GetUninitializedStringValue extends TestScaffold {
+    ReferenceType targetClass;
+    ThreadReference mainThread;
+
+    GetUninitializedStringValue (String args[]) {
+        super(args);
+    }
+
+    public static void main(String[] args)
+        throws Exception
+    {
+        new GetUninitializedStringValue (args).startTests();
+    }
+
+    /********** test core **********/
+
+    protected void runTests()
+        throws Exception
+    {
+        /*
+         * Run to String.<init>
+         */
+        startUp("GetUninitializedStringValueTarg");
+        BreakpointEvent bpe = resumeTo("java.lang.String", "<init>", "(Ljava/lang/String;)V");
+
+        /*
+         * We've arrived. Look at 'this' - it will be uninitialized (the value field will not be set yet).
+         */
+        StackFrame frame = bpe.thread().frame(0);
+        StringReference sr = (StringReference)frame.thisObject();
+        if (!sr.value().equals("")) {
+            throw new Exception("Unexpected value for the uninitialized String");
+        }
+
+        /*
+         * resume the target listening for events
+         */
+        listenUntilVMDisconnect();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/LambdaBreakpointTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+/********** LINE NUMBER SENSITIVE! *****************************************************************/
+
+/**
+ *  @test
+ *  @summary Test setting breakpoints on lambda calls
+ *
+ *  @author Staffan Larsen
+ *
+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
+ *  @run compile -g LambdaBreakpointTest.java
+ *  @run main LambdaBreakpointTest
+ */
+import java.util.List;
+
+import com.sun.jdi.LocalVariable;
+import com.sun.jdi.Location;
+import com.sun.jdi.Method;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.StackFrame;
+import com.sun.jdi.StringReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.StepEvent;
+
+ /********** target program **********/
+
+class LambdaBreakpointTestTarg {
+
+    static int[] breakpointLines = {
+            62, 66, 63, 64, 65, 67
+    };
+
+    public static void main(String[] args) {
+        test();
+    }
+
+    private static void test() {
+        Runnable r = () -> {                          // B1: L62
+            String from = "lambda";                   // B3: L63
+            System.out.println("Hello from " + from); // B4: L64
+        };                                            // B5: L65
+        r.run();                                      // B2: L66
+        System.out.println("Goodbye.");               // B6: L67
+    }
+}
+
+
+ /********** test program **********/
+
+public class LambdaBreakpointTest extends TestScaffold {
+
+    LambdaBreakpointTest (String args[]) {
+        super(args);
+    }
+
+    public static void main(String[] args)
+        throws Exception
+    {
+        new LambdaBreakpointTest (args).startTests();
+    }
+
+    /********** test core **********/
+
+    protected void runTests()
+        throws Exception
+    {
+        startToMain("LambdaBreakpointTestTarg");
+
+        // Put a breakpoint on each location in the order they should happen
+        for (int line : LambdaBreakpointTestTarg.breakpointLines) {
+            System.out.println("Running to line: " + line);
+            BreakpointEvent be = resumeTo("LambdaBreakpointTestTarg", line);
+            int stoppedAt = be.location().lineNumber();
+            System.out.println("Stopped at line: " + stoppedAt);
+            if (stoppedAt != line) {
+                throw new Exception("Stopped on the wrong line: "
+                        + stoppedAt + " != " + line);
+            }
+        }
+
+        /*
+         * resume the target listening for events
+         */
+        listenUntilVMDisconnect();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/LambdaStepTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,185 @@
+/*
+ * 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 Test stepping through lambdas
+ *
+ *  @author Staffan Larsen
+ *
+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
+ *  @run compile -g LambdaStepTest.java
+ *  @run main LambdaStepTest
+ */
+import com.sun.jdi.LocalVariable;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.StackFrame;
+import com.sun.jdi.StringReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.StepEvent;
+
+ /********** target program **********/
+
+interface DefaultTest {
+    default void defaultMethod() {
+        String from = "default";
+        System.out.println("Hello from " + from);
+    }
+}
+class LambdaStepTestTarg implements DefaultTest {
+    private void test() {
+        String from = "test";
+        System.out.println("Hello from " + from);
+    }
+    private static void instanceTest() {
+        LambdaStepTestTarg l = new LambdaStepTestTarg();
+        l.test();
+    }
+    private static void lambdaTest() {
+        Runnable r = () -> {
+            String from = "lambda";
+            System.out.println("Hello from " + from);
+        };
+        r.run();
+    }
+    private static void defaultTest() {
+        LambdaStepTestTarg l = new LambdaStepTestTarg();
+        l.defaultMethod();
+    }
+    public static void main(String[] args) {
+        instanceTest();
+        lambdaTest();
+        defaultTest();
+        System.out.println("Goodbye from LambdaStepTestTarg!");
+    }
+}
+
+
+ /********** test program **********/
+
+public class LambdaStepTest extends TestScaffold {
+    LambdaStepTest (String args[]) {
+        super(args);
+    }
+
+    public static void main(String[] args)
+        throws Exception
+    {
+        new LambdaStepTest (args).startTests();
+    }
+
+    /********** test core **********/
+
+    protected void runTests()
+        throws Exception
+    {
+        // ## Normal instance method
+
+        BreakpointEvent bpe = startTo("LambdaStepTestTarg", "instanceTest", "()V");
+        ThreadReference thread = bpe.thread();
+
+        // step over allocation
+        StepEvent se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step into test();
+        se = stepIntoLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step over variable initialization
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // get value of variable "from"
+        StackFrame frame = se.thread().frame(0);
+        LocalVariable lv = frame.visibleVariableByName("from");
+        System.out.println(lv);
+        StringReference sr = (StringReference) frame.getValue(lv);
+        if (!sr.value().equals("test")) {
+            throw new Exception("Unexpected variable value in instanceTest: "+sr.value());
+        }
+
+
+        // ## Lambda method
+
+        bpe = resumeTo("LambdaStepTestTarg", "lambdaTest", "()V");
+        thread = bpe.thread();
+
+        // step over allocation
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step into run() of the lambda
+        se = stepIntoLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step over variable initialization
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // get value of variable "from"
+        frame = se.thread().frame(0);
+        lv = frame.visibleVariableByName("from");
+        System.out.println(lv);
+        sr = (StringReference) frame.getValue(lv);
+        if (!sr.value().equals("lambda")) {
+            throw new Exception("Unexpected variable value in lambdaTest: "+sr.value());
+        }
+
+
+        // ## Default method
+
+        bpe = resumeTo("LambdaStepTestTarg", "defaultTest", "()V");
+        thread = bpe.thread();
+
+        // step over allocation
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step into defaultMethod()
+        se = stepIntoLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step over variable initialization
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // get value of variable "from"
+        frame = se.thread().frame(0);
+        lv = frame.visibleVariableByName("from");
+        System.out.println(lv);
+        sr = (StringReference) frame.getValue(lv);
+        if (!sr.value().equals("default")) {
+            throw new Exception("Unexpected variable value in lambdaTest: "+sr.value());
+        }
+
+
+        /*
+         * resume the target listening for events
+         */
+        listenUntilVMDisconnect();
+
+    }
+}
--- a/test/com/sun/jdi/MethodEntryExitEvents.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/com/sun/jdi/MethodEntryExitEvents.java	Wed Oct 30 18:38:20 2013 +0000
@@ -108,14 +108,11 @@
     final int expectedExitCount = 1 + (15 * 3);
     int methodExitCount = 0;
 
-    /*
-     * Class patterns for which we don't want events (copied
-     * from the "Trace.java" example):
-     *     http://java.sun.com/javase/technologies/core/toolsapis/jpda/
-     */
-    private String[] excludes = {"java.*", "javax.*", "sun.*",
-                                 "com.sun.*", "com.oracle.*",
-                                 "oracle.*", "jdk.internal.*"};
+    // Classes which we are interested in
+    private List includes = Arrays.asList(new String[] {
+        "MethodEntryExitEventsDebugee",
+        "t2"
+    });
 
     MethodEntryExitEvents (String args[]) {
         super(args);
@@ -161,6 +158,10 @@
         str.disable();
     }
     public void methodEntered(MethodEntryEvent event) {
+        if (!includes.contains(event.method().declaringType().name())) {
+            return;
+        }
+
         if (! finishedCounting) {
             // We have to count the entry to loopComplete, but
             // not the exit
@@ -176,6 +177,10 @@
     }
 
     public void methodExited(MethodExitEvent event) {
+        if (!includes.contains(event.method().declaringType().name())) {
+            return;
+        }
+
         if (! finishedCounting){
             methodExitCount++;
             System.out.print  (" Method exit  number: ");
@@ -214,6 +219,10 @@
         connect((String[]) argList.toArray(args2));
         waitForVMStart();
 
+        // Determine main thread
+        ClassPrepareEvent e = resumeToPrepareOf("MethodEntryExitEventsDebugee");
+        mainThread = e.thread();
+
         try {
 
             /*
@@ -223,6 +232,7 @@
                 eventRequestManager().createExceptionRequest(null, // refType (null == all instances)
                                                              true, // notifyCaught
                                                              true);// notifyUncaught
+            exceptionRequest.addThreadFilter(mainThread);
             exceptionRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL);
             exceptionRequest.enable();
 
@@ -231,9 +241,7 @@
              */
             MethodEntryRequest entryRequest =
                eventRequestManager().createMethodEntryRequest();
-            for (int i=0; i<excludes.length; ++i) {
-                entryRequest.addClassExclusionFilter(excludes[i]);
-            }
+            entryRequest.addThreadFilter(mainThread);
             entryRequest.setSuspendPolicy(sessionSuspendPolicy);
             entryRequest.enable();
 
@@ -242,10 +250,7 @@
              */
             MethodExitRequest exitRequest =
                 eventRequestManager().createMethodExitRequest();
-
-            for (int i=0; i<excludes.length; ++i) {
-                exitRequest.addClassExclusionFilter(excludes[i]);
-            }
+            exitRequest.addThreadFilter(mainThread);
             exitRequest.setSuspendPolicy(sessionSuspendPolicy);
             exitRequest.enable();
 
--- a/test/com/sun/jdi/MethodExitReturnValuesTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/com/sun/jdi/MethodExitReturnValuesTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -209,18 +209,13 @@
 
 
 public class MethodExitReturnValuesTest extends TestScaffold {
-
-    /*
-     * Class patterns for which we don't want events (copied
-     * from the "Trace.java" example):
-     *     http://java.sun.com/javase/technologies/core/toolsapis/jpda/
-     */
-    private String[] excludes = {
-        "javax.*",
-        "sun.*",
-        "com.sun.*",
-        "com.oracle.*",
-        "oracle.*"};
+    // Classes which we are interested in
+    private List includes = Arrays.asList(new String[] {
+        "MethodExitReturnValuesTarg",
+        "java.lang.reflect.Array",
+        "java.lang.StrictMath",
+        "java.lang.String"
+    });
 
     static VirtualMachineManager vmm ;
     ClassType targetClass;
@@ -487,6 +482,11 @@
     // This is the MethodExitEvent handler.
     public void methodExited(MethodExitEvent event) {
         String origMethodName = event.method().name();
+
+        if (!includes.contains(event.method().declaringType().name())) {
+            return;
+        }
+
         if (vmm.majorInterfaceVersion() >= 1 &&
             vmm.minorInterfaceVersion() >= 6 &&
             vm().canGetMethodReturnValues()) {
@@ -560,10 +560,8 @@
          */
         MethodExitRequest exitRequest =
             eventRequestManager().createMethodExitRequest();
+        exitRequest.addThreadFilter(mainThread);
 
-        for (int i=0; i<excludes.length; ++i) {
-            exitRequest.addClassExclusionFilter(excludes[i]);
-        }
         int sessionSuspendPolicy = EventRequest.SUSPEND_ALL;
         //sessionSuspendPolicy = EventRequest.SUSPEND_EVENT_THREAD;
         //sessionSuspendPolicy = EventRequest.SUSPEND_NONE;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/NullThreadGroupNameTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,112 @@
+/*
+ * 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 7105883
+ *  @summary Ensure that JDWP doesn't crash with a null thread group name
+ *
+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
+ *  @run main NullThreadGroupNameTest
+ */
+import com.sun.jdi.*;
+import com.sun.jdi.connect.*;
+import com.sun.jdi.event.*;
+import com.sun.jdi.request.*;
+import com.sun.jdi.VMDisconnectedException;
+import java.util.concurrent.CountDownLatch;
+import java.util.*;
+
+class DebugTarget {
+    public final static String DEBUG_THREAD_NAME = "DebugThread";
+
+    public static void main(String[] args) throws Exception {
+        DebugThread thread = new DebugThread();
+        thread.start();
+        thread.runningLatch.await();
+        breakpointHere();
+        thread.breakpointLatch.countDown();
+    }
+
+    public static void breakpointHere() {
+        System.out.println("Breakpoint finished!");
+    }
+
+    static class DebugThread extends Thread {
+        final CountDownLatch runningLatch = new CountDownLatch(1);
+        final CountDownLatch breakpointLatch = new CountDownLatch(1);
+
+        public DebugThread() {
+            super(new ThreadGroup(null), DEBUG_THREAD_NAME);
+        }
+
+        public void run() {
+            runningLatch.countDown();
+            try {
+                breakpointLatch.await();
+            } catch (InterruptedException ie) {
+                ie.printStackTrace();
+            }
+        }
+    }
+}
+
+public class NullThreadGroupNameTest extends TestScaffold {
+
+    NullThreadGroupNameTest(String args[]) {
+        super(args);
+    }
+
+    public static void main(String[] args) throws Exception {
+        new NullThreadGroupNameTest(args).startTests();
+    }
+
+    protected void runTests() throws Exception {
+        startTo("DebugTarget", "breakpointHere", "()V");
+
+        ThreadReference thread = findThread(DebugTarget.DEBUG_THREAD_NAME);
+        assertThreadGroupName(thread.threadGroup(), "");
+
+        listenUntilVMDisconnect();
+    }
+
+    private ThreadReference findThread(String name) {
+        for (ThreadReference thread : vm().allThreads()) {
+            if (name.equals(thread.name())) {
+                return thread;
+            }
+        }
+        throw new NoSuchElementException("Couldn't find " + name);
+    }
+
+    private void assertThreadGroupName(ThreadGroupReference threadGroup, String expectedName) {
+        try {
+            String name = threadGroup.name();
+            if (!expectedName.equals(name)) {
+                throw new AssertionError("Unexpected thread group name '" + name + "'");
+            }
+        } catch (VMDisconnectedException vmde) {
+            throw new AssertionError("Likely JVM crash with null thread group name", vmde);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jmx/snmp/NoInfoLeakTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,126 @@
+/*
+ * 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 8026028
+ * @summary Tests no leak of internal info
+ * @author Shanliang JIANG
+ * @run clean NoInfoLeakTest
+ * @run build NoInfoLeakTest
+ * @run main NoInfoLeakTest
+ */
+
+import com.sun.jmx.snmp.SnmpString;
+import com.sun.jmx.snmp.agent.SnmpMib;
+import com.sun.jmx.snmp.agent.SnmpMibTable;
+import com.sun.jmx.snmp.daemon.CommunicatorServer;
+import com.sun.jmx.snmp.daemon.SnmpAdaptorServer;
+import javax.management.MBeanNotificationInfo;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+public class NoInfoLeakTest {
+    public static void main(String[] args) throws Exception {
+        boolean ok = true;
+        ok &= snmpStringTest();
+        ok &= snmpMibTest();
+        ok &= communicatorServerTest();
+
+        if (!ok) {
+            throw new RuntimeException("Some tests are failed!");
+        }
+    }
+
+    private static boolean snmpStringTest() {
+        System.out.println("\n---NoInfoLeakTest-snmpStringTest: testing the method byteValue()...");
+        boolean passed = true;
+
+        byte[] mine = new byte[]{1,1,1,};
+        SnmpString ss = new SnmpString(mine);
+        byte[] got = ss.byteValue();
+        got[0]=0;
+
+        if (ss.byteValue()[0] == 0) {
+            System.err.println("Failed: SnmpString.byteValue() returns an internal mutable object value");
+            passed = false;
+        } else {
+            System.out.println("---NoInfoLeakTest-snmpStringTest done.");
+        }
+        return passed;
+    }
+
+    private static boolean snmpMibTest() {
+        boolean passed = true;
+        System.out.println("\n---NoInfoLeakTest-snmpMibTest: testing the method "
+                + "SnmpMib.getRootOid()...");
+        SnmpMib mib = new MySnmpMib();
+
+        if (mib.getRootOid() == mib.getRootOid()) {
+            System.err.println("Failed: SnmpMib.getRootOid() returns an internal"
+                    + " mutable object value "+mib.getRootOid());
+        } else {
+            System.out.println("---NoInfoLeakTest-snmpMibTest done.");
+        }
+        return passed;
+    }
+
+    private static boolean communicatorServerTest() {
+        boolean passed = true;
+        System.out.println("\n---NoInfoLeakTest-communicatorServerTest: testing the method CommunicatorServer.getNotificationInfo()...");
+        CommunicatorServer server = new SnmpAdaptorServer();
+        MBeanNotificationInfo[] notifs = server.getNotificationInfo();
+
+        assert notifs.length > 0 && notifs[0] != null; // the current implementation ensures this
+        notifs[0] = null;
+        if (server.getNotificationInfo()[0] == null) {
+            System.err.println("Failed: CommunicatorServer.getNotificationInfo()"
+                    + " returns an internal mutable object value");
+            passed = false;
+        } else {
+            System.out.println("---NoInfoLeakTest-communicatorServerTest done.");
+        }
+        return passed;
+    }
+
+    private static class MySnmpMib extends SnmpMib {
+        @Override
+        public void registerTableMeta(String name, SnmpMibTable table) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public SnmpMibTable getRegisteredTableMeta(String name) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public void init() throws IllegalAccessException {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+}
--- a/test/java/lang/ProcessBuilder/InheritIOEHandle.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/ProcessBuilder/InheritIOEHandle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -35,21 +35,22 @@
 
 public class InheritIOEHandle {
     private static enum APP {
-        B, C;
+        A, B, C;
     }
-    private static File stopC = new File(".\\StopC.txt");
+
+    private static File stopC = new File("StopC.txt");
     private static String SIGNAL = "After call child process";
     private static String JAVA_EXE = System.getProperty("java.home")
-        + File.separator + "bin"
-        + File.separator + "java";
+            + File.separator + "bin"
+            + File.separator + "java";
 
     private static String[] getCommandArray(String processName) {
         String[] cmdArray = {
-            JAVA_EXE,
-            "-cp",
-            System.getProperty("java.class.path"),
-            InheritIOEHandle.class.getName(),
-            processName
+                JAVA_EXE,
+                "-cp",
+                System.getProperty("java.class.path"),
+                InheritIOEHandle.class.getName(),
+                processName
         };
         return cmdArray;
     }
@@ -59,19 +60,18 @@
             return;
         }
 
-        if (args.length > 0) {
-            APP app = APP.valueOf(args[0]);
-            switch (app) {
+        APP app = (args.length > 0) ? APP.valueOf(args[0]) : APP.A;
+        switch (app) {
+            case A:
+                performA();
+                break;
             case B:
                 performB();
                 break;
             case C:
                 performC();
                 break;
-            }
-            return;
         }
-        performA();
     }
 
     private static void performA() {
@@ -87,25 +87,40 @@
             process.getOutputStream().close();
             process.getErrorStream().close();
 
-            try (BufferedReader in = new BufferedReader( new InputStreamReader(
-                         process.getInputStream(), "utf-8")))
+            boolean isSignalReceived = false;
+            try (BufferedReader in = new BufferedReader(new InputStreamReader(
+                    process.getInputStream(), "utf-8")))
             {
                 String result;
                 while ((result = in.readLine()) != null) {
-                    if (!SIGNAL.equals(result)) {
-                        throw new Error("Catastrophe in process B! Bad output.");
+                    if (SIGNAL.equals(result)) {
+                        isSignalReceived = true;
+                        break;
+                    } else {
+                        throw new RuntimeException("Catastrophe in process B! Bad output.");
                     }
                 }
+
+            }
+            if (!isSignalReceived) {
+                throw new RuntimeException("Signal from B was not received");
             }
 
             // If JDK-7147084 is not fixed that point is unreachable.
-
+            System.out.println("Received signal from B, creating file StopC");
             // write signal file
-            stopC.createNewFile();
+            boolean isFileStopC = stopC.createNewFile();
+            if (!isFileStopC) {
+                throw new RuntimeException("Signal file StopC.txt was not created. TEST or INFRA bug");
+            }
+
+            process.waitFor();
 
             System.err.println("Read stream finished.");
         } catch (IOException ex) {
-            throw new Error("Catastrophe in process A!", ex);
+            throw new RuntimeException("Catastrophe in process A!", ex);
+        } catch (InterruptedException ex) {
+            throw new RuntimeException("A was interrupted while waiting for B", ex);
         }
     }
 
@@ -121,27 +136,31 @@
             process.getErrorStream().close();
 
             System.out.println(SIGNAL);
+            process.waitFor();
 
             // JDK-7147084 subject:
             // Process C inherits the [System.out] handle and
             // handle close in B does not finalize the streaming for A.
             // (handle reference count > 1).
         } catch (IOException ex) {
-            throw new Error("Catastrophe in process B!", ex);
+            throw new RuntimeException("Catastrophe in process B!", ex);
+        } catch (InterruptedException ex) {
+            throw new RuntimeException("B was interrupted while waiting for C", ex);
         }
     }
 
     private static void performC() {
         // If JDK-7147084 is not fixed the loop is 5min long.
-        for (int i = 0; i < 5*60; ++i) {
+        for (int i = 0; i < 5 * 60; ++i) {
             try {
                 Thread.sleep(1000);
-                // check for sucess
-                if (stopC.exists())
-                    break;
             } catch (InterruptedException ex) {
                 // that is ok. Longer sleep - better effect.
             }
+            // check for success
+            if (stopC.exists()) {
+                break;
+            }
         }
     }
 }
--- a/test/java/lang/ProcessBuilder/SiblingIOEHandle.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/ProcessBuilder/SiblingIOEHandle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -37,21 +37,22 @@
 
 public class SiblingIOEHandle {
     private static enum APP {
-        B, C;
+        A, B, C;
     }
+
     private static File stopC = new File(".\\StopCs.txt");
     private static String SIGNAL = "B child reported.";
     private static String JAVA_EXE = System.getProperty("java.home")
-        + File.separator + "bin"
-        + File.separator + "java";
+            + File.separator + "bin"
+            + File.separator + "java";
 
     private static String[] getCommandArray(String processName) {
         String[] cmdArray = {
-            JAVA_EXE,
-            "-cp",
-            System.getProperty("java.class.path"),
-            SiblingIOEHandle.class.getName(),
-            processName
+                JAVA_EXE,
+                "-cp",
+                System.getProperty("java.class.path"),
+                SiblingIOEHandle.class.getName(),
+                processName
         };
         return cmdArray;
     }
@@ -61,20 +62,19 @@
             return;
         }
 
-        if (args.length > 0) {
-            APP app = APP.valueOf(args[0]);
-            switch (app) {
+        APP app = (args.length > 0) ? APP.valueOf(args[0]) : APP.A;
+        switch (app) {
+            case A:
+                performA(true);
+                performA(false);
+                break;
             case B:
                 performB();
                 break;
             case C:
                 performC();
                 break;
-            }
-            return;
         }
-        performA(true);
-        performA(false);
     }
 
     static boolean procClaunched = false;
@@ -86,6 +86,7 @@
             // that was long enough
         }
     }
+
     private static boolean waitBarrier(CyclicBarrier barrier) {
         while (true) try {
             barrier.await();
@@ -98,6 +99,36 @@
         }
     }
 
+    private static class ProcessC implements Runnable {
+        private CyclicBarrier barrier;
+        private Process processC;
+
+        public ProcessC(CyclicBarrier barrier) {
+            this.barrier = barrier;
+        }
+
+        @Override
+        public void run() {
+            try {
+                if (waitBarrier(barrier)) {
+                    waitAbit();
+                    // Run process C next to B ASAP to make an attempt
+                    // to capture the B-process IOE handles in C process.
+                    ProcessBuilder builderC = new ProcessBuilder(
+                            getCommandArray(APP.C.name()));
+                    processC = builderC.start();
+                    procClaunched = true;
+                }
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+        }
+
+        public void waitFor() throws InterruptedException {
+            processC.waitFor();
+        }
+    }
+
     private static void performA(boolean fileOut) {
         try {
             stopC.delete();
@@ -112,26 +143,13 @@
             builderB.redirectErrorStream(true);
 
             final CyclicBarrier barrier = new CyclicBarrier(2);
-            Thread procCRunner = new Thread(new Runnable() {
-                @Override public void run() {
-                    try {
-                        if (waitBarrier(barrier)) {
-                            waitAbit();
-                            // Run process C next to B ASAP to make an attempt
-                            // to capture the B-process IOE handles in C process.
-                            Runtime.getRuntime().exec(getCommandArray(APP.C.name()));
-                            procClaunched = true;
-                        }
-                    } catch (IOException ex) {
-                        ex.printStackTrace();
-                    }
-                }
-            });
+            //Create process C in a new thread
+            ProcessC processC = new ProcessC(barrier);
+            Thread procCRunner = new Thread(processC);
             procCRunner.start();
 
-
             if (!waitBarrier(barrier)) {
-                throw new Error("Catastrophe in process A! Synchronization failed.");
+                throw new RuntimeException("Catastrophe in process A! Synchronization failed.");
             }
             // Run process B first.
             Process processB = builderB.start();
@@ -144,7 +162,7 @@
             }
 
             if (!procClaunched) {
-                throw new Error("Catastrophe in process A! C was not launched.");
+                throw new RuntimeException("Catastrophe in process A! C was not launched.");
             }
 
             processB.getOutputStream().close();
@@ -154,25 +172,30 @@
                 try {
                     processB.waitFor();
                 } catch (InterruptedException ex) {
-                    throw new Error("Catastrophe in process B! B hung up.");
+                    throw new RuntimeException("Catastrophe in process B! B hung up.");
                 }
                 System.err.println("Trying to delete [outB.txt].");
                 if (!outB.delete()) {
-                    throw new Error("Greedy brother C deadlock! File share.");
+                    throw new RuntimeException("Greedy brother C deadlock! File share.");
                 }
                 System.err.println("Succeeded in delete [outB.txt].");
             } else {
                 System.err.println("Read stream start.");
-                try (BufferedReader in = new BufferedReader( new InputStreamReader(
-                             processB.getInputStream(), "utf-8")))
-                {
+                boolean isSignalReceived = false;
+                try (BufferedReader in = new BufferedReader(new InputStreamReader(
+                        processB.getInputStream(), "utf-8"))) {
                     String result;
                     while ((result = in.readLine()) != null) {
-                        if (!SIGNAL.equals(result)) {
-                            throw new Error("Catastrophe in process B! Bad output.");
+                        if (SIGNAL.equals(result)) {
+                            isSignalReceived = true;
+                        } else {
+                            throw new RuntimeException("Catastrophe in process B! Bad output.");
                         }
                     }
                 }
+                if (!isSignalReceived) {
+                    throw new RuntimeException("Signal from B was not received");
+                }
                 System.err.println("Read stream finished.");
             }
             // If JDK-6921885 is not fixed that point is unreachable.
@@ -180,8 +203,11 @@
 
             // write signal file to stop C process.
             stopC.createNewFile();
+            processC.waitFor();
         } catch (IOException ex) {
-            throw new Error("Catastrophe in process A!", ex);
+            throw new RuntimeException("Catastrophe in process A!", ex);
+        } catch (InterruptedException ex) {
+            throw new RuntimeException("Process A was interrupted while waiting for C", ex);
         }
     }
 
@@ -191,7 +217,7 @@
 
     private static void performC() {
         // If JDK-7147084 is not fixed the loop is 5min long.
-        for (int i = 0; i < 5*60; ++i) {
+        for (int i = 0; i < 5 * 60; ++i) {
             try {
                 Thread.sleep(1000);
                 // check for sucess
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/Runtime/exec/CloseRace.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 8024521
+ * @summary Closing ProcessPipeInputStream at the time the process exits is racy
+ *          and leads to the data corruption.
+ * @library /lib/testlibrary
+ * @run main/othervm/timeout=80 CloseRace
+ */
+
+/**
+ * This test has a little chance to catch the race during the given default
+ * time gap of 20 seconds. To increase the time gap, set the system property
+ * CloseRaceTimeGap=N to the number of seconds.
+ * Jtreg's timeoutFactor should also be set appropriately.
+ *
+ * For example, to run the test for 10 minutes:
+ * > jtreg \
+ *       -testjdk:$(PATH_TO_TESTED_JDK) \
+ *       -timeoutFactor:10 \
+ *       -DCloseRaceTimeGap=600 \
+ *       $(PATH_TO_TESTED_JDK_SOURCE)/test/java/lang/Runtime/exec/CloseRace.java
+ */
+
+import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import jdk.testlibrary.OutputAnalyzer;
+import static jdk.testlibrary.ProcessTools.*;
+
+public class CloseRace {
+
+    public static void main(String args[]) throws Exception {
+        ProcessBuilder pb = createJavaProcessBuilder("-Xmx64M", "CloseRace$Child",
+                System.getProperty("CloseRaceTimeGap", "20"));
+        OutputAnalyzer oa = new OutputAnalyzer(pb.start());
+        oa.stderrShouldNotContain("java.lang.OutOfMemoryError");
+    }
+
+    public static class Child {
+        private static final String BIG_FILE = "bigfile";
+        private static final String SMALL_FILE = "smallfile";
+        private static int timeGap = 20; // seconds
+
+        public static void main(String args[]) throws Exception {
+            if (args.length > 0) {
+                try {
+                    timeGap = Integer.parseUnsignedInt(args[0]);
+                    timeGap = Integer.max(timeGap, 10);
+                    timeGap = Integer.min(timeGap, 10 * 60 * 60); // no more than 10 hours
+                } catch (NumberFormatException ignore) {}
+            }
+            try (RandomAccessFile f = new RandomAccessFile(BIG_FILE, "rw")) {
+                f.setLength(1024 * 1024 * 1024); // 1 Gb, greater than max heap size
+            }
+            try (FileOutputStream fs = new FileOutputStream(SMALL_FILE);
+                 PrintStream ps = new PrintStream(fs)) {
+                for (int i = 0; i < 128; ++i)
+                    ps.println("line of text");
+            }
+
+            List<Thread> threads = new LinkedList<>();
+            for (int i = 0; i < 99; ++i) {
+                Thread t = new Thread (new OpenLoop());
+                t.start();
+                threads.add(t);
+            }
+            Thread t2 = new Thread (new ExecLoop());
+            t2.start();
+            threads.add(t2);
+
+            Thread.sleep(timeGap);
+
+            for (Thread t : threads) {
+                t.interrupt();
+                t.join();
+            }
+        }
+
+        private static class OpenLoop implements Runnable {
+            public void run() {
+                final Path bigFilePath = Paths.get(BIG_FILE);
+                while (!Thread.interrupted()) {
+                    try (InputStream in = Files.newInputStream(bigFilePath)) {
+                        // Widen the race window by sleeping 1ms
+                        Thread.sleep(1);
+                    } catch (InterruptedException e) {
+                        break;
+                    } catch (Exception e) {
+                        System.err.println(e);
+                    }
+                }
+            }
+        }
+
+        private static class ExecLoop implements Runnable {
+            public void run() {
+                List<String> command = new ArrayList<>(
+                        Arrays.asList("/bin/cat", SMALL_FILE));
+                while (!Thread.interrupted()) {
+                    try {
+                        ProcessBuilder builder = new ProcessBuilder(command);
+                        final Process process = builder.start();
+                        InputStream is = process.getInputStream();
+                        InputStreamReader isr = new InputStreamReader(is);
+                        BufferedReader br = new BufferedReader(isr);
+                        while (br.readLine() != null) {}
+                        process.waitFor();
+                        isr.close();
+                    } catch (InterruptedException e) {
+                        break;
+                    } catch (Exception e) {
+                        System.err.println(e);
+                    }
+                }
+            }
+        }
+    }
+}
--- a/test/java/lang/SecurityManager/CheckPackageAccess.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/SecurityManager/CheckPackageAccess.java	Wed Oct 30 18:38:20 2013 +0000
@@ -29,9 +29,6 @@
  *  @run main/othervm CheckPackageAccess
  */
 
-import java.io.File;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
 import java.security.Security;
 import java.util.Collections;
 import java.util.Arrays;
@@ -50,6 +47,7 @@
     /*
      * This array should be updated whenever new packages are added to the
      * package.access property in the java.security file
+     * NOTE: it should be in the same order as the java.security file
      */
     private static final String[] packages = {
         "sun.",
@@ -59,6 +57,7 @@
         "com.sun.jmx.",
         "com.sun.media.sound.",
         "com.sun.proxy.",
+        "com.sun.corba.se.",
         "com.sun.org.apache.bcel.internal.",
         "com.sun.org.apache.regexp.internal.",
         "com.sun.org.apache.xerces.internal.",
@@ -99,14 +98,14 @@
         List<String> jspkgs =
             getPackages(Security.getProperty("package.access"));
 
-        // get closed restricted packages
-        File f = new File(System.getProperty("test.src"),
-            "../../../../src/closed/share/lib/security/restricted.pkgs");
-        if (f.exists()) {
-            List<String> ipkgs = Files.readAllLines(f.toPath(),
-                                                    StandardCharsets.UTF_8);
+        if (!isOpenJDKOnly()) {
+            String lastPkg = pkgs.get(pkgs.size() - 1);
+
             // Remove any closed packages from list before comparing
-            jspkgs.removeAll(ipkgs);
+            int index = jspkgs.indexOf(lastPkg);
+            if (index != -1 && index != jspkgs.size() - 1) {
+                jspkgs.subList(index + 1, jspkgs.size()).clear();
+            }
         }
 
         // Sort to ensure lists are comparable
@@ -164,4 +163,9 @@
         }
         return packages;
     }
+
+    private static boolean isOpenJDKOnly() {
+        String prop = System.getProperty("java.runtime.name");
+        return prop != null && prop.startsWith("OpenJDK");
+    }
 }
--- a/test/java/lang/String/ToLowerCase.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/String/ToLowerCase.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,7 +23,7 @@
 
 /*
     @test
-    @bug 4217441 4533872 4900935
+    @bug 4217441 4533872 4900935 8020037
     @summary toLowerCase should lower-case Greek Sigma correctly depending
              on the context (final/non-final).  Also it should handle
              Locale specific (lt, tr, and az) lowercasings and supplementary
@@ -69,10 +69,11 @@
         test("\u00CD", Locale.US, "\u00ED");
         test("\u0128", Locale.US, "\u0129");
 
-        // I-dot tests (Turkish and Azeri)
+        // I-dot tests
         test("\u0130", turkish, "i");
         test("\u0130", az, "i");
-        test("\u0130", Locale.US, "i\u0307");
+        test("\u0130", lt, "i");
+        test("\u0130", Locale.US, "i");
 
         // Remove dot_above in the sequence I + dot_above (Turkish and Azeri)
         test("I\u0307", turkish, "i");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/annotation/repeatingAnnotations/InheritedAssociatedAnnotations.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,120 @@
+/*
+ * 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     8027170
+ * @summary getAnnotationsByType needs to take the class hierarchy into account
+ *          when determining which annotations are associated with a given
+ *          class.
+ * @run main InheritedAssociatedAnnotations
+ */
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.Arrays;
+
+public class InheritedAssociatedAnnotations {
+
+    public static void main(String[] args) {
+        checkAssociated(A3.class);
+        checkAssociated(B3.class);
+        checkAssociated(C3.class);
+        checkAssociated(D3.class);
+    }
+
+    private static void checkAssociated(AnnotatedElement ae) {
+        Ann[] actual = ae.getAnnotationsByType(Ann.class);
+        Ann[] expected = ae.getAnnotation(ExpectedAssociated.class).value();
+
+        if (!Arrays.equals(actual, expected)) {
+            throw new RuntimeException(String.format(
+                    "Test failed for %s: Expected %s but got %s.",
+                    ae,
+                    Arrays.toString(expected),
+                    Arrays.toString(actual)));
+        }
+    }
+
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface ExpectedAssociated {
+    Ann[] value();
+}
+
+
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Repeatable(AnnCont.class)
+@interface Ann {
+    int value();
+}
+
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@interface AnnCont {
+    Ann[] value();
+}
+
+
+@Ann(10)
+class A1 {}
+
+@Ann(20)
+class A2 extends A1 {}
+
+@ExpectedAssociated({@Ann(20)})
+class A3 extends A2 {}
+
+
+@Ann(10) @Ann(11)
+class B1 {}
+
+@Ann(20)
+class B2 extends B1 {}
+
+@ExpectedAssociated({@Ann(20)})
+class B3 extends B2 {}
+
+
+@Ann(10)
+class C1 {}
+
+@Ann(20) @Ann(21)
+class C2 extends C1 {}
+
+@ExpectedAssociated({@Ann(20), @Ann(21)})
+class C3 extends C2 {}
+
+
+@Ann(10) @Ann(11)
+class D1 {}
+
+@Ann(20) @Ann(21)
+class D2 extends D1 {}
+
+@ExpectedAssociated({@Ann(20), @Ann(21)})
+class D3 extends D2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/annotation/repeatingAnnotations/NonInheritableContainee.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,63 @@
+/*
+ * 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 8019420
+ * @summary Repeatable non-inheritable annotation types are mishandled by Core Reflection
+ */
+
+import java.util.*;
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+public class NonInheritableContainee {
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Repeatable(InheritedAnnotationContainer.class)
+    @interface NonInheritedAnnotationRepeated {
+        String name();
+    }
+
+    @Inherited
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface InheritedAnnotationContainer {
+        NonInheritedAnnotationRepeated[] value();
+    }
+
+    @NonInheritedAnnotationRepeated(name="A")
+    @NonInheritedAnnotationRepeated(name="B")
+    class Parent {}
+    class Sample extends Parent {}
+
+
+    public static void main(String[] args) {
+
+        Annotation[] anns = Sample.class.getAnnotationsByType(
+                NonInheritedAnnotationRepeated.class);
+
+        if (anns.length != 0)
+            throw new RuntimeException("Non-@Inherited containees should not " +
+                    "be inherited even though its container is @Inherited.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/annotation/repeatingAnnotations/OrderUnitTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,74 @@
+/*
+ * 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     8004912
+ * @summary Unit test for order of annotations returned by get[Declared]AnnotationsByType.
+ *
+ * @run main OrderUnitTest
+ */
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+public class OrderUnitTest {
+
+    public static void main(String[] args) {
+        testOrder(Case1.class);
+        testOrder(Case2.class);
+    }
+
+    private static void testOrder(AnnotatedElement e) {
+        Annotation[] decl = e.getDeclaredAnnotations();
+        Foo[] declByType = e.getDeclaredAnnotationsByType(Foo.class);
+
+        if (decl[0] instanceof Foo != declByType[0].isDirect() ||
+            decl[1] instanceof Foo != declByType[1].isDirect()) {
+            throw new RuntimeException("Order of directly / indirectly present " +
+                    "annotations from getDeclaredAnnotationsByType does not " +
+                    "match order from getDeclaredAnnotations.");
+        }
+    }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface FooContainer {
+    Foo[] value();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(FooContainer.class)
+@interface Foo {
+    boolean isDirect();
+}
+
+
+@Foo(isDirect = true) @FooContainer({@Foo(isDirect = false)})
+class Case1 {
+}
+
+
+@FooContainer({@Foo(isDirect = false)}) @Foo(isDirect = true)
+class Case2 {
+}
--- a/test/java/lang/annotation/repeatingAnnotations/RepeatedUnitTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/annotation/repeatingAnnotations/RepeatedUnitTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     7154390 8005712 8007278
+ * @bug     7154390 8005712 8007278 8004912
  * @summary Unit test for repeated annotation reflection
  *
  * @compile RepeatedUnitTest.java subpackage/package-info.java subpackage/Container.java subpackage/Containee.java subpackage/NonRepeated.java subpackage/InheritedContainee.java subpackage/InheritedContainer.java subpackage/InheritedNonRepeated.java
@@ -51,6 +51,12 @@
         inheritedMe3();
         inheritedMe4();
 
+        inheritedMe5();    // ContainerOnSuperSingleOnSub
+        inheritedMe6();    // RepeatableOnSuperSingleOnSub
+        inheritedMe7();    // SingleAnnoOnSuperContainerOnSub
+        inheritedMe8();    // SingleOnSuperRepeatableOnSub
+
+
         // CONSTRUCTOR
         checkMultiplier(Me1.class.getConstructor(new Class[0]), 10);
 
@@ -159,6 +165,30 @@
         check(e.getAnnotationsByType(NonRepeated.class)[0].value() == 1000);
     }
 
+    static void inheritedMe5() {
+        AnnotatedElement e = Me5.class;
+        check(2 == e.getAnnotations().length);
+        check(1 == countAnnotation(e, InheritedContainee.class));
+    }
+
+    static void inheritedMe6() {
+        AnnotatedElement e = Me6.class;
+        check(2 == e.getAnnotations().length);
+        check(1 == countAnnotation(e, InheritedContainee.class));
+    }
+
+    static void inheritedMe7() {
+        AnnotatedElement e = Me7.class;
+        check(2 == e.getAnnotations().length);
+        check(2 == countAnnotation(e, InheritedContainee.class));
+    }
+
+    static void inheritedMe8() {
+        AnnotatedElement e = Me8.class;
+        check(2 == e.getAnnotations().length);
+        check(2 == countAnnotation(e, InheritedContainee.class));
+    }
+
     static void checkMultiplier(AnnotatedElement e, int m) {
         // Basic sanity of non-repeating getAnnotation(Class)
         check(e.getAnnotation(NonRepeated.class).value() == 5 * m);
@@ -252,3 +282,31 @@
 @InheritedContainee(1000) @InheritedContainee(2000) @InheritedContainee(3000) @InheritedContainee(4000)
 @Containee(1000) @Containee(2000) @Containee(3000) @Containee(4000)
 class Me4 extends Father {}
+
+
+@InheritedContainer({@InheritedContainee(1), @InheritedContainee(2)})
+class SuperOf5 {}
+
+@InheritedContainee(3)
+class Me5 extends SuperOf5{}
+
+
+@InheritedContainee(1) @InheritedContainee(2)
+class SuperOf6 {}
+
+@InheritedContainee(3)
+class Me6 extends SuperOf6 {}
+
+
+@InheritedContainee(1)
+class SuperOf7 {}
+
+@InheritedContainer({@InheritedContainee(2), @InheritedContainee(3)})
+class Me7 extends SuperOf7 {}
+
+
+@InheritedContainee(1)
+class SuperOf8 {}
+
+@InheritedContainee(2) @InheritedContainee(3)
+class Me8 extends SuperOf8 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/annotation/typeAnnotations/ConstructorReceiverTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,147 @@
+/*
+ * 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 8023651
+ * @summary Test that the receiver annotations and the return annotations of
+ *          constructors behave correctly.
+ * @run testng ConstructorReceiverTest
+ */
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.Arrays;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.*;
+
+public class ConstructorReceiverTest {
+    // Format is {
+    //   { Class to get ctor for,
+    //       ctor param class,
+    //       value of anno of return type,
+    //       value of anno for receiver or null if there should be no receiver anno
+    //    },
+    //    ...
+    // }
+    public static final Object[][] TESTS = {
+        { ConstructorReceiverTest.class, null, Integer.valueOf(5), null },
+        { ConstructorReceiverTest.Middle.class, ConstructorReceiverTest.class, Integer.valueOf(10), Integer.valueOf(15) },
+        { ConstructorReceiverTest.Middle.Inner.class, ConstructorReceiverTest.Middle.class, Integer.valueOf(100), Integer.valueOf(150) },
+        { ConstructorReceiverTest.Middle.Inner.Innermost.class, ConstructorReceiverTest.Middle.Inner.class, Integer.valueOf(1000), Integer.valueOf(1500) },
+        { ConstructorReceiverTest.Middle.InnerNoReceiver.class, ConstructorReceiverTest.Middle.class, Integer.valueOf(300), null },
+        { ConstructorReceiverTest.Nested.class, null, Integer.valueOf(20), null },
+        { ConstructorReceiverTest.Nested.NestedMiddle.class, ConstructorReceiverTest.Nested.class, Integer.valueOf(200), Integer.valueOf(250)},
+        { ConstructorReceiverTest.Nested.NestedMiddle.NestedInner.class, ConstructorReceiverTest.Nested.NestedMiddle.class, Integer.valueOf(2000), Integer.valueOf(2500)},
+        { ConstructorReceiverTest.Nested.NestedMiddle.NestedInnerNoReceiver.class, ConstructorReceiverTest.Nested.NestedMiddle.class, Integer.valueOf(4000), null},
+    };
+
+    @DataProvider
+    public Object[][] data() { return TESTS; }
+
+    @Test(dataProvider = "data")
+    public void testAnnotatedReciver(Class<?> toTest, Class<?> ctorParamType,
+            Integer returnVal, Integer receiverVal) throws NoSuchMethodException {
+        Constructor c;
+        if (ctorParamType == null)
+            c = toTest.getDeclaredConstructor();
+        else
+            c = toTest.getDeclaredConstructor(ctorParamType);
+
+        AnnotatedType annotatedReceiverType = c.getAnnotatedReceiverType();
+        Annotation[] receiverAnnotations = annotatedReceiverType.getAnnotations();
+
+        if (receiverVal == null) {
+            assertEquals(receiverAnnotations.length, 0, Arrays.asList(receiverAnnotations).toString() +
+                    " should be empty. Looking at 'length': ");
+            return;
+        }
+
+        assertEquals(receiverAnnotations.length, 1, "expecting a 1 element array. Looking at 'length': ");
+        assertEquals(((Annot)receiverAnnotations[0]).value(), receiverVal.intValue(), " wrong annotation found. Found " +
+                receiverAnnotations[0] +
+                " should find @Annot with value=" +
+                receiverVal);
+    }
+
+    @Test(dataProvider = "data")
+    public void testAnnotatedReturn(Class<?> toTest, Class<?> ctorParamType,
+            Integer returnVal, Integer receiverVal) throws NoSuchMethodException {
+        Constructor c;
+        if (ctorParamType == null)
+            c = toTest.getDeclaredConstructor();
+        else
+            c = toTest.getDeclaredConstructor(ctorParamType);
+
+        AnnotatedType annotatedReturnType = c.getAnnotatedReturnType();
+        Annotation[] returnAnnotations = annotatedReturnType.getAnnotations();
+
+        assertEquals(returnAnnotations.length, 1, "expecting a 1 element array. Looking at 'length': ");
+        assertEquals(((Annot)returnAnnotations[0]).value(), returnVal.intValue(), " wrong annotation found. Found " +
+                returnAnnotations[0] +
+                " should find @Annot with value=" +
+                returnVal);
+    }
+
+    @Annot(5) ConstructorReceiverTest() {}
+
+    private class Middle {
+        @Annot(10) public Middle(@Annot(15) ConstructorReceiverTest ConstructorReceiverTest.this) {}
+
+        public class Inner {
+            @Annot(100) Inner(@Annot(150) Middle Middle.this) {}
+
+            class Innermost {
+                @Annot(1000) private Innermost(@Annot(1500) Inner Inner.this) {}
+            }
+        }
+
+        class InnerNoReceiver {
+            @Annot(300) InnerNoReceiver(Middle Middle.this) {}
+        }
+    }
+
+    public static class Nested {
+        @Annot(20) public Nested() {}
+
+        class NestedMiddle {
+            @Annot(200) public NestedMiddle(@Annot(250) Nested Nested.this) {}
+
+            class NestedInner {
+                @Annot(2000) public NestedInner(@Annot(2500) NestedMiddle NestedMiddle.this) {}
+            }
+
+            class NestedInnerNoReceiver {
+                @Annot(4000) public NestedInnerNoReceiver() {}
+            }
+        }
+    }
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target(ElementType.TYPE_USE)
+    public static @interface Annot {
+        int value();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/NMTHelper.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ */
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import sun.management.ManagementFactoryHelper;
+import com.sun.management.DiagnosticCommandMBean;
+
+public class NMTHelper
+{
+    public static void baseline() {
+        executeDcmd("vmNativeMemory", "baseline");
+    }
+
+    // Total:  reserved=3484685KB  +293KB, committed=266629KB +293KB
+    private static Pattern totalLine = Pattern.compile("^Total:  reserved=\\d+KB  .*KB, committed=\\d+KB (.*)KB$");
+
+    public static long committedDiff() throws Exception {
+        String res = (String) executeDcmd("vmNativeMemory", "detail.diff");
+        String[] lines = res.split("\n");
+        for (String line : lines) {
+            Matcher matcher = totalLine.matcher(line);
+            if (matcher.matches()) {
+                String committed = matcher.group(1);
+                return Long.parseLong(committed);
+            }
+        }
+        throw new Exception("Could not find the Total line in the NMT output.");
+    }
+
+    private static String executeDcmd(String cmd, String ... args) {
+        DiagnosticCommandMBean dcmd = ManagementFactoryHelper.getDiagnosticCommandMBean();
+        Object[] dcmdArgs = {args};
+        String[] signature = {String[].class.getName()};
+
+        try {
+            System.out.print("> " + cmd + " ");
+            for (String s : args) {
+                System.out.print(s + " ");
+            }
+            System.out.println(":");
+            String result = (String) dcmd.invoke(cmd, dcmdArgs, signature);
+            System.out.println(result);
+            return result;
+        } catch(Exception ex) {
+            ex.printStackTrace();
+        }
+        return null;
+    }
+}
--- a/test/java/lang/instrument/RedefineBigClass.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/instrument/RedefineBigClass.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -58,11 +58,19 @@
 JAVAC="${COMPILEJAVA}"/bin/javac
 JAVA="${TESTJAVA}"/bin/java
 
+# Does this VM support the 'detail' level of NMT?
+"${JAVA}" ${TESTVMOPTS} -XX:NativeMemoryTracking=detail -version
+if [ "$?" = 0 ]; then
+    NMT=-XX:NativeMemoryTracking=detail
+else
+    NMT=-XX:NativeMemoryTracking=summary
+fi
+
 "${JAVA}" ${TESTVMOPTS} \
-    -XX:TraceRedefineClasses=3 \
+    -XX:TraceRedefineClasses=3 ${NMT} \
     -javaagent:RedefineBigClassAgent.jar=BigClass.class \
     -classpath "${TESTCLASSES}" RedefineBigClassApp \
-    > output.log 2>&1
+    > output.log 2>&1 
 result=$?
 
 cat output.log
--- a/test/java/lang/instrument/RedefineBigClassApp.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/instrument/RedefineBigClassApp.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,16 +26,23 @@
 public class RedefineBigClassApp {
     /**
      * Memory leak is assumed, if application consumes more than specified amount of memory during its execution.
-     * The number is given in Kb.
+     * The number is given in KB.
      */
-    private static final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
+    private static final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32MB
 
     public static void main(String[] args) throws Exception {
         System.out.println("Creating instance of " +
             RedefineBigClassAgent.clz);
         RedefineBigClassAgent.clz.newInstance();
 
-        long vMemBefore = getVMemSize();
+        // Do a short warmup before creating the NMT baseline
+        try {
+            Thread.sleep(5 * 1000);
+        } catch (InterruptedException ie) {
+        }
+
+        NMTHelper.baseline();
+
         int count = 0;
         while (!RedefineBigClassAgent.doneRedefining) {
             System.out.println("App loop count: " + ++count);
@@ -46,39 +53,12 @@
         }
         System.out.println("App looped  " + count + " times.");
 
-        long vMemAfter = getVMemSize();
-        if (vMemBefore == 0 || vMemAfter == 0) {
-            System.err.println("WARNING: Cannot perform memory leak detection on this OS");
-        } else {
-            long vMemDelta = vMemAfter - vMemBefore;
-            if (vMemDelta > MEM_LEAK_THRESHOLD) {
-                System.err.println("FAIL: Virtual memory usage increased by " + vMemDelta + "Kb " +
-                        "(greater than " + MEM_LEAK_THRESHOLD + "Kb)");
-                System.exit(1);
-            }
-            System.err.println("PASS: Virtual memory usage increased by " + vMemDelta + "Kb " +
-                    "(not greater than " + MEM_LEAK_THRESHOLD + "Kb)");
+        long committedDiff = NMTHelper.committedDiff();
+        if (committedDiff > MEM_LEAK_THRESHOLD) {
+            throw new Exception("FAIL: Committed memory usage increased by " + committedDiff + "KB " +
+                               "(greater than " + MEM_LEAK_THRESHOLD + "KB)");
         }
-        System.exit(0);
-    }
-
-    /**
-     * Return size of virtual memory allocated to the process in Kb.
-     * Linux specific. On other platforms and in case of any errors return 0.
-     */
-    private static long getVMemSize() {
-
-        // Refer to the Linux proc(5) man page for details about /proc/self/stat file
-        //
-        // In short, this file contains status information about the current process
-        // written in one line. The fields are separated with spaces.
-        // The 23rd field is defined as 'vsize %lu   Virtual memory size in bytes'
-
-        try (FileReader fileReader = new FileReader("/proc/self/stat");
-             BufferedReader bufferedReader = new BufferedReader(fileReader)) {
-            String line = bufferedReader.readLine();
-            return Long.parseLong(line.split(" ")[22]) / 1024;
-        } catch (Exception ex) {}
-        return 0;
+        System.err.println("PASS: Committed memory usage increased by " + committedDiff + "KB " +
+                           "(not greater than " + MEM_LEAK_THRESHOLD + "KB)");
     }
 }
--- a/test/java/lang/instrument/RedefineMethodInBacktrace.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/instrument/RedefineMethodInBacktrace.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -62,6 +62,10 @@
     RedefineMethodInBacktraceTarget.java
 "${JAVAC}" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . RedefineMethodInBacktraceTarget.java
 
+cp "${TESTSRC}"/RedefineMethodInBacktraceTargetB_2.java \
+    RedefineMethodInBacktraceTargetB.java
+"${JAVAC}" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . RedefineMethodInBacktraceTargetB.java
+
 "${JAVA}" ${TESTVMOPTS} -javaagent:RedefineMethodInBacktraceAgent.jar \
     -classpath "${TESTCLASSES}" RedefineMethodInBacktraceApp > output.log 2>&1
 RUN_RESULT=$?
--- a/test/java/lang/instrument/RedefineMethodInBacktraceApp.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/instrument/RedefineMethodInBacktraceApp.java	Wed Oct 30 18:38:20 2013 +0000
@@ -21,12 +21,17 @@
  * questions.
  */
 
+import com.sun.management.DiagnosticCommandMBean;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
 import java.lang.instrument.ClassDefinition;
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.util.concurrent.CountDownLatch;
+import sun.management.ManagementFactoryHelper;
 
 /**
  * When an exception is thrown, the JVM collects just enough information
@@ -49,8 +54,12 @@
         System.exit(0);
     }
 
+    public static CountDownLatch stop = new CountDownLatch(1);
+    public static CountDownLatch called = new CountDownLatch(1);
+
     private void doTest() throws Exception {
         doMethodInBacktraceTest();
+        doMethodInBacktraceTestB();
     }
 
     private void doMethodInBacktraceTest() throws Exception {
@@ -63,6 +72,36 @@
         touchRedefinedMethodInBacktrace(t);
     }
 
+    private void doMethodInBacktraceTestB() throws Exception {
+        // Start a thread which blocks in method
+        Thread t = new Thread(RedefineMethodInBacktraceTargetB::methodToRedefine);
+        t.setDaemon(true);
+        t.start();
+
+        // Wait here until the new thread is in the method we want to redefine
+        called.await();
+
+        // Now redefine the class while the method is still on the stack of the new thread
+        doRedefine(RedefineMethodInBacktraceTargetB.class);
+
+        // Do thread dumps in two different ways (to exercise different code paths)
+        // while the old class is still on the stack
+
+        ThreadInfo[] tis = ManagementFactory.getThreadMXBean().dumpAllThreads(false, false);
+        for(ThreadInfo ti : tis) {
+            System.out.println(ti);
+        }
+
+        String[] threadPrintArgs = {};
+        Object[] dcmdArgs = {threadPrintArgs};
+        String[] signature = {String[].class.getName()};
+        DiagnosticCommandMBean dcmd = ManagementFactoryHelper.getDiagnosticCommandMBean();
+        System.out.println(dcmd.invoke("threadPrint", dcmdArgs, signature));
+
+        // release the thread
+        stop.countDown();
+    }
+
     private static Throwable getThrowableFromMethodToRedefine() throws Exception {
         Class<RedefineMethodInBacktraceTarget> c =
                 RedefineMethodInBacktraceTarget.class;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/RedefineMethodInBacktraceTargetB.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+/**
+ * The first version of this class. The second version is in
+ * RedefineMethodInBacktraceTargetB_2.java.
+ */
+public class RedefineMethodInBacktraceTargetB {
+    public static void methodToRedefine() {
+        try {
+            // signal that we are here
+            RedefineMethodInBacktraceApp.called.countDown();
+
+            // wait until test is done
+            RedefineMethodInBacktraceApp.stop.await();
+        } catch (InterruptedException ex) {
+            // ignore, test will fail
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/RedefineMethodInBacktraceTargetB_2.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,31 @@
+/*
+ * 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 is the second version of this class. The first version is in
+ * RedefineMethodInBacktraceTargetB.java.
+ */
+public class RedefineMethodInBacktraceTargetB {
+    public static void methodToRedefine() {
+    }
+}
--- a/test/java/lang/instrument/RetransformBigClass.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/instrument/RetransformBigClass.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -58,8 +58,16 @@
 JAVAC="${COMPILEJAVA}"/bin/javac
 JAVA="${TESTJAVA}"/bin/java
 
+# Does this VM support the 'detail' level of NMT?
+"${JAVA}" ${TESTVMOPTS} -XX:NativeMemoryTracking=detail -version
+if [ "$?" = 0 ]; then
+    NMT=-XX:NativeMemoryTracking=detail
+else
+    NMT=-XX:NativeMemoryTracking=summary
+fi
+
 "${JAVA}" ${TESTVMOPTS} \
-    -XX:TraceRedefineClasses=3 \
+    -XX:TraceRedefineClasses=3 ${NMT} \
     -javaagent:RetransformBigClassAgent.jar=BigClass.class \
     -classpath "${TESTCLASSES}" RetransformBigClassApp \
     > output.log 2>&1
--- a/test/java/lang/instrument/RetransformBigClassApp.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/instrument/RetransformBigClassApp.java	Wed Oct 30 18:38:20 2013 +0000
@@ -26,16 +26,23 @@
 public class RetransformBigClassApp {
     /**
      * Memory leak is assumed, if application consumes more than specified amount of memory during its execution.
-     * The number is given in Kb.
+     * The number is given in KB.
      */
-    private static final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
+    private static final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32MB
 
     public static void main(String[] args) throws Exception {
         System.out.println("Creating instance of " +
             RetransformBigClassAgent.clz);
         RetransformBigClassAgent.clz.newInstance();
 
-        long vMemBefore = getVMemSize();
+        // Do a short warmup before creating the NMT baseline
+        try {
+            Thread.sleep(5 * 1000);
+        } catch (InterruptedException ie) {
+        }
+
+        NMTHelper.baseline();
+
         int count = 0;
         while (!RetransformBigClassAgent.doneRetransforming) {
             System.out.println("App loop count: " + ++count);
@@ -46,39 +53,12 @@
         }
         System.out.println("App looped  " + count + " times.");
 
-        long vMemAfter = getVMemSize();
-        if (vMemBefore == 0 || vMemAfter == 0) {
-            System.err.println("WARNING: Cannot perform memory leak detection on this OS");
-        } else {
-            long vMemDelta = vMemAfter - vMemBefore;
-            if (vMemDelta > MEM_LEAK_THRESHOLD) {
-                System.err.println("FAIL: Virtual memory usage increased by " + vMemDelta + "Kb " +
-                        "(greater than " + MEM_LEAK_THRESHOLD + "Kb)");
-                System.exit(1);
-            }
-            System.err.println("PASS: Virtual memory usage increased by " + vMemDelta + "Kb " +
-                    "(not greater than " + MEM_LEAK_THRESHOLD + "Kb)");
+        long committedDiff = NMTHelper.committedDiff();
+        if (committedDiff > MEM_LEAK_THRESHOLD) {
+            throw new Exception("FAIL: Committed memory usage increased by " + committedDiff + "KB " +
+                               "(greater than " + MEM_LEAK_THRESHOLD + "KB)");
         }
-        System.exit(0);
-    }
-
-    /**
-     * Return size of virtual memory allocated to the process in Kb.
-     * Linux specific. On other platforms and in case of any errors return 0.
-     */
-    private static long getVMemSize() {
-
-        // Refer to the Linux proc(5) man page for details about /proc/self/stat file
-        //
-        // In short, this file contains status information about the current process
-        // written in one line. The fields are separated with spaces.
-        // The 23rd field is defined as 'vsize %lu   Virtual memory size in bytes'
-
-        try (FileReader fileReader = new FileReader("/proc/self/stat");
-             BufferedReader bufferedReader = new BufferedReader(fileReader)) {
-            String line = bufferedReader.readLine();
-            return Long.parseLong(line.split(" ")[22]) / 1024;
-        } catch (Exception ex) {}
-        return 0;
+        System.err.println("PASS: Committed memory usage increased by " + committedDiff + "KB " +
+                           "(not greater than " + MEM_LEAK_THRESHOLD + "KB)");
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/MethodHandleConstants.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8022066
+ * @summary smoke test for method handle constants
+ * @build indify.Indify
+ * @compile MethodHandleConstants.java
+ * @run main/othervm
+ *      indify.Indify
+ *      --verify-specifier-count=0
+ *      --expand-properties --classpath ${test.classes}
+ *      --java test.java.lang.invoke.MethodHandleConstants --check-output
+ * @run main/othervm
+ *      indify.Indify
+ *      --expand-properties --classpath ${test.classes}
+ *      --java test.java.lang.invoke.MethodHandleConstants --security-manager
+ */
+
+package test.java.lang.invoke;
+
+import java.util.*;
+import java.io.*;
+import java.lang.invoke.*;
+import java.security.*;
+
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+
+public class MethodHandleConstants {
+    public static void main(String... av) throws Throwable {
+        if (av.length > 0 && av[0].equals("--check-output"))  openBuf();
+        if (av.length > 0 && av[0].equals("--security-manager"))  setSM();
+        System.out.println("Obtaining method handle constants:");
+        testCase(MH_String_replace_C2(), String.class, "replace", String.class, String.class, char.class, char.class);
+        testCase(MH_MethodHandle_invokeExact_SC2(), MethodHandle.class, "invokeExact", String.class, MethodHandle.class, String.class, char.class, char.class);
+        testCase(MH_MethodHandle_invoke_SC2(), MethodHandle.class, "invoke", String.class, MethodHandle.class, String.class, char.class, char.class);
+        testCase(MH_Class_forName_S(), Class.class, "forName", Class.class, String.class);
+        testCase(MH_Class_forName_SbCL(), Class.class, "forName", Class.class, String.class, boolean.class, ClassLoader.class);
+        System.out.println("Done.");
+        closeBuf();
+    }
+
+    private static void testCase(MethodHandle mh, Class<?> defc, String name, Class<?> rtype, Class<?>... ptypes) throws Throwable {
+        System.out.println(mh);
+        // we include defc, because we assume it is a non-static MH:
+        MethodType mt = methodType(rtype, ptypes);
+        assertEquals(mh.type(), mt);
+        // FIXME: Use revealDirect to find out more
+    }
+    private static void assertEquals(Object exp, Object act) {
+        if (exp == act || (exp != null && exp.equals(act)))  return;
+        throw new AssertionError("not equal: "+exp+", "+act);
+    }
+
+    private static void setSM() {
+        Policy.setPolicy(new TestPolicy());
+        System.setSecurityManager(new SecurityManager());
+    }
+
+    private static PrintStream oldOut;
+    private static ByteArrayOutputStream buf;
+    private static void openBuf() {
+        oldOut = System.out;
+        buf = new ByteArrayOutputStream();
+        System.setOut(new PrintStream(buf));
+    }
+    private static void closeBuf() {
+        if (buf == null)  return;
+        System.out.flush();
+        System.setOut(oldOut);
+        String[] haveLines = new String(buf.toByteArray()).split("[\n\r]+");
+        for (String line : haveLines)  System.out.println(line);
+        Iterator<String> iter = Arrays.asList(haveLines).iterator();
+        for (String want : EXPECT_OUTPUT) {
+            String have = iter.hasNext() ? iter.next() : "[EOF]";
+            if (want.equals(have))  continue;
+            System.err.println("want line: "+want);
+            System.err.println("have line: "+have);
+            throw new AssertionError("unexpected output: "+have);
+        }
+        if (iter.hasNext())
+            throw new AssertionError("unexpected output: "+iter.next());
+    }
+    private static final String[] EXPECT_OUTPUT = {
+        "Obtaining method handle constants:",
+        "MethodHandle(String,char,char)String",
+        "MethodHandle(MethodHandle,String,char,char)String",
+        "MethodHandle(MethodHandle,String,char,char)String",
+        "MethodHandle(String)Class",
+        "MethodHandle(String,boolean,ClassLoader)Class",
+        "Done."
+    };
+
+    // String.replace(String, char, char)
+    private static MethodType MT_String_replace_C2() {
+        shouldNotCallThis();
+        return methodType(String.class, char.class, char.class);
+    }
+    private static MethodHandle MH_String_replace_C2() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findVirtual(String.class, "replace", MT_String_replace_C2());
+    }
+
+    // MethodHandle.invokeExact(...)
+    private static MethodType MT_MethodHandle_invokeExact_SC2() {
+        shouldNotCallThis();
+        return methodType(String.class, String.class, char.class, char.class);
+    }
+    private static MethodHandle MH_MethodHandle_invokeExact_SC2() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findVirtual(MethodHandle.class, "invokeExact", MT_MethodHandle_invokeExact_SC2());
+    }
+
+    // MethodHandle.invoke(...)
+    private static MethodType MT_MethodHandle_invoke_SC2() {
+        shouldNotCallThis();
+        return methodType(String.class, String.class, char.class, char.class);
+    }
+    private static MethodHandle MH_MethodHandle_invoke_SC2() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findVirtual(MethodHandle.class, "invoke", MT_MethodHandle_invoke_SC2());
+    }
+
+    // Class.forName(String)
+    private static MethodType MT_Class_forName_S() {
+        shouldNotCallThis();
+        return methodType(Class.class, String.class);
+    }
+    private static MethodHandle MH_Class_forName_S() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findStatic(Class.class, "forName", MT_Class_forName_S());
+    }
+
+    // Class.forName(String, boolean, ClassLoader)
+    private static MethodType MT_Class_forName_SbCL() {
+        shouldNotCallThis();
+        return methodType(Class.class, String.class, boolean.class, ClassLoader.class);
+    }
+    private static MethodHandle MH_Class_forName_SbCL() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findStatic(Class.class, "forName", MT_Class_forName_SbCL());
+    }
+
+    private static void shouldNotCallThis() {
+        // if this gets called, the transformation has not taken place
+        if (System.getProperty("MethodHandleConstants.allow-untransformed") != null)  return;
+        throw new AssertionError("this code should be statically transformed away by Indify");
+    }
+
+    static class TestPolicy extends Policy {
+        final PermissionCollection permissions = new Permissions();
+        TestPolicy() {
+            permissions.add(new java.io.FilePermission("<<ALL FILES>>", "read"));
+        }
+        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);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/accessProtectedSuper/BogoLoader.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,157 @@
+/*
+ * 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.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+import jdk.internal.org.objectweb.asm.*;
+// Compile with -XDignore.symbol.file=true
+
+public class BogoLoader extends ClassLoader {
+
+    static interface VisitorMaker {
+    ClassVisitor make(ClassVisitor visitor);
+    }
+
+
+    /**
+     * Use this property to verify that the desired classloading is happening.
+     */
+    private final boolean verbose = Boolean.getBoolean("bogoloader.verbose");
+    /**
+     * Use this property to disable replacement for testing purposes.
+     */
+    private final boolean noReplace = Boolean.getBoolean("bogoloader.noreplace");
+
+    /**
+     * Set of class names that should be loaded with this loader.
+     * Others are loaded with the system class loader, except for those
+     * that are transformed.
+     */
+    private Set<String> nonSystem;
+
+    /**
+     * Map from class names to a bytecode transformer factory.
+     */
+    private Map<String, VisitorMaker> replaced;
+
+    /**
+     * Keep track (not terribly efficiently) of which classes have already
+     * been loaded by this class loader.
+     */
+    private final Vector<String> history = new Vector<String>();
+
+    private boolean useSystemLoader(String name) {
+        return ! nonSystem.contains(name) && ! replaced.containsKey(name);
+    }
+
+    public BogoLoader(Set<String> non_system, Map<String, VisitorMaker> replaced) {
+        super(Thread.currentThread().getContextClassLoader());
+        this.nonSystem = non_system;
+        this.replaced = replaced;
+    }
+
+    private byte[] readResource(String className) throws IOException {
+        return readResource(className, "class");
+    }
+
+    private byte[] readResource(String className, String suffix) throws IOException {
+        // Note to the unwary -- "/" works on Windows, leave it alone.
+        String fileName = className.replace('.', '/') + "." + suffix;
+        InputStream origStream = getResourceAsStream(fileName);
+        if (origStream == null) {
+            throw new IOException("Resource not found : " + fileName);
+        }
+        BufferedInputStream stream = new java.io.BufferedInputStream(origStream);
+        byte[] data = new byte[stream.available()];
+        int how_many = stream.read(data);
+        // Really ought to deal with the corner cases of stream.available()
+        return data;
+    }
+
+    protected byte[] getClass(String name) throws ClassNotFoundException,
+    IOException {
+        return readResource(name, "class");
+    }
+
+    /**
+     * Loads the named class from the system class loader unless
+     * the name appears in either replaced or nonSystem.
+     * nonSystem classes are loaded into this classloader,
+     * and replaced classes get their content from the specified array
+     * of bytes (and are also loaded into this classloader).
+     */
+    protected Class<?> loadClass(String name, boolean resolve)
+            throws ClassNotFoundException {
+        Class<?> clazz;
+
+        if (history.contains(name)) {
+            Class<?> c = this.findLoadedClass(name);
+            return c;
+        }
+        if (useSystemLoader(name)) {
+            clazz = findSystemClass(name);
+            if (verbose) System.err.println("Loading system class " + name);
+        } else {
+            history.add(name);
+            try {
+                if (verbose) {
+                    System.err.println("Loading classloader class " + name);
+                }
+                byte[] classData = getClass(name);;
+                boolean expanded = false;
+                if (!noReplace && replaced.containsKey(name)) {
+                    if (verbose) {
+                        System.err.println("Replacing class " + name);
+                    }
+                    ClassReader cr = new ClassReader(classData);
+                    ClassWriter cw = new ClassWriter(0);
+                    VisitorMaker vm = replaced.get(name);
+                    cr.accept(vm.make(cw), 0);
+                    classData = cw.toByteArray();
+                }
+                clazz = defineClass(name, classData, 0, classData.length);
+            } catch (java.io.EOFException ioe) {
+                throw new ClassNotFoundException(
+                        "IO Exception in reading class : " + name + " ", ioe);
+            } catch (ClassFormatError ioe) {
+                throw new ClassNotFoundException(
+                        "ClassFormatError in reading class file: ", ioe);
+            } catch (IOException ioe) {
+                throw new ClassNotFoundException(
+                        "IO Exception in reading class file: ", ioe);
+            }
+        }
+        if (clazz == null) {
+            throw new ClassNotFoundException(name);
+        }
+        if (resolve) {
+            resolveClass(clazz);
+        }
+        return clazz;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/accessProtectedSuper/MethodInvoker.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,40 @@
+/*
+ * 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 anotherpkg.MethodSupplierOuter;
+
+public class MethodInvoker extends MethodSupplierOuter.MethodSupplier {
+    public static void invoke() throws Exception {
+        MethodInvoker ms = new MethodInvoker();
+        ms.m();
+        ms.myfi().invokeMethodReference();
+        MyFunctionalInterface fi = ms::m; // Should not fail with modified bytecodes
+        fi.invokeMethodReference();
+    }
+
+    MyFunctionalInterface myfi() {
+        MyFunctionalInterface fi = this::m; // Should not fail with modified bytecodes
+        return fi;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/accessProtectedSuper/Test.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 8022718
+ * @summary Runtime accessibility checking: protected class, if extended, should be accessible from another package
+ *
+ * @compile -XDignore.symbol.file BogoLoader.java MethodInvoker.java Test.java anotherpkg/MethodSupplierOuter.java
+ * @run main/othervm Test
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.HashSet;
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.MethodVisitor;
+import jdk.internal.org.objectweb.asm.ClassVisitor;
+import jdk.internal.org.objectweb.asm.Opcodes;
+
+interface MyFunctionalInterface {
+
+    void invokeMethodReference();
+}
+
+class MakeProtected implements BogoLoader.VisitorMaker, Opcodes {
+
+    final boolean whenVisitInner;
+
+    MakeProtected(boolean when_visit_inner) {
+        super();
+        whenVisitInner = when_visit_inner;
+    }
+
+    public ClassVisitor make(ClassVisitor cv) {
+        return new ClassVisitor(Opcodes.ASM5, cv) {
+
+            @Override
+            public void visitInnerClass(String name, String outerName,
+                    String innerName, int access) {
+                if (whenVisitInner) {
+                    int access_ = (ACC_PROTECTED | access) & ~(ACC_PRIVATE | ACC_PUBLIC);
+                    System.out.println("visitInnerClass: name = " + name
+                            + ", outerName = " + outerName
+                            + ", innerName = " + innerName
+                            + ", access original = 0x" + Integer.toHexString(access)
+                            + ", access modified to 0x" + Integer.toHexString(access_));
+                    access = access_;
+                }
+                super.visitInnerClass(name, outerName, innerName, access);
+            }
+        };
+    }
+};
+
+public class Test {
+
+    public static void main(String argv[]) throws Exception, Throwable {
+        BogoLoader.VisitorMaker makeProtectedNop = new MakeProtected(false);
+        BogoLoader.VisitorMaker makeProtectedMod = new MakeProtected(true);
+
+        int errors = 0;
+        errors += tryModifiedInvocation(makeProtectedNop);
+        errors += tryModifiedInvocation(makeProtectedMod);
+
+        if (errors > 0) {
+            throw new Error("FAIL; there were errors");
+        }
+    }
+
+    private static int tryModifiedInvocation(BogoLoader.VisitorMaker makeProtected)
+            throws Throwable, ClassNotFoundException {
+        HashMap<String, BogoLoader.VisitorMaker> replace
+                = new HashMap<String, BogoLoader.VisitorMaker>();
+        replace.put("anotherpkg.MethodSupplierOuter$MethodSupplier", makeProtected);
+        HashSet<String> in_bogus = new HashSet<String>();
+        in_bogus.add("MethodInvoker");
+        in_bogus.add("MyFunctionalInterface");
+        in_bogus.add("anotherpkg.MethodSupplierOuter"); // seems to be never loaded
+        in_bogus.add("anotherpkg.MethodSupplierOuter$MethodSupplier");
+
+        BogoLoader bl = new BogoLoader(in_bogus, replace);
+        try {
+            Class<?> isw = bl.loadClass("MethodInvoker");
+            Method meth = isw.getMethod("invoke");
+            Object result = meth.invoke(null);
+        } catch (Throwable th) {
+            System.out.flush();
+            Thread.sleep(250); // Let Netbeans get its I/O sorted out.
+            th.printStackTrace();
+            System.err.flush();
+            Thread.sleep(250); // Let Netbeans get its I/O sorted out.
+            return 1;
+        }
+        return 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/accessProtectedSuper/anotherpkg/MethodSupplierOuter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,34 @@
+/*
+ * 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 anotherpkg;
+
+public class MethodSupplierOuter {
+    // MethodSupplier is "public" for javac compilation, modified to "protected" for test.
+    public static class MethodSupplier {
+        public void m() {
+            System.out.println("good");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/lambda/DupIntf.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,42 @@
+/*
+ * 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 8025868
+ * @summary Lambda class can be generated with duplicate interfaces (ClassFormatError)
+ * @run main DupIntf
+ */
+
+interface SAM<P1> {
+    P1 m();
+}
+
+interface Other { }
+
+public class DupIntf {
+    public static void main(String argv[]) {
+        SAM<?> sam = (SAM<?> & Other) () -> "Pass.";
+        System.out.println(sam.m());
+    }
+}
--- a/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -167,8 +167,12 @@
     public void testDumpDirNotWritable() throws IOException {
         if (! Files.getFileStore(Paths.get("."))
                    .supportsFileAttributeView(PosixFileAttributeView.class)) {
-            // No easy way to setup readonly directory
-            throw new SkipException("Posix not supported");
+            // No easy way to setup readonly directory without POSIX
+            // We would like to skip the test with a cause with
+            //     throw new SkipException("Posix not supported");
+            // but jtreg will report failure so we just pass the test
+            // which we can look at if jtreg changed its behavior
+            return;
         }
 
         Files.createDirectory(Paths.get("readOnly"),
--- a/test/java/lang/management/ManagementFactory/ProxyTypeMapping.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/management/ManagementFactory/ProxyTypeMapping.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,6 @@
 import static java.lang.management.ManagementFactory.*;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import com.sun.management.GcInfo;
 
 public class ProxyTypeMapping {
@@ -162,23 +161,23 @@
     }
 
     private static void checkMemoryUsage() throws Exception {
-        // sanity check to have non-zero usage
+        // sanity check to have non-negative usage
         MemoryUsage u1 = memory.getHeapMemoryUsage();
         MemoryUsage u2 = memory.getNonHeapMemoryUsage();
         MemoryUsage u3 = heapPool.getUsage();
         MemoryUsage u4 = nonHeapPool.getUsage();
-        if (u1.getCommitted() <= 0 ||
-            u2.getCommitted() <= 0 ||
-            u3.getCommitted() <= 0 ||
-            u4.getCommitted() <= 0) {
+        if (u1.getCommitted() < 0 ||
+            u2.getCommitted() < 0 ||
+            u3.getCommitted() < 0 ||
+            u4.getCommitted() < 0) {
             throw new RuntimeException("TEST FAILED: " +
-                " expected non-zero committed usage");
+                " expected non-negative committed usage");
         }
         memory.gc();
         MemoryUsage u5 = heapPool.getCollectionUsage();
-        if (u5.getCommitted() <= 0) {
+        if (u5.getCommitted() < 0) {
             throw new RuntimeException("TEST FAILED: " +
-                " expected non-zero committed collected usage");
+                " expected non-negative committed collected usage");
         }
     }
 
--- a/test/java/lang/management/ManagementFactory/ValidateOpenTypes.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/management/ManagementFactory/ValidateOpenTypes.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug     5024531
- * @summary Validata open types mapped for the MXBeans in the platform
+ * @summary Validate open types mapped for the MXBeans in the platform
  *          MBeanServer.
  * @author  Mandy Chung
  *
@@ -38,7 +38,6 @@
 import static java.lang.management.ManagementFactory.*;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import com.sun.management.GcInfo;
 
 public class ValidateOpenTypes {
@@ -178,23 +177,23 @@
     }
 
     private static void checkMemoryUsage() throws Exception {
-        // sanity check to have non-zero usage
+        // sanity check to have non-negative usage
         Object u1 = server.getAttribute(memory, "HeapMemoryUsage");
         Object u2 = server.getAttribute(memory, "NonHeapMemoryUsage");
         Object u3 = server.getAttribute(heapPool, "Usage");
         Object u4 = server.getAttribute(nonHeapPool, "Usage");
-        if (getCommitted(u1) <= 0 ||
-            getCommitted(u2) <= 0 ||
-            getCommitted(u3) <= 0 ||
-            getCommitted(u4) <= 0) {
+        if (getCommitted(u1) < 0 ||
+            getCommitted(u2) < 0 ||
+            getCommitted(u3) < 0 ||
+            getCommitted(u4) < 0) {
             throw new RuntimeException("TEST FAILED: " +
-                " expected non-zero committed usage");
+                " expected non-negative committed usage");
         }
         server.invoke(memory, "gc", new Object[0], new String[0]);
         Object u5 = server.getAttribute(heapPool, "CollectionUsage");
-        if (getCommitted(u5) <= 0) {
+        if (getCommitted(u5) < 0) {
             throw new RuntimeException("TEST FAILED: " +
-                " expected non-zero committed collected usage");
+                " expected non-negative committed collected usage");
         }
     }
 
--- a/test/java/lang/management/MemoryPoolMXBean/ThresholdTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/management/MemoryPoolMXBean/ThresholdTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2010, 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
@@ -28,7 +28,7 @@
  *          MemoryPoolMXBean.isCollectionThresholdExceeded().
  * @author  Mandy Chung
  *
- * @run main ThresholdTest
+ * @run main/othervm ThresholdTest
  */
 
 import java.lang.management.*;
@@ -36,6 +36,9 @@
 
 public class ThresholdTest {
     public static void main(String args[]) throws Exception {
+        long[] bigObject = new long[1000000];
+
+        System.gc(); // force an initial full-gc
         List<MemoryPoolMXBean> pools = ManagementFactory.getMemoryPoolMXBeans();
         try {
             for (MemoryPoolMXBean p : pools) {
@@ -82,6 +85,10 @@
         }
 
         p.setUsageThreshold(1);
+        // force a full gc to minimize the likelihood of running GC
+        // between getting the usage and checking the threshold
+        System.gc();
+
         MemoryUsage u = p.getUsage();
         if (u.getUsed() >= 1) {
             if (!p.isUsageThresholdExceeded()) {
--- a/test/java/lang/management/ThreadMXBean/ThreadBlockedCount.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/management/ThreadMXBean/ThreadBlockedCount.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,6 @@
  */
 
 import java.lang.management.*;
-import java.util.concurrent.locks.LockSupport;
 
 public class ThreadBlockedCount {
     final static long EXPECTED_BLOCKED_COUNT = 3;
@@ -101,6 +100,7 @@
                         System.err.println("Unexpected exception.");
                         e.printStackTrace(System.err);
                         testFailed = true;
+                        break;
                     }
                 }
 
@@ -127,6 +127,7 @@
                         System.err.println("Unexpected exception.");
                         e.printStackTrace(System.err);
                         testFailed = true;
+                        break;
                     }
                 }
 
@@ -153,6 +154,7 @@
                         System.err.println("Unexpected exception.");
                         e.printStackTrace(System.err);
                         testFailed = true;
+                        break;
                     }
                 }
 
@@ -166,15 +168,25 @@
                 }
             }
 
-            // Check the mbean now
-            ThreadInfo ti = mbean.getThreadInfo(Thread.currentThread().
-                                                getId());
-            long count = ti.getBlockedCount();
-
+            // wait for the thread stats to be updated for 10 seconds
+            for (int i = 0; i < 100; i++) {
+                if (getBlockedCount() == EXPECTED_BLOCKED_COUNT) {
+                    return;
+                }
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException e) {
+                    System.err.println("Unexpected exception.");
+                    e.printStackTrace(System.err);
+                    testFailed = true;
+                    return;
+                }
+            }
+            long count = getBlockedCount();
             if (count != EXPECTED_BLOCKED_COUNT) {
                 System.err.println("TEST FAILED: Blocked thread has " + count +
-                                   " blocked counts. Expected " +
-                                   EXPECTED_BLOCKED_COUNT);
+                                    " blocked counts. Expected " +
+                                    EXPECTED_BLOCKED_COUNT);
                 testFailed = true;
             }
         } // run()
@@ -195,6 +207,7 @@
                     System.err.println("Unexpected exception.");
                     e.printStackTrace(System.err);
                     testFailed = true;
+                    break;
                 }
                 ThreadInfo info = mbean.getThreadInfo(blocked.getId());
                 threadBlocked = (info.getThreadState() == Thread.State.BLOCKED);
@@ -233,4 +246,13 @@
 
         } // run()
     } // BlockedThread
+
+    private static long getBlockedCount() {
+        long count;
+        // Check the mbean now
+        ThreadInfo ti = mbean.getThreadInfo(Thread.currentThread().
+                getId());
+        count = ti.getBlockedCount();
+        return count;
+    }
 }
--- a/test/java/lang/reflect/DefaultStaticTest/DefaultStaticInvokeTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/reflect/DefaultStaticTest/DefaultStaticInvokeTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -44,30 +44,86 @@
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.fail;
 import org.testng.annotations.Test;
 
 import static helper.Mod.*;
 import static helper.Declared.*;
 import helper.Mod;
 
+
 public class DefaultStaticInvokeTest {
 
+    // getMethods(): Make sure getMethods returns the expected methods.
     @Test(dataProvider = "testCasesAll",
             dataProviderClass = DefaultStaticTestData.class)
     public void testGetMethods(String testTarget, Object param)
             throws Exception {
-        // test the methods retrieved by getMethods()
         testMethods(ALL_METHODS, testTarget, param);
     }
 
+
+    // getDeclaredMethods(): Make sure getDeclaredMethods returns the expected methods.
     @Test(dataProvider = "testCasesAll",
             dataProviderClass = DefaultStaticTestData.class)
     public void testGetDeclaredMethods(String testTarget, Object param)
             throws Exception {
-        // test the methods retrieved by getDeclaredMethods()
         testMethods(DECLARED_ONLY, testTarget, param);
     }
 
+
+    // getMethod(): Make sure that getMethod finds all methods it should find.
+    @Test(dataProvider = "testCasesAll",
+            dataProviderClass = DefaultStaticTestData.class)
+    public void testGetMethod(String testTarget, Object param)
+            throws Exception {
+
+        Class<?> typeUnderTest = Class.forName(testTarget);
+
+        MethodDesc[] descs = typeUnderTest.getAnnotationsByType(MethodDesc.class);
+
+        for (MethodDesc desc : descs) {
+            assertTrue(isFoundByGetMethod(typeUnderTest,
+                                          desc.name(),
+                                          argTypes(param)));
+        }
+    }
+
+
+    // getMethod(): Make sure that getMethod does *not* find certain methods.
+    @Test(dataProvider = "testCasesAll",
+            dataProviderClass = DefaultStaticTestData.class)
+    public void testGetMethodSuperInterfaces(String testTarget, Object param)
+            throws Exception {
+
+        // Make sure static methods in superinterfaces are not found (unless the type under
+        // test declares a static method with the same signature).
+
+        Class<?> typeUnderTest = Class.forName(testTarget);
+
+        for (Class<?> interfaze : typeUnderTest.getInterfaces()) {
+
+            for (MethodDesc desc : interfaze.getAnnotationsByType(MethodDesc.class)) {
+
+                boolean isStatic = desc.mod() == STATIC;
+
+                boolean declaredInThisType = isMethodDeclared(typeUnderTest,
+                                                              desc.name());
+
+                boolean expectedToBeFound = !isStatic || declaredInThisType;
+
+                if (expectedToBeFound)
+                    continue; // already tested in testGetMethod()
+
+                assertFalse(isFoundByGetMethod(typeUnderTest,
+                                               desc.name(),
+                                               argTypes(param)));
+            }
+        }
+    }
+
+
+    // Method.invoke(): Make sure Method.invoke returns the expected value.
     @Test(dataProvider = "testCasesAll",
             dataProviderClass = DefaultStaticTestData.class)
     public void testMethodInvoke(String testTarget, Object param)
@@ -78,11 +134,13 @@
         // test the method retrieved by Class.getMethod(String, Object[])
         for (MethodDesc toTest : expectedMethods) {
             String name = toTest.name();
-            Method m = getTestMethod(typeUnderTest, name, param);
+            Method m = typeUnderTest.getMethod(name, argTypes(param));
             testThisMethod(toTest, m, typeUnderTest, param);
         }
     }
 
+
+    // MethodHandle.invoke(): Make sure MethodHandle.invoke returns the expected value.
     @Test(dataProvider = "testCasesAll",
             dataProviderClass = DefaultStaticTestData.class)
     public void testMethodHandleInvoke(String testTarget, Object param)
@@ -116,6 +174,7 @@
 
     }
 
+    // Lookup.findStatic / .findVirtual: Make sure IllegalAccessException is thrown as expected.
     @Test(dataProvider = "testClasses",
             dataProviderClass = DefaultStaticTestData.class)
     public void testIAE(String testTarget, Object param)
@@ -128,7 +187,7 @@
             String mName = toTest.name();
             Mod mod = toTest.mod();
             if (mod != STATIC && typeUnderTest.isInterface()) {
-                return;
+                continue;
             }
             Exception caught = null;
             try {
@@ -136,10 +195,12 @@
             } catch (Exception e) {
                 caught = e;
             }
-            assertTrue(caught != null);
+            assertNotNull(caught);
             assertEquals(caught.getClass(), IllegalAccessException.class);
         }
     }
+
+
     private static final String[] OBJECT_METHOD_NAMES = {
         "equals",
         "hashCode",
@@ -192,15 +253,15 @@
                 myMethods.put(mName, m);
             }
         }
-        assertEquals(expectedMethods.length, myMethods.size());
+
+        assertEquals(myMethods.size(), expectedMethods.length);
 
         for (MethodDesc toTest : expectedMethods) {
 
             String name = toTest.name();
-            Method candidate = myMethods.get(name);
+            Method candidate = myMethods.remove(name);
 
             assertNotNull(candidate);
-            myMethods.remove(name);
 
             testThisMethod(toTest, candidate, typeUnderTest, param);
 
@@ -210,6 +271,7 @@
         assertTrue(myMethods.isEmpty());
     }
 
+
     private void testThisMethod(MethodDesc toTest, Method method,
             Class<?> typeUnderTest, Object param) throws Exception {
         // Test modifiers, and invoke
@@ -256,37 +318,52 @@
                 assertFalse(method.isDefault());
                 break;
             default:
-                assertFalse(true); //this should never happen
+                fail(); //this should never happen
                 break;
         }
 
     }
 
+
+    private boolean isMethodDeclared(Class<?> type, String name) {
+        MethodDesc[] methDescs = type.getAnnotationsByType(MethodDesc.class);
+        for (MethodDesc desc : methDescs) {
+            if (desc.declared() == YES && desc.name().equals(name))
+                return true;
+        }
+        return false;
+    }
+
+
+    private boolean isFoundByGetMethod(Class<?> c, String method, Class<?>... argTypes) {
+        try {
+            c.getMethod(method, argTypes);
+            return true;
+        } catch (NoSuchMethodException notFound) {
+            return false;
+        }
+    }
+
+
+    private Class<?>[] argTypes(Object param) {
+        return param == null ? new Class[0] : new Class[] { Object.class };
+    }
+
+
     private Object tryInvoke(Method m, Class<?> receiverType, Object param)
             throws Exception {
         Object receiver = receiverType == null ? null : receiverType.newInstance();
-        Object result = null;
-        if (param == null) {
-            result = m.invoke(receiver);
-        } else {
-            result = m.invoke(receiver, param);
-        }
-        return result;
+        Object[] args = param == null ? new Object[0] : new Object[] { param };
+        return m.invoke(receiver, args);
     }
 
-    private Method getTestMethod(Class clazz, String methodName, Object param)
-            throws NoSuchMethodException {
-        Class[] paramsType = (param != null)
-                ? new Class[]{Object.class}
-                : new Class[]{};
-        return clazz.getMethod(methodName, paramsType);
-    }
 
     private MethodHandle getTestMH(Class clazz, String methodName, Object param)
             throws Exception {
         return getTestMH(clazz, methodName, param, false);
     }
 
+
     private MethodHandle getTestMH(Class clazz, String methodName,
             Object param, boolean isNegativeTest)
             throws Exception {
--- a/test/java/lang/reflect/DefaultStaticTest/DefaultStaticTestData.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/lang/reflect/DefaultStaticTest/DefaultStaticTestData.java	Wed Oct 30 18:38:20 2013 +0000
@@ -172,7 +172,7 @@
 
 @MethodDesc(name = "defaultMethod", retval = "TestIF8.TestClass8", mod = DEFAULT, declared = NO)
 class TestClass8<T> implements TestIF8<T> {
-};
+}
 
 @MethodDesc(name = "defaultMethod", retval = "TestIF9.defaultMethod", mod = DEFAULT, declared = YES)
 interface TestIF9 extends TestIF1 {
@@ -218,7 +218,6 @@
 }
 
 @MethodDesc(name = "defaultMethod", retval = "TestIF12.defaultMethod", mod = DEFAULT, declared = YES)
-@MethodDesc(name = "staticMethod", retval = "TestIF2.staticMethod", mod = STATIC, declared = NO)
 interface TestIF12 extends TestIF2 {
 
     default String defaultMethod() {
@@ -299,7 +298,7 @@
 
 @MethodDesc(name = "defaultMethod", retval = "TestIF16.defaultMethod", mod = DEFAULT, declared = NO)
 class TestClass16 implements TestIF16 {
-};
+}
 
 @MethodDesc(name = "defaultMethod", retval = "TestIF17.defaultMethod", mod = DEFAULT, declared = YES)
 @MethodDesc(name = "staticMethod", retval = "TestIF17.staticMethod", mod = STATIC, declared = YES)
@@ -318,6 +317,12 @@
 class TestClass17 implements TestIF17 {
 }
 
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF17.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass18 extends TestClass17 {
+}
+
+
 @Retention(RetentionPolicy.RUNTIME)
 @Repeatable(MethodDescs.class)
 @interface MethodDesc {
@@ -332,6 +337,41 @@
     MethodDesc[] value();
 }
 
+//Diamond Case for static method
+@MethodDesc(name = "staticMethod", retval = "TestIF2A.staticMethod", mod = STATIC, declared = YES)
+interface TestIF2A extends TestIF2 {
+    static String staticMethod() {
+        return "TestIF2A.staticMethod";
+    }
+}
+
+@MethodDesc(name = "method", retval = "", mod = ABSTRACT, declared = YES)
+interface TestIF2B extends TestIF2 {
+    String method();
+}
+
+@MethodDesc(name = "method", retval = "", mod = ABSTRACT, declared = YES)
+interface TestIF18 extends TestIF10, TestIF2A {
+    String method();
+}
+
+@MethodDesc(name = "method", retval = "", mod = ABSTRACT, declared = NO)
+@MethodDesc(name = "defaultMethod", retval = "TestIF12.defaultMethod", mod = DEFAULT, declared = NO)
+interface TestIF19 extends TestIF12, TestIF2B {
+}
+
+@MethodDesc(name = "staticMethod", retval = "TestIF20.staticMethod", mod = STATIC, declared = YES)
+@MethodDesc(name = "defaultMethod", retval = "TestIF12.defaultMethod", mod = DEFAULT, declared = NO)
+interface TestIF20 extends TestIF12, TestIF2A {
+    static String staticMethod() {
+        return "TestIF20.staticMethod";
+    }
+}
+
+@MethodDesc(name = "method", retval = "", mod = ABSTRACT, declared = NO)
+interface TestIF21 extends TestIF2A, TestIF2B {
+}
+
 public class DefaultStaticTestData {
 
     /**
@@ -343,22 +383,23 @@
     static Object[][] testClasses() {
         return new Object[][]{
             {"TestClass1", null},
-            //{"TestClass2", null}, @ignore due to JDK-8009411
+            {"TestClass2", null},
             {"TestClass3", null},
-            //{"TestClass4", null}, @ignore due to JDK-8009411
-            //{"TestClass5", null}, @ignore due to JDK-8009411
-            //{"TestClass6", null}, @ignore due to JDK-8009411
+            {"TestClass4", null},
+            {"TestClass5", null},
+            {"TestClass6", null},
             {"TestClass7", "TestIF7.TestClass7"},
             {"TestClass8", "TestIF8.TestClass8"},
             {"TestClass9", null},
             {"TestClass91", null},
-            //{"TestClass11", null}, @ignore due to JDK-8009411
-            //{"TestClass12", null}, @ignore due to JDK-8009411
+            {"TestClass11", null},
+            {"TestClass12", null},
             {"TestClass13", null},
             {"TestClass14", null},
             {"TestClass15", null},
-            {"TestClass16", null}
-        //{"TestClass17", null} @ignore due to JDK-8009411
+            {"TestClass16", null},
+            {"TestClass17", null},
+            {"TestClass18", null},
         };
     }
 
@@ -372,6 +413,8 @@
         return new Object[][]{
             {"TestIF1", null},
             {"TestIF2", null},
+            {"TestIF2A", null},
+            {"TestIF2B", null},
             {"TestIF3", null},
             {"TestIF4", null},
             {"TestIF5", null},
@@ -388,7 +431,12 @@
             {"TestIF1D", null},
             {"TestIF15", null},
             {"TestIF16", null},
-            {"TestIF17", null},};
+            {"TestIF17", null},
+            {"TestIF18", null},
+            {"TestIF19", null},
+            {"TestIF20", null},
+            {"TestIF21", null},
+        };
     }
 
     @DataProvider
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/reflect/Method/InterfaceStatic/StaticInterfaceMethodInWayOfDefault.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,183 @@
+/*
+ * 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 8009411
+ * @summary Test that a static method on an interface doesn't hide a default
+ *          method with the same name and signature in a separate compilation
+ *          scenario.
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.concurrent.Callable;
+
+import sun.misc.IOUtils;
+
+public class StaticInterfaceMethodInWayOfDefault {
+    public interface A_v1 {
+    }
+
+    public interface A_v2 {
+        default void m() {
+            System.err.println("A.m() called");
+        }
+    }
+
+    public interface B  extends A_v1 {
+        static void m() {
+            System.err.println("B.m() called");
+        }
+    }
+
+    public interface C_v1 extends B {
+        default void m() {
+            System.err.println("C.m() called");
+        }
+    }
+
+    public interface C_v2 extends B {
+    }
+
+    public static class TestTask implements Callable<String> {
+        @Override
+        public String call() {
+            try {
+                Method m = C_v1.class.getMethod("m", (Class<?>[])null);
+                return  m.getDeclaringClass().getSimpleName();
+            } catch (NoSuchMethodException e) {
+                System.err.println("Couldn't find method");
+                return "ERROR";
+            }
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        int errors = 0;
+        Callable<String> v1Task = new TestTask();
+
+        ClassLoader v2Loader = new V2ClassLoader(
+            StaticInterfaceMethodInWayOfDefault.class.getClassLoader());
+        Callable<String> v2Task = (Callable<String>) Class.forName(
+            TestTask.class.getName(),
+            true,
+            v2Loader).newInstance();
+
+        System.err.println("Running using _v1 classes:");
+        String res = v1Task.call();
+        if(!res.equals("C_v1")) {
+            System.err.println("Got wrong method, expecting C_v1, got: " + res);
+            errors++;
+        }
+
+        System.err.println("Running using _v2 classes:");
+        res = v2Task.call();
+        if(!res.equals("A_v1")) {
+            System.err.println("Got wrong method, expecting A_v1, got: " + res);
+            errors++;
+        }
+
+        if (errors != 0)
+            throw new RuntimeException("Errors found, check log for details");
+    }
+
+    /**
+     * A ClassLoader implementation that loads alternative implementations of
+     * classes. If class name ends with "_v1" it locates instead a class with
+     * name ending with "_v2" and loads that class instead.
+     */
+    static class V2ClassLoader extends ClassLoader {
+        V2ClassLoader(ClassLoader parent) {
+            super(parent);
+        }
+
+        @Override
+        protected Class<?> loadClass(String name, boolean resolve)
+            throws ClassNotFoundException {
+            if (name.indexOf('.') < 0) { // root package is our class
+                synchronized (getClassLoadingLock(name)) {
+                    // First, check if the class has already been loaded
+                    Class<?> c = findLoadedClass(name);
+                    if (c == null) {
+                        c = findClass(name);
+                    }
+                    if (resolve) {
+                        resolveClass(c);
+                    }
+                    return c;
+                }
+            }
+            else { // not our class
+                return super.loadClass(name, resolve);
+            }
+        }
+
+        @Override
+        protected Class<?> findClass(String name)
+            throws ClassNotFoundException {
+            // special class name -> replace it with alternative name
+            if (name.endsWith("_v1")) {
+                String altName = name.substring(0, name.length() - 3) + "_v2";
+                String altPath = altName.replace('.', '/').concat(".class");
+                try (InputStream is = getResourceAsStream(altPath)) {
+                    if (is != null) {
+                        byte[] bytes = IOUtils.readFully(is, -1, true);
+                        // patch class bytes to contain original name
+                        for (int i = 0; i < bytes.length - 2; i++) {
+                            if (bytes[i] == '_' &&
+                                bytes[i + 1] == 'v' &&
+                                bytes[i + 2] == '2') {
+                                bytes[i + 2] = '1';
+                            }
+                        }
+                        return defineClass(name, bytes, 0, bytes.length);
+                    }
+                    else {
+                        throw new ClassNotFoundException(name);
+                    }
+                }
+                catch (IOException e) {
+                    throw new ClassNotFoundException(name, e);
+                }
+            }
+            else { // not special class name -> just load the class
+                String path = name.replace('.', '/').concat(".class");
+                try (InputStream is = getResourceAsStream(path)) {
+                    if (is != null) {
+                        byte[] bytes = IOUtils.readFully(is, -1, true);
+                        return defineClass(name, bytes, 0, bytes.length);
+                    }
+                    else {
+                        throw new ClassNotFoundException(name);
+                    }
+                }
+                catch (IOException e) {
+                    throw new ClassNotFoundException(name, e);
+                }
+            }
+        }
+    }
+}
--- a/test/java/net/Authenticator/B4769350.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/net/Authenticator/B4769350.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -23,9 +23,7 @@
 
 /**
  * @test
- * @bug 4769350
- * @library ../../../sun/net/www/httptest/
- * @build HttpCallback TestHttpServer ClosedChannelList HttpTransaction AbstractCallback
+ * @bug 4769350 8017779
  * @run main/othervm B4769350 server
  * @run main/othervm B4769350 proxy
  * @summary proxy authentication username and password caching only works in serial case
@@ -34,8 +32,17 @@
  * tests may already have invoked the HTTP handler.
  */
 
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
 import java.io.*;
 import java.net.*;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 public class B4769350 {
 
@@ -43,13 +50,12 @@
     static boolean error = false;
 
     static void read (InputStream is) throws IOException {
-        int c;
-        while ((c=is.read()) != -1) {
+        while (is.read() != -1) {
             //System.out.write (c);
         }
     }
 
-    static class Client extends Thread {
+     static class Client extends Thread {
         String authority, path;
         boolean allowerror;
 
@@ -64,8 +70,8 @@
             try {
                 URI u = new URI ("http", authority, path, null, null);
                 URL url = u.toURL();
-                URLConnection urlc = url.openConnection ();
-                InputStream is = urlc.getInputStream ();
+                URLConnection urlc = url.openConnection();
+                InputStream is = urlc.getInputStream();
                 read (is);
                 is.close();
             } catch (URISyntaxException  e) {
@@ -73,7 +79,8 @@
                 error = true;
             } catch (IOException e) {
                 if (!allowerror) {
-                    System.out.println (Thread.currentThread().getName() + " " + e);
+                    System.out.println (Thread.currentThread().getName()
+                            + " " + e);
                     e.printStackTrace();
                     error = true;
                 }
@@ -81,55 +88,58 @@
         }
     }
 
-    static class CallBack extends AbstractCallback {
-
-        void errorReply (HttpTransaction req, String reply) throws IOException {
-            req.addResponseHeader ("Connection", "close");
-            req.addResponseHeader ("WWW-Authenticate", reply);
-            req.sendResponse (401, "Unauthorized");
-            req.orderlyClose();
-        }
+    class Server implements AutoCloseable {
+        HttpServer server;
+        Executor executor;
+        CyclicBarrier t1Cond1;
+        CyclicBarrier t1Cond2;
 
-        void proxyReply (HttpTransaction req, String reply) throws IOException {
-            req.addResponseHeader ("Proxy-Authenticate", reply);
-            req.sendResponse (407, "Proxy Authentication Required");
-        }
-
-        void okReply (HttpTransaction req) throws IOException {
-            req.addResponseHeader ("Connection", "close");
-            req.setResponseEntityBody ("Hello .");
-            req.sendResponse (200, "Ok");
-            req.orderlyClose();
+        public String getAddress() {
+            return server.getAddress().getHostName();
         }
 
-        public void request (HttpTransaction req, int count) {
+        public void startServer() {
+            InetSocketAddress addr = new InetSocketAddress(0);
+
             try {
-                URI uri = req.getRequestURI();
-                String path = uri.getPath();
-                if (path.endsWith ("/t1a")) {
-                    doT1a (req, count);
-                } else if (path.endsWith ("/t1b")) {
-                    doT1b (req, count);
-                } else if (path.endsWith ("/t1c")) {
-                    doT1c (req, count);
-                } else if (path.endsWith ("/t1d")) {
-                    doT1d (req, count);
-                } else if (path.endsWith ("/t2a")) {
-                    doT2a (req, count);
-                } else if (path.endsWith ("/t2b")) {
-                    doT2b (req, count);
-                } else if (path.endsWith ("/t3a")) {
-                    doT3a (req, count);
-                } else if (path.endsWith ("/t3b")) {
-                    doT3bc (req, count);
-                } else if (path.endsWith ("/t3c")) {
-                    doT3bc (req, count);
-                } else {
-                   System.out.println ("unexpected request URI");
-                }
-            } catch (IOException e) {
-                e.printStackTrace();
+                server = HttpServer.create(addr, 0);
+            } catch (IOException ioe) {
+                throw new RuntimeException("Server could not be created");
             }
+            executor = Executors.newFixedThreadPool(10);
+            server.setExecutor(executor);
+            server.createContext("/test/realm1/t1a",
+                    new AuthenticationHandlerT1a() );
+            server.createContext("/test/realm2/t1b",
+                    new AuthenticationHandlerT1b());
+            server.createContext("/test/realm1/t1c",
+                    new AuthenticationHandlerT1c());
+            server.createContext("/test/realm2/t1d",
+                    new AuthenticationHandlerT1d());
+            server.createContext("/test/realm3/t2a",
+                    new AuthenticationHandlerT2a());
+            server.createContext("/test/realm3/t2b",
+                    new AuthenticationHandlerT2b());
+            server.createContext("/test/realm4/t3a",
+                    new AuthenticationHandlerT3a());
+            server.createContext("/test/realm4/t3b",
+                    new AuthenticationHandlerT3bc());
+            server.createContext("/test/realm4/t3c",
+                    new AuthenticationHandlerT3bc());
+            t1Cond1 = new CyclicBarrier(2);
+            t1Cond2 = new CyclicBarrier(2);
+            server.start();
+        }
+
+        public int getPort() {
+            return server.getAddress().getPort();
+        }
+
+        public void close() {
+            if (executor != null)
+                ((ExecutorService)executor).shutdownNow();
+            if (server != null)
+                server.stop(0);
         }
 
         /* T1 tests the client by sending 4 requests to 2 different realms
@@ -138,90 +148,158 @@
          * the second requests should be executed without calling the authenticator.
          * The test succeeds if the authenticator was only called twice.
          */
-        void doT1a (HttpTransaction req, int count) throws IOException {
-            switch (count) {
-            case 0:
-                errorReply (req, "Basic realm=\"realm1\"");
-                TestHttpServer.rendezvous ("one", 2);
-                break;
-            case 1:
-                TestHttpServer.waitForCondition ("cond2");
-                okReply (req);
-                break;
-            default:
-                System.out.println ("Unexpected request");
+        class AuthenticationHandlerT1a implements HttpHandler
+        {
+            volatile int count = -1;
+
+            @Override
+            public void handle(HttpExchange exchange) throws IOException {
+                count++;
+                try {
+                    switch(count) {
+                        case 0:
+                            AuthenticationHandler.errorReply(exchange,
+                                    "Basic realm=\"realm1\"");
+                            break;
+                        case 1:
+                            t1Cond1.await();
+                            t1cond2latch.await();
+                            AuthenticationHandler.okReply(exchange);
+                            break;
+                        default:
+                            System.out.println ("Unexpected request");
+                    }
+                } catch (InterruptedException |
+                                 BrokenBarrierException e)
+                        {
+                            throw new RuntimeException(e);
+                        }
+            }
+        }
+
+        class AuthenticationHandlerT1b implements HttpHandler
+        {
+            volatile int count = -1;
+
+            @Override
+            public void handle(HttpExchange exchange) throws IOException {
+                count++;
+                try {
+                    switch(count) {
+                        case 0:
+                            AuthenticationHandler.errorReply(exchange,
+                                    "Basic realm=\"realm2\"");
+                            break;
+                        case 1:
+                            t1Cond1.await();
+                            t1cond1latch.countDown();
+                            t1cond2latch.await();
+                            AuthenticationHandler.okReply(exchange);
+                            break;
+                        default:
+                            System.out.println ("Unexpected request");
+                    }
+                } catch (InterruptedException | BrokenBarrierException e) {
+                    throw new RuntimeException(e);
+                }
             }
         }
 
+        class AuthenticationHandlerT1c implements HttpHandler
+        {
+            volatile int count = -1;
 
-        void doT1b (HttpTransaction req, int count) throws IOException {
-            switch (count) {
-            case 0:
-                errorReply (req, "Basic realm=\"realm2\"");
-                TestHttpServer.rendezvous ("one", 2);
-                TestHttpServer.setCondition ("cond1");
-                break;
-            case 1:
-                TestHttpServer.waitForCondition ("cond2");
-                okReply (req);
-                break;
-            default:
-                System.out.println ("Unexpected request");
+            @Override
+            public void handle(HttpExchange exchange) throws IOException {
+                count++;
+                switch(count) {
+                    case 0:
+                        AuthenticationHandler.errorReply(exchange,
+                                "Basic realm=\"realm1\"");
+                        try {
+                            t1Cond2.await();
+                        } catch (InterruptedException |
+                                 BrokenBarrierException e)
+                        {
+                            throw new RuntimeException(e);
+                        }
+                        break;
+                    case 1:
+                        AuthenticationHandler.okReply(exchange);
+                        break;
+                    default:
+                        System.out.println ("Unexpected request");
+                }
             }
         }
 
-        void doT1c (HttpTransaction req, int count) throws IOException {
-            switch (count) {
-            case 0:
-                errorReply (req, "Basic realm=\"realm1\"");
-                TestHttpServer.rendezvous ("two", 2);
-                break;
-            case 1:
-                okReply (req);
-                break;
-            default:
-                System.out.println ("Unexpected request");
+        class AuthenticationHandlerT1d implements HttpHandler
+        {
+            volatile int count = -1;
+
+            @Override
+            public void handle(HttpExchange exchange) throws IOException {
+                count++;
+                switch(count) {
+                    case 0:
+                        AuthenticationHandler.errorReply(exchange,
+                                "Basic realm=\"realm2\"");
+                        try {
+                            t1Cond2.await();
+                        } catch (InterruptedException |
+                                 BrokenBarrierException e)
+                        {
+                            throw new RuntimeException(e);
+                        }
+                        t1cond2latch.countDown();
+                        break;
+                    case 1:
+                        AuthenticationHandler.okReply(exchange);
+                        break;
+                    default:
+                        System.out.println ("Unexpected request");
+                }
             }
         }
 
-        void doT1d (HttpTransaction req, int count) throws IOException {
-            switch (count) {
-            case 0:
-                errorReply (req, "Basic realm=\"realm2\"");
-                TestHttpServer.rendezvous ("two", 2);
-                TestHttpServer.setCondition ("cond2");
-                break;
-            case 1:
-                okReply (req);
-                break;
-            default:
-                System.out.println ("Unexpected request");
-            }
-        }
-
-
         /* T2 tests to check that if initial authentication fails, the second will
          * succeed, and the authenticator is called twice
          */
 
-        void doT2a (HttpTransaction req, int count) throws IOException {
-            /* This will be called several times */
-            if (count == 1) {
-                TestHttpServer.setCondition ("T2cond1");
+        class AuthenticationHandlerT2a implements HttpHandler
+        {
+            volatile int count = -1;
+
+            @Override
+            public void handle(HttpExchange exchange) throws IOException {
+                count++;
+                if (count == 1) {
+                    t2condlatch.countDown();
+                }
+                AuthenticationHandler.errorReply(exchange,
+                        "Basic realm=\"realm3\"");
+
             }
-            errorReply (req, "Basic realm=\"realm3\"");
         }
 
-        void doT2b (HttpTransaction req, int count) throws IOException {
-            switch (count) {
-            case 0:
-                errorReply (req, "Basic realm=\"realm3\"");
-                break;
-            case 1:
-                okReply (req);
-                break;
-            default:
-                System.out.println ("Unexpected request");
+         class AuthenticationHandlerT2b implements HttpHandler
+        {
+            volatile int count = -1;
+
+            @Override
+            public void handle(HttpExchange exchange) throws IOException {
+                count++;
+                switch(count) {
+                    case 0:
+                        AuthenticationHandler.errorReply(exchange,
+                                "Basic realm=\"realm3\"");
+                        break;
+                    case 1:
+                        AuthenticationHandler.okReply(exchange);
+                        break;
+                    default:
+                        System.out.println ("Unexpected request");
+                }
             }
         }
 
@@ -229,63 +307,117 @@
          * resource at same time. Authenticator should be called once for server
          * and once for proxy
          */
-        void doT3a (HttpTransaction req, int count) throws IOException {
-            switch (count) {
-            case 0:
-                proxyReply (req, "Basic realm=\"proxy\"");
-                TestHttpServer.setCondition ("T3cond1");
-                break;
-            case 1:
-                errorReply (req, "Basic realm=\"realm4\"");
-                break;
-            case 2:
-                okReply (req);
-                break;
-            default:
-                System.out.println ("Unexpected request");
+
+        class AuthenticationHandlerT3a implements HttpHandler
+        {
+            volatile int count = -1;
+
+            @Override
+            public void handle(HttpExchange exchange) throws IOException {
+                count++;
+                switch(count) {
+                    case 0:
+                        AuthenticationHandler.proxyReply(exchange,
+                                "Basic realm=\"proxy\"");
+                        break;
+                    case 1:
+                        t3cond1.countDown();
+                        AuthenticationHandler.errorReply(exchange,
+                                "Basic realm=\"realm4\"");
+                        break;
+                    case 2:
+                        AuthenticationHandler.okReply(exchange);
+                        break;
+                    default:
+                        System.out.println ("Unexpected request");
+                }
             }
         }
 
-        void doT3bc (HttpTransaction req, int count) throws IOException {
-            switch (count) {
-            case 0:
-                proxyReply (req, "Basic realm=\"proxy\"");
-                break;
-            case 1:
-                okReply (req);
-                break;
-            default:
-                System.out.println ("Unexpected request");
+        class AuthenticationHandlerT3bc implements HttpHandler
+        {
+            volatile int count = -1;
+
+            @Override
+            public void handle(HttpExchange exchange) throws IOException {
+                count++;
+                switch(count) {
+                    case 0:
+                        AuthenticationHandler.proxyReply(exchange,
+                                "Basic realm=\"proxy\"");
+                        break;
+                    case 1:
+                        AuthenticationHandler.okReply(exchange);
+                        break;
+                    default:
+                        System.out.println ("Unexpected request");
+                }
             }
         }
-    };
+    }
+
+    static class AuthenticationHandler {
+        static void errorReply(HttpExchange exchange, String reply)
+                throws IOException
+        {
+            exchange.getResponseHeaders().add("Connection", "close");
+            exchange.getResponseHeaders().add("WWW-Authenticate", reply);
+            exchange.sendResponseHeaders(401, 0);
+            exchange.close();
+        }
 
-    static TestHttpServer server;
+        static void proxyReply (HttpExchange exchange, String reply)
+                throws IOException
+        {
+            exchange.getResponseHeaders().add("Proxy-Authenticate", reply);
+            exchange.sendResponseHeaders(407, 0);
+        }
+
+        static void okReply (HttpExchange exchange) throws IOException {
+            exchange.getResponseHeaders().add("Connection", "close");
+            String response = "Hello .";
+            exchange.sendResponseHeaders(200, response.getBytes().length);
+            OutputStream os = exchange.getResponseBody();
+            os.write(response.getBytes());
+            os.close();
+            exchange.close();
+        }
+    }
+
+    static Server server;
     static MyAuthenticator auth = new MyAuthenticator ();
 
     static int redirects = 4;
 
     static Client c1,c2,c3,c4,c5,c6,c7,c8,c9;
 
-    static void doServerTests (String authority) throws Exception {
+    static CountDownLatch t1cond1latch;
+    static CountDownLatch t1cond2latch;
+    static CountDownLatch t2condlatch;
+    static CountDownLatch t3cond1;
+
+    static void doServerTests (String authority, Server server) throws Exception
+    {
         System.out.println ("Doing Server tests");
         System.out.println ("T1");
         c1 = new Client (authority, "/test/realm1/t1a", false);
         c2 = new Client (authority, "/test/realm2/t1b", false);
         c3 = new Client (authority, "/test/realm1/t1c", false);
         c4 = new Client (authority, "/test/realm2/t1d", false);
-
+        t1cond1latch = new CountDownLatch(1);
+        t1cond2latch = new CountDownLatch(1);
         c1.start(); c2.start();
-        TestHttpServer.waitForCondition ("cond1");
+        t1cond1latch.await();
         c3.start(); c4.start();
         c1.join(); c2.join(); c3.join(); c4.join();
 
         int f = auth.getCount();
         if (f != 2) {
-            except ("Authenticator was called "+f+" times. Should be 2");
+            except ("Authenticator was called "+f+" times. Should be 2",
+                    server);
         }
         if (error) {
-            except ("error occurred");
+            except ("error occurred", server);
         }
 
         auth.resetCount();
@@ -293,73 +425,71 @@
 
         c5 = new Client (authority, "/test/realm3/t2a", true);
         c6 = new Client (authority, "/test/realm3/t2b", false);
+        t2condlatch = new CountDownLatch(1);
         c5.start ();
-        TestHttpServer.waitForCondition ("T2cond1");
+        t2condlatch.await();
         c6.start ();
         c5.join(); c6.join();
 
         f = auth.getCount();
         if (f != redirects+1) {
-            except ("Authenticator was called "+f+" times. Should be: " + redirects+1);
+            except ("Authenticator was called "+f+" times. Should be: "
+                    + redirects+1, server);
         }
         if (error) {
-            except ("error occurred");
+            except ("error occurred", server);
         }
     }
 
-    static void doProxyTests (String authority) throws Exception {
+    static void doProxyTests (String authority, Server server) throws Exception
+    {
         System.out.println ("Doing Proxy tests");
         c7 = new Client (authority, "/test/realm4/t3a", false);
         c8 = new Client (authority, "/test/realm4/t3b", false);
         c9 = new Client (authority, "/test/realm4/t3c", false);
+        t3cond1 = new CountDownLatch(1);
         c7.start ();
-        TestHttpServer.waitForCondition ("T3cond1");
+        t3cond1.await();
         c8.start ();
         c9.start ();
         c7.join(); c8.join(); c9.join();
 
         int f = auth.getCount();
         if (f != 2) {
-            except ("Authenticator was called "+f+" times. Should be: " + 2);
+            except ("Authenticator was called "+f+" times. Should be: " + 2,
+                    server);
         }
         if (error) {
-            except ("error occurred");
+            except ("error occurred", server);
         }
     }
 
     public static void main (String[] args) throws Exception {
+        new B4769350().runTest(args[0].equals ("proxy"));
+    }
+
+    public void runTest(boolean proxy) throws Exception {
         System.setProperty ("http.maxRedirects", Integer.toString (redirects));
         System.setProperty ("http.auth.serializeRequests", "true");
         Authenticator.setDefault (auth);
-        boolean proxy = args[0].equals ("proxy");
-        try {
-            server = new TestHttpServer (new CallBack(), 10, 1, 0);
-            System.out.println ("Server: listening on port: " + server.getLocalPort());
+        try (Server server = new Server()) {
+            server.startServer();
+            System.out.println ("Server: listening on port: "
+                    + server.getPort());
             if (proxy) {
                 System.setProperty ("http.proxyHost", "localhost");
-                System.setProperty ("http.proxyPort",Integer.toString(server.getLocalPort()));
-                doProxyTests ("www.foo.com");
+                System.setProperty ("http.proxyPort",
+                        Integer.toString(server.getPort()));
+                doProxyTests ("www.foo.com", server);
             } else {
-                doServerTests ("localhost:"+server.getLocalPort());
+                doServerTests ("localhost:"+server.getPort(), server);
             }
-            server.terminate();
+        }
 
-        } catch (Exception e) {
-            if (server != null) {
-                server.terminate();
-            }
-            throw e;
-        }
     }
 
-    static void pause (int millis) {
-        try {
-            Thread.sleep (millis);
-        } catch (InterruptedException e) {}
-    }
-
-    public static void except (String s) {
-        server.terminate();
+    public static void except (String s, Server server) {
+        server.close();
         throw new RuntimeException (s);
     }
 
@@ -368,13 +498,10 @@
             super ();
         }
 
-        int count = 0;
+        volatile int count = 0;
 
+        @Override
         public PasswordAuthentication getPasswordAuthentication () {
-            //System.out.println ("Authenticator called: " + getRequestingPrompt());
-            //try {
-                //Thread.sleep (1000);
-            //} catch (InterruptedException e) {}
             PasswordAuthentication pw;
             pw = new PasswordAuthentication ("user", "pass1".toCharArray());
             count ++;
@@ -386,7 +513,8 @@
         }
 
         public int getCount () {
-            return (count);
+            return count;
         }
     }
 }
+
--- a/test/java/net/CookieHandler/TestHttpCookie.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/net/CookieHandler/TestHttpCookie.java	Wed Oct 30 18:38:20 2013 +0000
@@ -24,7 +24,7 @@
 /**
  * @test
  * @summary Unit test for java.net.HttpCookie
- * @bug 6244040 6277796 6277801 6277808 6294071 6692802 6790677 6901170
+ * @bug 6244040 6277796 6277801 6277808 6294071 6692802 6790677 6901170 8020758
  * @author Edward Wang
  */
 
@@ -381,6 +381,9 @@
         // CR 6692802: HttpOnly flag
         test("set-cookie: CUSTOMER=WILE_E_COYOTE;HttpOnly").httpOnly(true);
         test("set-cookie: CUSTOMER=WILE_E_COYOTE").httpOnly(false);
+
+        // space disallowed in name (both Netscape and RFC2965)
+        test("set-cookie: CUST OMER=WILE_E_COYOTE").nil();
     }
 
     static void header(String prompt) {
--- a/test/java/net/Inet6Address/serialize/Serialize.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/net/Inet6Address/serialize/Serialize.java	Wed Oct 30 18:38:20 2013 +0000
@@ -94,7 +94,26 @@
          } finally {
              ois.close();
          }
-         System.out.println(nobj);
+
+         nobj = (Inet6Address)InetAddress.getByAddress("foo.com", new byte[] {
+             (byte)0xfe,(byte)0x80,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,
+             (byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)1
+         });
+         if (!test1(nobj, addr1)) {
+             throw new RuntimeException("failed with " + nobj.toString());
+         }
+         nobj = (Inet6Address)InetAddress.getByAddress("x.bar.com", new byte[] {
+             (byte)0xfe,(byte)0xC0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,
+             (byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)1
+         });
+         if (!test1(nobj, addr2)) {
+             throw new RuntimeException("failed with " + nobj.toString());
+         }
+         nobj = (Inet6Address)InetAddress.getByName("::1");
+         if (!test1(nobj, addr3)) {
+             throw new RuntimeException("failed with " + nobj.toString());
+         }
+
          System.out.println("All tests passed");
      }
 
@@ -113,4 +132,162 @@
              return false;
          }
      }
- }
+
+    static boolean test1 (Inet6Address obj, byte[] buf) throws Exception {
+         ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(buf));
+         Inet6Address nobj = (Inet6Address) ois.readObject();
+         ois.close();
+
+         if (nobj.equals(obj)) {
+             return true;
+         } else {
+             return false;
+         }
+    }
+
+    // Inet6Address instances serialized with JDK 6
+
+    static byte[] addr1 = {
+        (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72,
+        (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61,
+        (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49,
+        (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64,
+        (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f,
+        (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80,
+        (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00,
+        (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,
+        (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c,
+        (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f,
+        (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74,
+        (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f,
+        (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e,
+        (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65,
+        (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66,
+        (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00,
+        (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61,
+        (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f,
+        (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67,
+        (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70,
+        (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,
+        (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42,
+        (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61,
+        (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,
+        (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41,
+        (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,
+        (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3,
+        (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49,
+        (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,
+        (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06,
+        (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79,
+        (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73,
+        (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71,
+        (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x02,(byte)0x74,(byte)0x00,(byte)0x07,(byte)0x66,
+        (byte)0x6f,(byte)0x6f,(byte)0x2e,(byte)0x63,(byte)0x6f,(byte)0x6d,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x70,(byte)0x75,(byte)0x72,(byte)0x00,(byte)0x02,(byte)0x5b,
+        (byte)0x42,(byte)0xac,(byte)0xf3,(byte)0x17,(byte)0xf8,(byte)0x06,
+        (byte)0x08,(byte)0x54,(byte)0xe0,(byte)0x02,(byte)0x00,(byte)0x00,
+        (byte)0x78,(byte)0x70,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x10,
+        (byte)0xfe,(byte)0x80,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x78
+    };
+
+    static byte[] addr2 = {
+        (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72,
+        (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61,
+        (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49,
+        (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64,
+        (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f,
+        (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80,
+        (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00,
+        (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,
+        (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c,
+        (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f,
+        (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74,
+        (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f,
+        (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e,
+        (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65,
+        (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66,
+        (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00,
+        (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61,
+        (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f,
+        (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67,
+        (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70,
+        (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,
+        (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42,
+        (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61,
+        (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,
+        (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41,
+        (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,
+        (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3,
+        (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49,
+        (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,
+        (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06,
+        (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79,
+        (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73,
+        (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71,
+        (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x02,(byte)0x74,(byte)0x00,(byte)0x09,(byte)0x78,
+        (byte)0x2e,(byte)0x62,(byte)0x61,(byte)0x72,(byte)0x2e,(byte)0x63,
+        (byte)0x6f,(byte)0x6d,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x70,(byte)0x75,(byte)0x72,(byte)0x00,
+        (byte)0x02,(byte)0x5b,(byte)0x42,(byte)0xac,(byte)0xf3,(byte)0x17,
+        (byte)0xf8,(byte)0x06,(byte)0x08,(byte)0x54,(byte)0xe0,(byte)0x02,
+        (byte)0x00,(byte)0x00,(byte)0x78,(byte)0x70,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x10,(byte)0xfe,(byte)0xc0,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,
+        (byte)0x78
+    };
+
+    static byte[] addr3 = {
+        (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72,
+        (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61,
+        (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49,
+        (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64,
+        (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f,
+        (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80,
+        (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00,
+        (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,
+        (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c,
+        (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f,
+        (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74,
+        (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f,
+        (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e,
+        (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65,
+        (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66,
+        (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00,
+        (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61,
+        (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f,
+        (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67,
+        (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70,
+        (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,
+        (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42,
+        (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61,
+        (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,
+        (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41,
+        (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,
+        (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3,
+        (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49,
+        (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,
+        (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06,
+        (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79,
+        (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73,
+        (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71,
+        (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x02,(byte)0x70,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x70,(byte)0x75,(byte)0x72,
+        (byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42,(byte)0xac,(byte)0xf3,
+        (byte)0x17,(byte)0xf8,(byte)0x06,(byte)0x08,(byte)0x54,(byte)0xe0,
+        (byte)0x02,(byte)0x00,(byte)0x00,(byte)0x78,(byte)0x70,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x10,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
+        (byte)0x01,(byte)0x78
+    };
+}
--- a/test/java/net/InetAddress/GetLocalHostWithSM.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/net/InetAddress/GetLocalHostWithSM.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -23,9 +23,11 @@
 
 /**
  * @test
- * @bug 4531817
+ * @bug 4531817 8026245
  * @summary Inet[46]Address.localHost need doPrivileged
  * @run main/othervm GetLocalHostWithSM
+ * @run main/othervm -Djava.net.preferIPv4Stack=true GetLocalHostWithSM
+ * @run main/othervm -Djava.net.preferIPv6Addresses=true GetLocalHostWithSM
  * files needed: GetLocalHostWithSM.java, MyPrincipal.java, and policy.file
  */
 
--- a/test/java/net/NetworkInterface/MemLeakTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
- * 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 8022584
- * @summary Some NetworkInterface methods can leak native memory
- * @run main/othervm/timeout=700 MemLeakTest
- */
-
-/* Note: the test can cause a memory leak that's why othervm option is required
- */
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.util.Collection;
-import java.util.Collections;
-
-public class MemLeakTest {
-
-    /**
-     * Memory leak is assumed, if application consumes more than specified amount of memory during its execution.
-     * The number is given in Kb.
-     */
-    private static final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
-
-    public static void main(String[] args)
-            throws Exception {
-
-        if (!System.getProperty("os.name").equals("Linux")) {
-            System.out.println("Test only runs on Linux");
-            return;
-        }
-
-        // warm up
-        accessNetInterfaces(3);
-
-        long vMemBefore = getVMemSize();
-        accessNetInterfaces(500_000);
-        long vMemAfter = getVMemSize();
-
-        long vMemDelta = vMemAfter - vMemBefore;
-        if (vMemDelta > MEM_LEAK_THRESHOLD) {
-            throw new Exception("FAIL: Virtual memory usage increased by " + vMemDelta + "Kb " +
-                    "(greater than " + MEM_LEAK_THRESHOLD + "Kb)");
-        }
-
-        System.out.println("PASS: Virtual memory usage increased by " + vMemDelta + "Kb " +
-                "(not greater than " + MEM_LEAK_THRESHOLD + "Kb)");
-    }
-
-    private static void accessNetInterfaces(int times) {
-        try {
-            Collection<NetworkInterface> interfaces =
-                    Collections.list(NetworkInterface.getNetworkInterfaces());
-            for (int i = 0; i != times; ++i) {
-                for (NetworkInterface netInterface : interfaces) {
-                    netInterface.getMTU();
-                    netInterface.isLoopback();
-                    netInterface.isUp();
-                    netInterface.isPointToPoint();
-                    netInterface.supportsMulticast();
-                }
-            }
-        } catch (SocketException ignore) {}
-    }
-
-    /**
-     * Returns size of virtual memory allocated to the process in Kb.
-     * Linux specific. On other platforms and in case of any errors returns 0.
-     */
-    private static long getVMemSize() {
-
-        // Refer to the Linux proc(5) man page for details about /proc/self/stat file
-        //
-        // In short, this file contains status information about the current process
-        // written in one line. The fields are separated with spaces.
-        // The 23rd field is defined as 'vsize %lu   Virtual memory size in bytes'
-
-        try (FileReader fileReader = new FileReader("/proc/self/stat");
-             BufferedReader bufferedReader = new BufferedReader(fileReader)) {
-            String line = bufferedReader.readLine();
-            return Long.parseLong(line.split(" ")[22]) / 1024;
-        } catch (Exception ignore) {}
-        return 0;
-    }
-}
--- a/test/java/net/ProxySelector/SystemProxies.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/net/ProxySelector/SystemProxies.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,29 +33,39 @@
 
 public class SystemProxies {
 
-    static final String uriAuthority = "myMachine/";
+    static final String[] uriAuthority = { "myMachine/", "local", "localhost",
+                                           "127.0.0.1", "127.0.0.123",
+                                           "127.0.2.2", "127.3.3.3",
+                                           "128.0.0.1" };
     static final ProxySelector proxySel = ProxySelector.getDefault();
 
     public static void main(String[] args) {
         if (! "true".equals(System.getProperty("java.net.useSystemProxies"))) {
-            System.out.println("Usage: java -Djava.net.useSystemProxies SystemProxies");
+            System.out.println("Usage: java -Djava.net.useSystemProxies=true SystemProxies");
             return;
         }
 
         printProxies("http://");
         printProxies("https://");
         printProxies("ftp://");
+        printProxies("none://");
+        printProxies("gopher://");
+        printProxies("rtsp://");
+        printProxies("socket://");
     }
 
     static void printProxies(String proto) {
-        String uriStr =  proto + uriAuthority;
-        try {
-            List<Proxy> proxies = proxySel.select(new URI(uriStr));
-            System.out.println("Proxies returned for " + uriStr);
-            for (Proxy proxy : proxies)
-                System.out.println("\t" + proxy);
-        } catch (URISyntaxException e) {
-            System.err.println(e);
+        System.out.println("Protocol:" + proto);
+        for (String uri : uriAuthority) {
+            String uriStr =  proto + uri;
+            try {
+                List<Proxy> proxies = proxySel.select(new URI(uriStr));
+                System.out.println("\tProxies returned for " + uriStr);
+                for (Proxy proxy : proxies)
+                    System.out.println("\t\t" + proxy);
+            } catch (URISyntaxException e) {
+                System.err.println(e);
+            }
         }
     }
 }
--- a/test/java/net/Socket/GetLocalAddress.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/net/Socket/GetLocalAddress.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 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
@@ -23,7 +23,10 @@
 
 /*
  * @test
- * @bug 4106601
+ * @bug 4106601 8026245
+ * @run main/othervm GetLocalAddress
+ * @run main/othervm -Djava.net.preferIPv4Stack=true GetLocalAddress
+ * @run main/othervm -Djava.net.preferIPv6Addresses=true GetLocalAddress
  * @summary Test the java.net.socket.GetLocalAddress method
  *
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLClassLoader/NullURLTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,175 @@
+/*
+ * 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 7179567
+ * @summary Test that URLClassLoader public constructors and factory methods
+ * throw NullPointerException when appropriate.
+ *
+ * Tests whether URLClassLoader public constructors and factory methods throw
+ * appropriate NullPointerExceptions for 1) a null URL array parameter, and
+ * 2) a non-null URL array containing a null element.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.jar.JarFile;
+
+public class NullURLTest {
+    JarFile jarFile;
+
+    public static void main(String[] args) throws Throwable {
+        new NullURLTest();
+    }
+
+    NullURLTest() throws Throwable {
+        File local = new File(System.getProperty("test.src", "."), "jars");
+        String path = "jar:file:"
+                + local.getPath()
+                + "/class_path_test.jar!/Foo.class";
+
+        URL validURL = new URL(path);
+        URL[] validURLArray = new URL[] { validURL, validURL };
+        URL[] invalidURLArray = new URL[] { validURL, null };
+
+        int failures = 0;
+        URLClassLoader loader;
+
+        try {
+            loader = new URLClassLoader(validURLArray);
+        } catch (Throwable t) {
+            System.err.println("URLClassLoader(validURLArray) threw " + t);
+            failures++;
+        }
+        try {
+            loader = new URLClassLoader(null);
+            System.err.println("URLClassLoader(null) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
+        // This section should be uncommented if 8026517 is fixed.
+//        try {
+//            loader = new URLClassLoader(invalidURLArray);
+//            System.err.println("URLClassLoader(invalidURLArray) did not throw NPE");
+//            failures++;
+//        } catch (NullPointerException e) {
+//            // expected
+//        }
+
+        try {
+            loader = new URLClassLoader(validURLArray, null);
+        } catch (Throwable t) {
+            System.err.println("URLClassLoader(validURLArray, null) threw " + t);
+            failures++;
+        }
+        try {
+            loader = new URLClassLoader(null, null);
+            System.err.println("URLClassLoader(null, null) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
+        // This section should be uncommented if 8026517 is fixed.
+//        try {
+//            loader = new URLClassLoader(invalidURLArray, null);
+//            System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
+//            failures++;
+//        } catch (NullPointerException e) {
+//            // expected
+//        }
+
+        try {
+            loader = new URLClassLoader(validURLArray, null, null);
+        } catch (Throwable t) {
+            System.err.println("URLClassLoader(validURLArray, null, null) threw " + t);
+            failures++;
+        }
+        try {
+            loader = new URLClassLoader(null, null, null);
+            System.err.println("URLClassLoader(null, null, null) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
+        // This section should be uncommented if 8026517 is fixed.
+//        try {
+//            loader = new URLClassLoader(invalidURLArray, null, null);
+//            System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
+//            failures++;
+//        } catch (NullPointerException e) {
+//            // expected
+//        }
+
+        try {
+            loader = URLClassLoader.newInstance(validURLArray);
+        } catch (Throwable t) {
+            System.err.println("URLClassLoader.newInstance(validURLArray) threw " + t);
+            failures++;
+        }
+        try {
+            loader = URLClassLoader.newInstance(null);
+            System.err.println("URLClassLoader.newInstance(null) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
+        // This section should be uncommented if 8026517 is fixed.
+//        try {
+//            loader = URLClassLoader.newInstance(invalidURLArray);
+//            System.err.println("URLClassLoader.newInstance(invalidURLArray) did not throw NPE");
+//            failures++;
+//        } catch (NullPointerException e) {
+//            // expected
+//        }
+
+        try {
+            loader = URLClassLoader.newInstance(validURLArray, null);
+        } catch (Throwable t) {
+            System.err.println("URLClassLoader.newInstance(validURLArray, null) threw " + t);
+            failures++;
+        }
+        try {
+            loader = URLClassLoader.newInstance(null, null);
+            System.err.println("URLClassLoader.newInstance(null, null) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
+        // This section should be uncommented if 8026517 is fixed.
+//        try {
+//            loader = URLClassLoader.newInstance(invalidURLArray, null);
+//            System.err.println("URLClassLoader.newInstance(invalidURLArray, null) did not throw NPE");
+//            failures++;
+//        } catch (NullPointerException e) {
+//            // expected
+//        }
+
+        if (failures != 0) {
+            throw new Exception("URLClassLoader NullURLTest had "+failures+" failures!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/nstest/LookupTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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
+ * @compile -XDignore.symbol.file=true SimpleNameService.java
+ *                                     SimpleNameServiceDescriptor.java
+ * @run main/othervm/timeout=200 -Dsun.net.spi.nameservice.provider.1=simple,sun LookupTest
+ */
+
+/**
+ * This is a simple smoke test of the HttpURLPermission mechanism, which
+ * checks for either IOException (due to unknown host) or SecurityException
+ * due to lack of permission to connect
+ */
+
+import java.net.*;
+import java.io.*;
+
+public class LookupTest {
+
+    static void test(
+        String url, boolean throwsSecException, boolean throwsIOException)
+    {
+        try {
+            URL u = new URL(url);
+            System.err.println ("Connecting to " + u);
+            URLConnection urlc = u.openConnection();
+            InputStream is = urlc.getInputStream();
+        } catch (SecurityException e) {
+            if (!throwsSecException) {
+                throw new RuntimeException ("(1) was not expecting " + e);
+            }
+            return;
+        } catch (IOException ioe) {
+            if (!throwsIOException) {
+                throw new RuntimeException ("(2) was not expecting " + ioe);
+            }
+            return;
+        }
+        if (throwsSecException || throwsIOException) {
+            System.err.printf ("was expecting a %s\n", throwsSecException ?
+                "security exception" : "IOException");
+            throw new RuntimeException("was expecting an exception");
+        }
+    }
+
+    public static void main(String args[]) throws Exception {
+        SimpleNameService.put("allowedAndFound.com", "127.0.0.1");
+        SimpleNameService.put("notAllowedButFound.com", "99.99.99.99");
+        // name "notAllowedAndNotFound.com" is not in map
+        // name "allowedButNotfound.com" is not in map
+        startServer();
+
+        String policyFileName = "file://" + System.getProperty("test.src", ".") + "/policy";
+        System.err.println ("policy = " + policyFileName);
+
+        System.setProperty("java.security.policy", policyFileName);
+
+        System.setSecurityManager(new SecurityManager());
+
+        test("http://allowedAndFound.com:50100/foo", false, false);
+
+        test("http://notAllowedButFound.com:50100/foo", true, false);
+
+        test("http://allowedButNotfound.com:50100/foo", false, true);
+
+        test("http://notAllowedAndNotFound.com:50100/foo", true, false);
+    }
+
+    static Thread server;
+    static ServerSocket serverSocket;
+
+    static class Server extends Thread {
+        public void run() {
+            byte[] buf = new byte[1000];
+            try {
+                while (true) {
+                    Socket s = serverSocket.accept();
+                    InputStream i = s.getInputStream();
+                    i.read(buf);
+                    OutputStream o = s.getOutputStream();
+                    String rsp = "HTTP/1.1 200 Ok\r\n" +
+                        "Connection: close\r\nContent-length: 0\r\n\r\n";
+                    o.write(rsp.getBytes());
+                    o.close();
+                }
+            } catch (IOException e) {
+                return;
+            }
+            }
+    }
+
+    static void startServer() {
+        try {
+            serverSocket = new ServerSocket(50100);
+            server = new Server();
+            server.start();
+        } catch (Exception e) {
+            throw new RuntimeException ("Test failed to initialize");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/nstest/META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,22 @@
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute 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.
+
+SimpleNameServiceDescriptor    # name service provider descriptor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/nstest/SimpleNameService.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.
+ */
+
+/*
+ * A simple name service based on an in-memory HashMap.
+ */
+import java.net.UnknownHostException;
+import java.net.InetAddress;
+import sun.net.spi.nameservice.*;
+import java.util.*;
+
+public final class SimpleNameService implements NameService {
+
+    private static LinkedHashMap hosts = new LinkedHashMap();
+
+    private static String addrToString(byte addr[]) {
+        return Byte.toString(addr[0]) + "." +
+               Byte.toString(addr[1]) + "." +
+               Byte.toString(addr[2]) + "." +
+               Byte.toString(addr[3]);
+    }
+
+    // ------------
+
+    public static void put(String host, String addr) {
+        hosts.put(host, addr);
+    }
+
+    public static void put(String host, byte addr[]) {
+        hosts.put(host, addrToString(addr));
+    }
+
+    public static void remove(String host) {
+        hosts.remove(host);
+    }
+
+    public static int entries () {
+        return hosts.size();
+    }
+
+    public static int lookupCalls() {
+        return lookupCalls;
+    }
+
+    static int lookupCalls = 0;
+
+    // ------------
+
+    public SimpleNameService() throws Exception {
+    }
+
+    public InetAddress[] lookupAllHostAddr(String host) throws UnknownHostException {
+
+        lookupCalls ++;
+
+        String value = (String)hosts.get(host);
+        if (value == null) {
+            throw new UnknownHostException(host);
+        }
+        StringTokenizer st = new StringTokenizer(value, ".");
+        byte addr[] = new byte[4];
+        for (int i=0; i<4; i++) {
+            addr[i] = (byte)Integer.parseInt(st.nextToken());
+        }
+        InetAddress[] res = new InetAddress[1];
+        res[0] = InetAddress.getByAddress(host, addr);
+        return res;
+    }
+
+    public String getHostByAddr(byte[] addr) throws UnknownHostException {
+        String addrString = addrToString(addr);
+        Iterator i = hosts.keySet().iterator();
+        while (i.hasNext()) {
+            String host = (String)i.next();
+            String value = (String)hosts.get(host);
+            if (value.equals(addrString)) {
+                return host;
+            }
+        }
+        throw new UnknownHostException();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/nstest/SimpleNameServiceDescriptor.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.
+ */
+
+/*
+ * Descriptor for the simple name service
+ */
+import sun.net.spi.nameservice.*;
+
+public final class SimpleNameServiceDescriptor implements NameServiceDescriptor {
+    /**
+     * Create a new instance of the corresponding name service.
+     */
+    public NameService createNameService() throws Exception {
+        return new SimpleNameService();
+    }
+
+    /**
+     * Returns this service provider's name
+     *
+     */
+    public String getProviderName() {
+        return "sun";
+    }
+
+    /**
+     * Returns this name service type
+     * "dns" "nis" etc
+     */
+    public String getType() {
+        return "simple";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/nstest/policy	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+//
+
+grant {
+    permission java.net.URLPermission "http://allowedAndFound.com:50100/-", "*:*";
+    permission java.net.URLPermission "http://allowedButNotfound.com:50100/-", "*:*";
+
+    // needed for HttpServer
+    permission "java.net.SocketPermission" "localhost:1024-", "resolve,accept";
+};
+
+// Normal permissions that aren't granted when run under jtreg
+
+grant codeBase "file:${{java.ext.dirs}}/*" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:${{java.home}}/jre/lib/rt.jar" {
+        permission java.security.AllPermission;
+};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/nio/channels/FileChannel/InterruptMapDeadlock.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,155 @@
+/*
+ * 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 8024833
+ * @summary Tests interruption of threads mapping sections of a file channel in
+ *   an attempt to deadlock due to nesting of begin calls.
+ */
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.*;
+import java.nio.channels.FileChannel.MapMode;
+import java.nio.file.*;
+import java.util.concurrent.Semaphore;
+import static java.nio.file.StandardOpenOption.*;
+
+public class InterruptMapDeadlock {
+
+    static class Mapper extends Thread {
+        final FileChannel fc;
+        final Semaphore gate;
+        volatile Exception exception;
+
+        Mapper(FileChannel fc, Semaphore gate) {
+            this.fc = fc;
+            this.gate = gate;
+        }
+
+        @Override
+        public void run() {
+            try {
+                gate.acquireUninterruptibly();
+                fc.map(MapMode.READ_ONLY, 0, 1);
+                throw new Exception("Map succeeded");
+            } catch (IOException x) {
+                System.out.println(x.getClass() + " (expected)");
+            } catch (Exception unexpected) {
+                this.exception = unexpected;
+            }
+        }
+
+        Exception exception() {
+            return exception;
+        }
+
+        static Mapper startMapper(FileChannel fc, Semaphore gate) {
+            Mapper r = new Mapper(fc, gate);
+            r.setDaemon(true);
+            r.start();
+            return r;
+        }
+    }
+
+    static class Interruptor extends Thread {
+
+        final Mapper[] mappers;
+        final Semaphore gate;
+
+        Interruptor(Mapper[] mappers, Semaphore gate) {
+            this.mappers = mappers;
+            this.gate = gate;
+        }
+
+        public void run() {
+            gate.release(mappers.length);
+            for (Mapper m : mappers) {
+                m.interrupt();
+            }
+        }
+    }
+    // the number of mapper threads to start
+    private static final int MAPPER_COUNT = 4;
+
+    public static void main(String[] args) throws Exception {
+        Path file = Paths.get("data.txt");
+        FileChannel.open(file, CREATE, TRUNCATE_EXISTING, WRITE).close();
+
+        Mapper[] mappers = new Mapper[MAPPER_COUNT];
+
+        for (int i=1; i<=20; i++) {
+            System.out.format("Iteration: %s%n", i);
+
+            FileChannel fc = FileChannel.open(file);
+            boolean failed = false;
+
+            Semaphore gate = new Semaphore(0);
+            // start mapper threads
+            for (int j=0; j<MAPPER_COUNT; j++) {
+                mappers[j] = Mapper.startMapper(fc, gate);
+            }
+
+            // interrupt and wait for the mappers to terminate
+            Interruptor interruptor = new Interruptor(mappers, gate);
+            interruptor.start();
+            try {
+                interruptor.join(10000);
+                if (interruptor.isAlive()) {
+                    System.err.println("Interruptor thread did not terminate:");
+                    Throwable t = new Exception("Stack trace");
+                    t.setStackTrace(interruptor.getStackTrace());
+                    t.printStackTrace();
+                    failed = true;
+                }
+            } catch (InterruptedException x) {
+                System.err.println("Main thread was interrupted");
+                failed = true;
+            }
+
+            for (Mapper m: mappers) {
+                try {
+                    m.join(10000);
+                    Exception e = m.exception();
+                    if (e != null) {
+                        System.err.println("Mapper thread failed with: " + e);
+                        failed = true;
+                    } else if (m.isAlive()) {
+                        System.err.println("Mapper thread did not terminate:");
+                        Throwable t = new Exception("Stack trace");
+                        t.setStackTrace(m.getStackTrace());
+                        t.printStackTrace();
+                        failed = true;
+                    }
+                } catch (InterruptedException x) {
+                    System.err.println("Main thread was interrupted");
+                    failed = true;
+                }
+            }
+
+            if (failed)
+                throw new RuntimeException("Test failed - see log for details");
+            else
+                fc.close();
+        }
+    }
+}
--- a/test/java/nio/channels/SocketChannel/ShortWrite.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/nio/channels/SocketChannel/ShortWrite.java	Wed Oct 30 18:38:20 2013 +0000
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 7176630
+ * @bug 7176630 7074436
  * @summary Check for short writes on SocketChannels configured in blocking mode
  */
 
@@ -38,11 +38,12 @@
     static final Random rand = new Random();
 
     /**
-     * Returns a checksum on the remaining bytes in the given buffer.
+     * Returns a checksum on the remaining bytes in the given buffers.
      */
-    static long computeChecksum(ByteBuffer bb) {
+    static long computeChecksum(ByteBuffer... bufs) {
         CRC32 crc32 = new CRC32();
-        crc32.update(bb);
+        for (int i=0; i<bufs.length; i++)
+            crc32.update(bufs[i]);
         return crc32.getValue();
     }
 
@@ -71,15 +72,15 @@
     }
 
     /**
-     * Run test with a write of the given number of bytes.
+     * Exercise write(ByteBuffer) with given number of bytes.
      */
-    static void test(ExecutorService pool,
-                     SocketChannel source,
-                     SocketChannel sink,
-                     int size)
+    static void test1(ExecutorService pool,
+                      SocketChannel source,
+                      SocketChannel sink,
+                      int size)
         throws Exception
     {
-        System.out.println(size);
+        System.out.println("write(ByteBuffer), size=" + size);
 
         // random bytes in the buffer
         ByteBuffer buf = ByteBuffer.allocate(size);
@@ -101,6 +102,47 @@
             throw new RuntimeException("Checksum did not match");
     }
 
+    /**
+     * Exercise write(ByteBuffer[]) with buffers of the given sizes.
+     */
+    static void testN(ExecutorService pool,
+                      SocketChannel source,
+                      SocketChannel sink,
+                      int... sizes)
+        throws Exception
+    {
+        System.out.print("write(ByteBuffer[]), sizes=");
+        for (int size: sizes)
+            System.out.print(size + " ");
+        System.out.println();
+
+        int total = 0;
+        int len = sizes.length;
+        ByteBuffer[] bufs = new ByteBuffer[len];
+        for (int i=0; i<len; i++) {
+            int size = sizes[i];
+            ByteBuffer buf = ByteBuffer.allocate(size);
+            rand.nextBytes(buf.array());
+            bufs[i] = buf;
+            total += size;
+        }
+
+        // submit task to read the bytes
+        Future<Long> result = pool.submit(new Reader(sink, total));
+
+        // write the bytes
+        long n = source.write(bufs);
+        if (n != total)
+            throw new RuntimeException("Short write detected");
+
+        // check the bytes that were received match
+        for (int i=0; i<len; i++)
+            bufs[i].rewind();
+        long expected = computeChecksum(bufs);
+        long actual = result.get();
+        if (actual != expected)
+            throw new RuntimeException("Checksum did not match");
+    }
 
     public static void main(String[] args) throws Exception {
         ExecutorService pool = Executors.newSingleThreadExecutor();
@@ -114,17 +156,47 @@
                 try (SocketChannel source = SocketChannel.open(sa);
                      SocketChannel sink = ssc.accept())
                 {
-                    // run tests on sizes around 128k as that is the problem
-                    // area on Windows.
+                    // Exercise write(BufferBuffer) on sizes around 128k
                     int BOUNDARY = 128 * 1024;
                     for (int size=(BOUNDARY-2); size<=(BOUNDARY+2); size++) {
-                        test(pool, source, sink, size);
+                        test1(pool, source, sink, size);
+                    }
+
+                    // Exercise write(BufferBuffer) on random sizes
+                    for (int i=0; i<20; i++) {
+                        int size = rand.nextInt(1024*1024);
+                        test1(pool, source, sink, size);
                     }
 
-                    // run tests on random sizes
+                    // Exercise write(BufferBuffer[]) on sizes around 128k
+                    for (int i=BOUNDARY-2; i<=BOUNDARY+2; i++) {
+                        testN(pool, source, sink, i);
+                        testN(pool, source, sink, 0, i);
+                        testN(pool, source, sink, i, 0);
+                        for (int j=BOUNDARY-2; j<=BOUNDARY+2; j++) {
+                            testN(pool, source, sink, i, j);
+                            testN(pool, source, sink, 0, i, j);
+                            testN(pool, source, sink, i, 0, j);
+                            testN(pool, source, sink, i, j, 0);
+                            for (int k=BOUNDARY-2; k<=BOUNDARY+2; k++) {
+                                testN(pool, source, sink, i, j, k);
+                                testN(pool, source, sink, 0, i, j, k);
+                                testN(pool, source, sink, i, 0, j, k);
+                                testN(pool, source, sink, i, j, 0, k);
+                                testN(pool, source, sink, i, j, k, 0);
+                            }
+                        }
+                    }
+
+                    // Exercise write(BufferBuffer[]) on random sizes
+                    // (assumes IOV_MAX >= 8)
                     for (int i=0; i<20; i++) {
-                        int size = rand.nextInt(1024*1024);
-                        test(pool, source, sink, size);
+                        int n = rand.nextInt(9);
+                        int[] sizes = new int[n];
+                        for (int j=0; j<n; j++) {
+                            sizes[j] = rand.nextInt(1024*1024);
+                        }
+                        testN(pool, source, sink, sizes);
                     }
                 }
             }
--- a/test/java/nio/file/Files/StreamTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/nio/file/Files/StreamTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,6 +23,7 @@
 
 /* @test
  * @bug 8006884 8019526
+ * @library ..
  * @build PassThroughFileSystem FaultyFileSystem
  * @run testng StreamTest
  * @summary Unit test for java.nio.file.Files methods that return a Stream
--- a/test/java/security/cert/PKIXRevocationChecker/UnitTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/security/cert/PKIXRevocationChecker/UnitTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 6854712 7171570 8010748
+ * @bug 6854712 7171570 8010748 8025287
  * @summary Basic unit test for PKIXRevocationChecker
  */
 
@@ -44,6 +44,8 @@
         CertPathChecker cpc = cpv.getRevocationChecker();
         PKIXRevocationChecker prc = (PKIXRevocationChecker)cpc;
 
+        prc.init(false);
+
         System.out.println("Testing that get methods return null or " +
                            "empty lists/sets/maps");
         requireNull(prc.getOcspResponder(), "getOcspResponder()");
--- a/test/java/time/tck/java/time/TCKDayOfWeek.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKDayOfWeek.java	Wed Oct 30 18:38:20 2013 +0000
@@ -77,6 +77,7 @@
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -215,13 +216,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {DayOfWeek.FRIDAY, TemporalQueries.chronology(), null},
+                {DayOfWeek.FRIDAY, TemporalQueries.zoneId(), null},
+                {DayOfWeek.FRIDAY, TemporalQueries.precision(), ChronoUnit.DAYS},
+                {DayOfWeek.FRIDAY, TemporalQueries.zone(), null},
+                {DayOfWeek.FRIDAY, TemporalQueries.offset(), null},
+                {DayOfWeek.FRIDAY, TemporalQueries.localDate(), null},
+                {DayOfWeek.FRIDAY, TemporalQueries.localTime(), null},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKInstant.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKInstant.java	Wed Oct 30 18:38:20 2013 +0000
@@ -97,6 +97,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -401,13 +402,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {TEST_12345_123456789, TemporalQueries.chronology(), null},
+                {TEST_12345_123456789, TemporalQueries.zoneId(), null},
+                {TEST_12345_123456789, TemporalQueries.precision(), NANOS},
+                {TEST_12345_123456789, TemporalQueries.zone(), null},
+                {TEST_12345_123456789, TemporalQueries.offset(), null},
+                {TEST_12345_123456789, TemporalQueries.localDate(), null},
+                {TEST_12345_123456789, TemporalQueries.localTime(), null},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKLocalDate.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKLocalDate.java	Wed Oct 30 18:38:20 2013 +0000
@@ -113,6 +113,7 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -693,13 +694,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {TEST_2007_07_15, TemporalQueries.chronology(), IsoChronology.INSTANCE},
+                {TEST_2007_07_15, TemporalQueries.zoneId(), null},
+                {TEST_2007_07_15, TemporalQueries.precision(), ChronoUnit.DAYS},
+                {TEST_2007_07_15, TemporalQueries.zone(), null},
+                {TEST_2007_07_15, TemporalQueries.offset(), null},
+                {TEST_2007_07_15, TemporalQueries.localDate(), TEST_2007_07_15},
+                {TEST_2007_07_15, TemporalQueries.localTime(), null},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKLocalDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKLocalDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -134,6 +134,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.util.ArrayList;
@@ -1017,13 +1018,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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)},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.chronology(), IsoChronology.INSTANCE},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.zoneId(), null},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.precision(), ChronoUnit.NANOS},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.zone(), null},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.offset(), null},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.localDate(), LocalDate.of(2007, 7, 15)},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.localTime(), LocalTime.of(12, 30, 40, 987654321)},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKLocalTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKLocalTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -116,6 +116,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -143,7 +144,7 @@
     private static final TemporalUnit[] INVALID_UNITS;
     static {
         EnumSet<ChronoUnit> set = EnumSet.range(DAYS, FOREVER);
-        INVALID_UNITS = (TemporalUnit[]) set.toArray(new TemporalUnit[set.size()]);
+        INVALID_UNITS = set.toArray(new TemporalUnit[set.size()]);
     }
 
     @BeforeMethod
@@ -654,13 +655,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {TEST_12_30_40_987654321, TemporalQueries.chronology(), null},
+                {TEST_12_30_40_987654321, TemporalQueries.zoneId(), null},
+                {TEST_12_30_40_987654321, TemporalQueries.precision(), ChronoUnit.NANOS},
+                {TEST_12_30_40_987654321, TemporalQueries.zone(), null},
+                {TEST_12_30_40_987654321, TemporalQueries.offset(), null},
+                {TEST_12_30_40_987654321, TemporalQueries.localDate(), null},
+                {TEST_12_30_40_987654321, TemporalQueries.localTime(), TEST_12_30_40_987654321},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKMonth.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKMonth.java	Wed Oct 30 18:38:20 2013 +0000
@@ -73,6 +73,7 @@
 import java.time.temporal.JulianFields;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -207,13 +208,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {Month.JUNE, TemporalQueries.chronology(), IsoChronology.INSTANCE},
+                {Month.JUNE, TemporalQueries.zoneId(), null},
+                {Month.JUNE, TemporalQueries.precision(), ChronoUnit.MONTHS},
+                {Month.JUNE, TemporalQueries.zone(), null},
+                {Month.JUNE, TemporalQueries.offset(), null},
+                {Month.JUNE, TemporalQueries.localDate(), null},
+                {Month.JUNE, TemporalQueries.localTime(), null},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKMonthDay.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKMonthDay.java	Wed Oct 30 18:38:20 2013 +0000
@@ -86,6 +86,7 @@
 import java.time.temporal.JulianFields;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -428,13 +429,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {TEST_07_15, TemporalQueries.chronology(), IsoChronology.INSTANCE},
+                {TEST_07_15, TemporalQueries.zoneId(), null},
+                {TEST_07_15, TemporalQueries.precision(), null},
+                {TEST_07_15, TemporalQueries.zone(), null},
+                {TEST_07_15, TemporalQueries.offset(), null},
+                {TEST_07_15, TemporalQueries.localDate(), null},
+                {TEST_07_15, TemporalQueries.localTime(), null},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKOffsetDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKOffsetDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -132,6 +132,7 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.util.ArrayList;
@@ -635,13 +636,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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)},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQueries.chronology(), IsoChronology.INSTANCE},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQueries.zoneId(), null},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQueries.precision(), ChronoUnit.NANOS},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQueries.zone(), OFFSET_PONE},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQueries.offset(), OFFSET_PONE},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQueries.localDate(), LocalDate.of(2008, 6, 30)},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQueries.localTime(), LocalTime.of(11, 30, 59, 500)},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKOffsetTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKOffsetTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -115,6 +115,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.util.ArrayList;
@@ -605,13 +606,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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)},
+                {TEST_11_30_59_500_PONE, TemporalQueries.chronology(), null},
+                {TEST_11_30_59_500_PONE, TemporalQueries.zoneId(), null},
+                {TEST_11_30_59_500_PONE, TemporalQueries.precision(), ChronoUnit.NANOS},
+                {TEST_11_30_59_500_PONE, TemporalQueries.zone(), OFFSET_PONE},
+                {TEST_11_30_59_500_PONE, TemporalQueries.offset(), OFFSET_PONE},
+                {TEST_11_30_59_500_PONE, TemporalQueries.localDate(), null},
+                {TEST_11_30_59_500_PONE, TemporalQueries.localTime(), LocalTime.of(11, 30, 59, 500)},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKYear.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKYear.java	Wed Oct 30 18:38:20 2013 +0000
@@ -99,6 +99,7 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -411,13 +412,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {TEST_2008, TemporalQueries.chronology(), IsoChronology.INSTANCE},
+                {TEST_2008, TemporalQueries.zoneId(), null},
+                {TEST_2008, TemporalQueries.precision(), ChronoUnit.YEARS},
+                {TEST_2008, TemporalQueries.zone(), null},
+                {TEST_2008, TemporalQueries.offset(), null},
+                {TEST_2008, TemporalQueries.localDate(), null},
+                {TEST_2008, TemporalQueries.localTime(), null},
         };
     }
 
@@ -596,7 +597,7 @@
     }
 
     @Test(dataProvider="plus_long_TemporalUnit")
-    public void test_plus_long_TemporalUnit(Year base, long amount, TemporalUnit unit, Year expectedYear, Class expectedEx) {
+    public void test_plus_long_TemporalUnit(Year base, long amount, TemporalUnit unit, Year expectedYear, Class<?> expectedEx) {
         if (expectedEx == null) {
             assertEquals(base.plus(amount, unit), expectedYear);
         } else {
@@ -728,7 +729,7 @@
     }
 
     @Test(dataProvider="minus_long_TemporalUnit")
-    public void test_minus_long_TemporalUnit(Year base, long amount, TemporalUnit unit, Year expectedYear, Class expectedEx) {
+    public void test_minus_long_TemporalUnit(Year base, long amount, TemporalUnit unit, Year expectedYear, Class<?> expectedEx) {
         if (expectedEx == null) {
             assertEquals(base.minus(amount, unit), expectedYear);
         } else {
--- a/test/java/time/tck/java/time/TCKYearMonth.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKYearMonth.java	Wed Oct 30 18:38:20 2013 +0000
@@ -100,6 +100,7 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -476,13 +477,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {TEST_2008_06, TemporalQueries.chronology(), IsoChronology.INSTANCE},
+                {TEST_2008_06, TemporalQueries.zoneId(), null},
+                {TEST_2008_06, TemporalQueries.precision(), ChronoUnit.MONTHS},
+                {TEST_2008_06, TemporalQueries.zone(), null},
+                {TEST_2008_06, TemporalQueries.offset(), null},
+                {TEST_2008_06, TemporalQueries.localDate(), null},
+                {TEST_2008_06, TemporalQueries.localTime(), null},
         };
     }
 
@@ -768,7 +769,7 @@
     }
 
     @Test(dataProvider="plus_long_TemporalUnit")
-    public void test_plus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class expectedEx) {
+    public void test_plus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) {
         if (expectedEx == null) {
             assertEquals(base.plus(amount, unit), expectedYearMonth);
         } else {
@@ -820,7 +821,7 @@
     }
 
     @Test(dataProvider="plus_TemporalAmount")
-    public void test_plus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class expectedEx) {
+    public void test_plus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) {
         if (expectedEx == null) {
             assertEquals(base.plus(temporalAmount), expectedYearMonth);
         } else {
@@ -983,7 +984,7 @@
     }
 
     @Test(dataProvider="minus_long_TemporalUnit")
-    public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class expectedEx) {
+    public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) {
         if (expectedEx == null) {
             assertEquals(base.minus(amount, unit), expectedYearMonth);
         } else {
@@ -1035,7 +1036,7 @@
     }
 
     @Test(dataProvider="minus_TemporalAmount")
-    public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class expectedEx) {
+    public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class<?> expectedEx) {
         if (expectedEx == null) {
             assertEquals(base.minus(temporalAmount), expectedYearMonth);
         } else {
--- a/test/java/time/tck/java/time/TCKZoneId.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKZoneId.java	Wed Oct 30 18:38:20 2013 +0000
@@ -76,6 +76,7 @@
 import java.time.format.TextStyle;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.zone.ZoneRulesException;
 import java.util.HashMap;
@@ -93,47 +94,6 @@
 public class TCKZoneId extends AbstractTCKTest {
 
     //-----------------------------------------------------------------------
-    // OLD_SHORT_IDS
-    //-----------------------------------------------------------------------
-    public void test_constant_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");
-        assertEquals(ids.get("ACT"), "Australia/Darwin");
-        assertEquals(ids.get("AET"), "Australia/Sydney");
-        assertEquals(ids.get("AGT"), "America/Argentina/Buenos_Aires");
-        assertEquals(ids.get("ART"), "Africa/Cairo");
-        assertEquals(ids.get("AST"), "America/Anchorage");
-        assertEquals(ids.get("BET"), "America/Sao_Paulo");
-        assertEquals(ids.get("BST"), "Asia/Dhaka");
-        assertEquals(ids.get("CAT"), "Africa/Harare");
-        assertEquals(ids.get("CNT"), "America/St_Johns");
-        assertEquals(ids.get("CST"), "America/Chicago");
-        assertEquals(ids.get("CTT"), "Asia/Shanghai");
-        assertEquals(ids.get("EAT"), "Africa/Addis_Ababa");
-        assertEquals(ids.get("ECT"), "Europe/Paris");
-        assertEquals(ids.get("IET"), "America/Indiana/Indianapolis");
-        assertEquals(ids.get("IST"), "Asia/Kolkata");
-        assertEquals(ids.get("JST"), "Asia/Tokyo");
-        assertEquals(ids.get("MIT"), "Pacific/Apia");
-        assertEquals(ids.get("NET"), "Asia/Yerevan");
-        assertEquals(ids.get("NST"), "Pacific/Auckland");
-        assertEquals(ids.get("PLT"), "Asia/Karachi");
-        assertEquals(ids.get("PNT"), "America/Phoenix");
-        assertEquals(ids.get("PRT"), "America/Puerto_Rico");
-        assertEquals(ids.get("PST"), "America/Los_Angeles");
-        assertEquals(ids.get("SST"), "Pacific/Guadalcanal");
-        assertEquals(ids.get("VST"), "Asia/Ho_Chi_Minh");
-    }
-
-    @Test(expectedExceptions=UnsupportedOperationException.class)
-    public void test_constant_OLD_IDS_PRE_2005_immutable() {
-        Map<String, String> ids = ZoneId.OLD_SHORT_IDS;
-        ids.clear();
-    }
-
-    //-----------------------------------------------------------------------
     // SHORT_IDS
     //-----------------------------------------------------------------------
     public void test_constant_OLD_IDS_POST_2005() {
@@ -559,7 +519,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.zoneId()) {
+                if (query == TemporalQueries.zoneId()) {
                     return (R) ZoneId.of("Europe/Paris");
                 }
                 return TemporalAccessor.super.query(query);
--- a/test/java/time/tck/java/time/TCKZoneOffset.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKZoneOffset.java	Wed Oct 30 18:38:20 2013 +0000
@@ -81,6 +81,7 @@
 import java.time.temporal.JulianFields;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -523,13 +524,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {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},
+                {ZoneOffset.UTC, TemporalQueries.chronology(), null},
+                {ZoneOffset.UTC, TemporalQueries.zoneId(), null},
+                {ZoneOffset.UTC, TemporalQueries.precision(), null},
+                {ZoneOffset.UTC, TemporalQueries.zone(), ZoneOffset.UTC},
+                {ZoneOffset.UTC, TemporalQueries.offset(), ZoneOffset.UTC},
+                {ZoneOffset.UTC, TemporalQueries.localDate(), null},
+                {ZoneOffset.UTC, TemporalQueries.localTime(), null},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKZonedDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TCKZonedDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -126,6 +126,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.util.ArrayList;
@@ -685,7 +686,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.zoneId()) {
+                if (query == TemporalQueries.zoneId()) {
                     return (R) TEST_DATE_TIME_PARIS.getZone();
                 }
                 return TemporalAccessor.super.query(query);
@@ -709,7 +710,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.zoneId()) {
+                if (query == TemporalQueries.zoneId()) {
                     return (R) TEST_DATE_TIME_PARIS.getZone();
                 }
                 return TemporalAccessor.super.query(query);
@@ -964,32 +965,32 @@
     //-----------------------------------------------------------------------
     @Test
     public void test_query_chrono() {
-        assertEquals(TEST_DATE_TIME.query(TemporalQuery.chronology()), IsoChronology.INSTANCE);
-        assertEquals(TemporalQuery.chronology().queryFrom(TEST_DATE_TIME), IsoChronology.INSTANCE);
+        assertEquals(TEST_DATE_TIME.query(TemporalQueries.chronology()), IsoChronology.INSTANCE);
+        assertEquals(TemporalQueries.chronology().queryFrom(TEST_DATE_TIME), IsoChronology.INSTANCE);
     }
 
     @Test
     public void test_query_zoneId() {
-        assertEquals(TEST_DATE_TIME.query(TemporalQuery.zoneId()), TEST_DATE_TIME.getZone());
-        assertEquals(TemporalQuery.zoneId().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
+        assertEquals(TEST_DATE_TIME.query(TemporalQueries.zoneId()), TEST_DATE_TIME.getZone());
+        assertEquals(TemporalQueries.zoneId().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
     }
 
     @Test
     public void test_query_precision() {
-        assertEquals(TEST_DATE_TIME.query(TemporalQuery.precision()), NANOS);
-        assertEquals(TemporalQuery.precision().queryFrom(TEST_DATE_TIME), NANOS);
+        assertEquals(TEST_DATE_TIME.query(TemporalQueries.precision()), NANOS);
+        assertEquals(TemporalQueries.precision().queryFrom(TEST_DATE_TIME), NANOS);
     }
 
     @Test
     public void test_query_offset() {
-        assertEquals(TEST_DATE_TIME.query(TemporalQuery.offset()), TEST_DATE_TIME.getOffset());
-        assertEquals(TemporalQuery.offset().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getOffset());
+        assertEquals(TEST_DATE_TIME.query(TemporalQueries.offset()), TEST_DATE_TIME.getOffset());
+        assertEquals(TemporalQueries.offset().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getOffset());
     }
 
     @Test
     public void test_query_zone() {
-        assertEquals(TEST_DATE_TIME.query(TemporalQuery.zone()), TEST_DATE_TIME.getZone());
-        assertEquals(TemporalQuery.zone().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
+        assertEquals(TEST_DATE_TIME.query(TemporalQueries.zone()), TEST_DATE_TIME.getZone());
+        assertEquals(TemporalQueries.zone().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
     }
 
     @Test(expectedExceptions=NullPointerException.class)
--- a/test/java/time/tck/java/time/TestIsoChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/TestIsoChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -80,7 +80,7 @@
 import java.time.chrono.IsoChronology;
 import java.time.chrono.IsoEra;
 import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAdjusters;
 
 import org.testng.Assert;
 import org.testng.annotations.DataProvider;
@@ -208,14 +208,14 @@
     @Test
     public void test_adjust1() {
         LocalDate base = IsoChronology.INSTANCE.date(1728, 10, 28);
-        LocalDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        LocalDate test = base.with(TemporalAdjusters.lastDayOfMonth());
         assertEquals(test, IsoChronology.INSTANCE.date(1728, 10, 31));
     }
 
     @Test
     public void test_adjust2() {
         LocalDate base = IsoChronology.INSTANCE.date(1728, 12, 2);
-        LocalDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        LocalDate test = base.with(TemporalAdjusters.lastDayOfMonth());
         assertEquals(test, IsoChronology.INSTANCE.date(1728, 12, 31));
     }
 
--- a/test/java/time/tck/java/time/chrono/CopticChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/chrono/CopticChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -59,13 +59,11 @@
 import static java.time.temporal.ChronoField.EPOCH_DAY;
 
 import java.io.Serializable;
-
+import java.time.chrono.AbstractChronology;
+import java.time.chrono.Era;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.ValueRange;
-import java.time.chrono.Chronology;
-import java.time.chrono.Era;
-
 import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
@@ -95,7 +93,7 @@
  * <h4>Implementation notes</h4>
  * This class is immutable and thread-safe.
  */
-public final class CopticChronology extends Chronology implements Serializable {
+public final class CopticChronology extends AbstractChronology implements Serializable {
 
     /**
      * Singleton instance of the Coptic chronology.
--- a/test/java/time/tck/java/time/chrono/CopticDate.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/chrono/CopticDate.java	Wed Oct 30 18:38:20 2013 +0000
@@ -308,7 +308,7 @@
     @Override
     public Period until(ChronoLocalDate endDate) {
         // TODO: untested
-        CopticDate end = (CopticDate) getChronology().date(endDate);
+        CopticDate end = getChronology().date(endDate);
         long totalMonths = (end.prolepticYear - this.prolepticYear) * 13 + (end.month - this.month);  // safe
         int days = end.day - this.day;
         if (totalMonths > 0 && days < 0) {
--- a/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -346,7 +346,7 @@
     //-----------------------------------------------------------------------
     @Test(dataProvider="calendars")
     public void test_getChronology(Chronology chrono) {
-        ChronoLocalDateTime test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30));
+        ChronoLocalDateTime<?> test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30));
         assertEquals(test.getChronology(), chrono);
     }
 
--- a/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java	Wed Oct 30 18:38:20 2013 +0000
@@ -347,7 +347,7 @@
     //-----------------------------------------------------------------------
     @Test(dataProvider="calendars")
     public void test_getChronology(Chronology chrono) {
-        ChronoZonedDateTime test = chrono.zonedDateTime(ZonedDateTime.of(2010, 6, 30, 11, 30, 0, 0, ZoneOffset.UTC));
+        ChronoZonedDateTime<?> test = chrono.zonedDateTime(ZonedDateTime.of(2010, 6, 30, 11, 30, 0, 0, ZoneOffset.UTC));
         assertEquals(test.getChronology(), chrono);
     }
 
--- a/test/java/time/tck/java/time/chrono/TCKIsoChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKIsoChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -70,7 +70,9 @@
 import java.time.format.ResolverStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAdjusters;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.util.HashMap;
 import java.util.Map;
@@ -107,7 +109,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.chronology()) {
+                if (query == TemporalQueries.chronology()) {
                     return (R) IsoChronology.INSTANCE;
                 }
                 throw new UnsupportedOperationException();
@@ -130,7 +132,7 @@
 
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.chronology()) {
+                if (query == TemporalQueries.chronology()) {
                     return null;
                 }
                 throw new UnsupportedOperationException();
@@ -166,7 +168,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.localDate()) {
+                if (query == TemporalQueries.localDate()) {
                     return (R) LocalDate.of(2012, 6, 30);
                 }
                 throw new UnsupportedOperationException();
@@ -205,10 +207,10 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.localDate()) {
+                if (query == TemporalQueries.localDate()) {
                     return (R) LocalDate.of(2012, 6, 30);
                 }
-                if (query == TemporalQuery.localTime()) {
+                if (query == TemporalQueries.localTime()) {
                     return (R) LocalTime.of(12, 30, 40);
                 }
                 throw new UnsupportedOperationException();
@@ -254,13 +256,13 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == TemporalQuery.localDate()) {
+                if (query == TemporalQueries.localDate()) {
                     return (R) LocalDate.of(2012, 6, 30);
                 }
-                if (query == TemporalQuery.localTime()) {
+                if (query == TemporalQueries.localTime()) {
                     return (R) LocalTime.of(12, 30, 40);
                 }
-                if (query == TemporalQuery.zoneId() || query == TemporalQuery.zone()) {
+                if (query == TemporalQueries.zoneId() || query == TemporalQueries.zone()) {
                     return (R) ZoneId.of("Europe/London");
                 }
                 throw new UnsupportedOperationException();
--- a/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -92,10 +92,9 @@
 import java.time.format.ResolverStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Temporal;
-import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAdjusters;
 import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.ValueRange;
 
 import java.util.HashMap;
@@ -229,7 +228,7 @@
     @Test(dataProvider="createByEra")
     public void test_createByEra_query(JapaneseEra era, int yoe, int moy, int dom, int doy, LocalDate iso) {
         JapaneseDate test = JapaneseDate.of(era, yoe, moy, dom);
-        assertEquals(test.query(TemporalQuery.localDate()), iso);
+        assertEquals(test.query(TemporalQueries.localDate()), iso);
     }
 
     @Test(dataProvider="createByEra")
@@ -297,7 +296,7 @@
     @Test(dataProvider="createByProleptic")
     public void test_createByProleptic_query(int y, int moy, int dom, int doy, LocalDate iso) {
         JapaneseDate test = JapaneseDate.of(y, moy, dom);
-        assertEquals(test.query(TemporalQuery.localDate()), iso);
+        assertEquals(test.query(TemporalQueries.localDate()), iso);
     }
 
     @Test(dataProvider="createByProleptic")
@@ -495,14 +494,14 @@
     @Test
     public void test_adjust1() {
         JapaneseDate base = JapaneseChronology.INSTANCE.date(1928, 10, 29);
-        JapaneseDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        JapaneseDate test = base.with(TemporalAdjusters.lastDayOfMonth());
         assertEquals(test, JapaneseChronology.INSTANCE.date(1928, 10, 31));
     }
 
     @Test
     public void test_adjust2() {
         JapaneseDate base = JapaneseChronology.INSTANCE.date(1928, 12, 2);
-        JapaneseDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        JapaneseDate test = base.with(TemporalAdjusters.lastDayOfMonth());
         assertEquals(test, JapaneseChronology.INSTANCE.date(1928, 12, 31));
     }
 
--- a/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -82,15 +82,15 @@
 import java.time.chrono.IsoChronology;
 import java.time.chrono.JapaneseDate;
 import java.time.chrono.MinguoChronology;
+import java.time.chrono.MinguoEra;
 import java.time.chrono.MinguoDate;
-import java.time.chrono.MinguoEra;
 import java.time.chrono.ThaiBuddhistChronology;
 import java.time.chrono.ThaiBuddhistDate;
 import java.time.format.ResolverStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAdjusters;
 import java.time.temporal.TemporalField;
 import java.util.HashMap;
 import java.util.List;
@@ -360,14 +360,14 @@
     @Test
     public void test_adjust1() {
         MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29);
-        MinguoDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        MinguoDate test = base.with(TemporalAdjusters.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());
+        MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
         assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
     }
 
--- a/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -88,7 +88,7 @@
 import java.time.format.ResolverStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAdjusters;
 import java.time.temporal.TemporalField;
 import java.time.temporal.ValueRange;
 import java.util.HashMap;
@@ -366,14 +366,14 @@
     @Test
     public void test_adjust1() {
         ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 10, 29);
-        ThaiBuddhistDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        ThaiBuddhistDate test = base.with(TemporalAdjusters.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());
+        ThaiBuddhistDate test = base.with(TemporalAdjusters.lastDayOfMonth());
         assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 12, 31));
     }
 
--- a/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -68,6 +68,7 @@
 import java.time.chrono.ThaiBuddhistChronology;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.util.Locale;
 
@@ -122,7 +123,7 @@
         TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos);
         assertEquals(pos.getIndex(), expected.getId().length());
         assertEquals(pos.getErrorIndex(), -1);
-        assertEquals(parsed.query(TemporalQuery.chronology()), expected);
+        assertEquals(parsed.query(TemporalQueries.chronology()), expected);
     }
 
     @Test(dataProvider="parseValid")
@@ -140,7 +141,7 @@
         TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text.toLowerCase(Locale.ENGLISH), pos);
         assertEquals(pos.getIndex(), expected.getId().length());
         assertEquals(pos.getErrorIndex(), -1);
-        assertEquals(parsed.query(TemporalQuery.chronology()), expected);
+        assertEquals(parsed.query(TemporalQueries.chronology()), expected);
     }
 
     //-----------------------------------------------------------------------
--- a/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java	Wed Oct 30 18:38:20 2013 +0000
@@ -94,6 +94,7 @@
 import java.time.temporal.IsoFields;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -1405,8 +1406,8 @@
             assertEquals(parsed.isSupported(field), true);
             parsed.getLong(field);
         }
-        assertEquals(parsed.query(TemporalQuery.chronology()), expected.chrono);
-        assertEquals(parsed.query(TemporalQuery.zoneId()), expected.zone);
+        assertEquals(parsed.query(TemporalQueries.chronology()), expected.chrono);
+        assertEquals(parsed.query(TemporalQueries.zoneId()), expected.zone);
     }
 
     //-------------------------------------------------------------------------
@@ -1471,7 +1472,7 @@
         @SuppressWarnings("unchecked")
         @Override
         public <R> R query(TemporalQuery<R> query) {
-            if (query == TemporalQuery.zoneId()) {
+            if (query == TemporalQueries.zoneId()) {
                 return (R) zoneId;
             }
             return TemporalAccessor.super.query(query);
--- a/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java	Wed Oct 30 18:38:20 2013 +0000
@@ -113,7 +113,7 @@
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.ValueRange;
 import java.util.Map;
@@ -147,8 +147,8 @@
         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.query(TemporalQueries.localDate()), null);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
         assertEquals(accessor.isSupported(field1), true);
         assertEquals(accessor.getLong(field1), value1);
     }
@@ -186,8 +186,8 @@
                 .appendValue(field2).toFormatter();
         TemporalAccessor accessor = f.parse(str);
 
-        assertEquals(accessor.query(TemporalQuery.localDate()), null);
-        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.query(TemporalQueries.localDate()), null);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
         assertEquals(accessor.isSupported(field1), true);
         assertEquals(accessor.isSupported(field2), true);
         assertEquals(accessor.getLong(field1), value1);
@@ -218,8 +218,8 @@
                 .appendValue(field3).toFormatter();
         TemporalAccessor accessor = f.parse(str);
 
-        assertEquals(accessor.query(TemporalQuery.localDate()), null);
-        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.query(TemporalQueries.localDate()), null);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
         assertEquals(accessor.isSupported(field1), true);
         assertEquals(accessor.isSupported(field2), true);
         assertEquals(accessor.isSupported(field3), true);
@@ -252,8 +252,8 @@
         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.query(TemporalQueries.localDate()), null);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
         if (expectedField1 != null) {
             assertEquals(accessor.isSupported(expectedField1), true);
             assertEquals(accessor.getLong(expectedField1), expectedValue1.longValue());
@@ -278,8 +278,8 @@
         DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter();
 
         TemporalAccessor accessor = f.parse(str);
-        assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate);
-        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.query(TemporalQueries.localDate()), expectedDate);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
     }
 
     //-----------------------------------------------------------------------
@@ -303,8 +303,8 @@
         DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter();
 
         TemporalAccessor accessor = f.parse(str);
-        assertEquals(accessor.query(TemporalQuery.localDate()), null);
-        assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime);
+        assertEquals(accessor.query(TemporalQueries.localDate()), null);
+        assertEquals(accessor.query(TemporalQueries.localTime()), expectedTime);
     }
 
     //-----------------------------------------------------------------------
@@ -334,8 +334,8 @@
                 .appendValue(field2).toFormatter();
 
         TemporalAccessor accessor = f.parse(str);
-        assertEquals(accessor.query(TemporalQuery.localDate()), null);
-        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.query(TemporalQueries.localDate()), null);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
         if (expectedField1 != null) {
             assertEquals(accessor.isSupported(expectedField1), true);
             assertEquals(accessor.getLong(expectedField1), expectedValue1.longValue());
@@ -382,8 +382,8 @@
                 .appendValue(field2).toFormatter();
 
         TemporalAccessor accessor = f.parse(str);
-        assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate);
-        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.query(TemporalQueries.localDate()), expectedDate);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
     }
 
     //-----------------------------------------------------------------------
@@ -469,8 +469,8 @@
                 .appendValue(field2).toFormatter();
 
         TemporalAccessor accessor = f.parse(str);
-        assertEquals(accessor.query(TemporalQuery.localDate()), null);
-        assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime);
+        assertEquals(accessor.query(TemporalQueries.localDate()), null);
+        assertEquals(accessor.query(TemporalQueries.localTime()), expectedTime);
     }
 
     //-----------------------------------------------------------------------
@@ -502,8 +502,8 @@
                 .appendValue(field3).toFormatter();
 
         TemporalAccessor accessor = f.parse(str);
-        assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate);
-        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.query(TemporalQueries.localDate()), expectedDate);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
     }
 
     //-----------------------------------------------------------------------
@@ -535,8 +535,8 @@
                 .appendValue(field4).toFormatter();
 
         TemporalAccessor accessor = f.parse(str);
-        assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate);
-        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.query(TemporalQueries.localDate()), expectedDate);
+        assertEquals(accessor.query(TemporalQueries.localTime()), null);
     }
 
     //-----------------------------------------------------------------------
@@ -603,8 +603,8 @@
         for (ResolverStyle s : styles) {
             if (expectedTime != null) {
                 TemporalAccessor accessor = f.withResolverStyle(s).parse("");
-                assertEquals(accessor.query(TemporalQuery.localDate()), null, "ResolverStyle: " + s);
-                assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime, "ResolverStyle: " + s);
+                assertEquals(accessor.query(TemporalQueries.localDate()), null, "ResolverStyle: " + s);
+                assertEquals(accessor.query(TemporalQueries.localTime()), expectedTime, "ResolverStyle: " + s);
                 assertEquals(accessor.query(DateTimeFormatter.parsedExcessDays()), excessPeriod, "ResolverStyle: " + s);
             } else {
                 try {
@@ -629,8 +629,8 @@
         for (ResolverStyle s : styles) {
             if (expectedTime != null) {
                 TemporalAccessor accessor = f.withResolverStyle(s).parse("");
-                assertEquals(accessor.query(TemporalQuery.localDate()), null, "ResolverStyle: " + s);
-                assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime.minusNanos(nano), "ResolverStyle: " + s);
+                assertEquals(accessor.query(TemporalQueries.localDate()), null, "ResolverStyle: " + s);
+                assertEquals(accessor.query(TemporalQueries.localTime()), expectedTime.minusNanos(nano), "ResolverStyle: " + s);
                 assertEquals(accessor.query(DateTimeFormatter.parsedExcessDays()), excessPeriod, "ResolverStyle: " + s);
             } else {
                 try {
@@ -658,8 +658,8 @@
             LocalDate expectedDate = LocalDate.of(2012, 6, 30).plus(excessPeriod);
             for (ResolverStyle s : styles) {
                 TemporalAccessor accessor = f.withResolverStyle(s).parse("");
-                assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate, "ResolverStyle: " + s);
-                assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime, "ResolverStyle: " + s);
+                assertEquals(accessor.query(TemporalQueries.localDate()), expectedDate, "ResolverStyle: " + s);
+                assertEquals(accessor.query(TemporalQueries.localTime()), expectedTime, "ResolverStyle: " + s);
                 assertEquals(accessor.query(DateTimeFormatter.parsedExcessDays()), Period.ZERO, "ResolverStyle: " + s);
             }
         }
@@ -696,8 +696,8 @@
 
         if (expectedSecond != null) {
             TemporalAccessor accessor = f.withResolverStyle(style).parse(str);
-            assertEquals(accessor.query(TemporalQuery.localDate()), null);
-            assertEquals(accessor.query(TemporalQuery.localTime()), LocalTime.ofSecondOfDay(expectedSecond));
+            assertEquals(accessor.query(TemporalQueries.localDate()), null);
+            assertEquals(accessor.query(TemporalQueries.localTime()), LocalTime.ofSecondOfDay(expectedSecond));
             assertEquals(accessor.query(DateTimeFormatter.parsedExcessDays()), Period.ofDays(expectedDays));
         } else {
             try {
@@ -740,8 +740,8 @@
 
         if (expectedMinute != null) {
             TemporalAccessor accessor = f.withResolverStyle(style).parse(str);
-            assertEquals(accessor.query(TemporalQuery.localDate()), null);
-            assertEquals(accessor.query(TemporalQuery.localTime()), LocalTime.ofSecondOfDay(expectedMinute * 60));
+            assertEquals(accessor.query(TemporalQueries.localDate()), null);
+            assertEquals(accessor.query(TemporalQueries.localTime()), LocalTime.ofSecondOfDay(expectedMinute * 60));
             assertEquals(accessor.query(DateTimeFormatter.parsedExcessDays()), Period.ofDays(expectedDays));
         } else {
             try {
@@ -784,8 +784,8 @@
 
         if (expectedHour != null) {
             TemporalAccessor accessor = f.withResolverStyle(style).parse(str);
-            assertEquals(accessor.query(TemporalQuery.localDate()), null);
-            assertEquals(accessor.query(TemporalQuery.localTime()), LocalTime.of(expectedHour, 0));
+            assertEquals(accessor.query(TemporalQueries.localDate()), null);
+            assertEquals(accessor.query(TemporalQueries.localTime()), LocalTime.of(expectedHour, 0));
             assertEquals(accessor.query(DateTimeFormatter.parsedExcessDays()), Period.ofDays(expectedDays));
         } else {
             try {
@@ -828,8 +828,8 @@
 
         if (expectedValue != null) {
             TemporalAccessor accessor = f.withResolverStyle(style).parse(str);
-            assertEquals(accessor.query(TemporalQuery.localDate()), null);
-            assertEquals(accessor.query(TemporalQuery.localTime()), null);
+            assertEquals(accessor.query(TemporalQueries.localDate()), null);
+            assertEquals(accessor.query(TemporalQueries.localTime()), null);
             assertEquals(accessor.isSupported(CLOCK_HOUR_OF_AMPM), false);
             assertEquals(accessor.isSupported(HOUR_OF_AMPM), true);
             assertEquals(accessor.getLong(HOUR_OF_AMPM), expectedValue.longValue());
@@ -871,8 +871,8 @@
 
         if (expectedValue != null) {
             TemporalAccessor accessor = f.withResolverStyle(style).parse(str);
-            assertEquals(accessor.query(TemporalQuery.localDate()), null);
-            assertEquals(accessor.query(TemporalQuery.localTime()), null);
+            assertEquals(accessor.query(TemporalQueries.localDate()), null);
+            assertEquals(accessor.query(TemporalQueries.localTime()), null);
             assertEquals(accessor.isSupported(AMPM_OF_DAY), true);
             assertEquals(accessor.getLong(AMPM_OF_DAY), expectedValue.longValue());
         } else {
@@ -927,15 +927,14 @@
             }
             @Override
             public TemporalAccessor resolve(
-                    Map<TemporalField, Long> fieldValues, Chronology chronology,
-                    ZoneId zone, ResolverStyle resolverStyle) {
+                    Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) {
                 return LocalTime.MIDNIGHT.plusNanos(fieldValues.remove(this));
             }
         };
         DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field).toFormatter();
         TemporalAccessor accessor = f.parse("1234567890");
-        assertEquals(accessor.query(TemporalQuery.localDate()), null);
-        assertEquals(accessor.query(TemporalQuery.localTime()), LocalTime.of(0, 0, 1, 234_567_890));
+        assertEquals(accessor.query(TemporalQueries.localDate()), null);
+        assertEquals(accessor.query(TemporalQueries.localTime()), LocalTime.of(0, 0, 1, 234_567_890));
     }
 
     @Test
@@ -979,16 +978,15 @@
             }
             @Override
             public TemporalAccessor resolve(
-                    Map<TemporalField, Long> fieldValues, Chronology chronology,
-                    ZoneId zone, ResolverStyle resolverStyle) {
+                    Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) {
                 fieldValues.remove(this);
                 return LocalDateTime.of(2010, 6, 30, 12, 30);
             }
         };
         DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field).toFormatter();
         TemporalAccessor accessor = f.parse("1234567890");
-        assertEquals(accessor.query(TemporalQuery.localDate()), LocalDate.of(2010, 6, 30));
-        assertEquals(accessor.query(TemporalQuery.localTime()), LocalTime.of(12, 30));
+        assertEquals(accessor.query(TemporalQueries.localDate()), LocalDate.of(2010, 6, 30));
+        assertEquals(accessor.query(TemporalQueries.localTime()), LocalTime.of(12, 30));
     }
 
     @Test(expectedExceptions = DateTimeParseException.class)
@@ -1032,8 +1030,7 @@
             }
             @Override
             public TemporalAccessor resolve(
-                    Map<TemporalField, Long> fieldValues, Chronology chronology,
-                    ZoneId zone, ResolverStyle resolverStyle) {
+                    Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) {
                 return ThaiBuddhistChronology.INSTANCE.dateNow();
             }
         };
@@ -1082,8 +1079,7 @@
             }
             @Override
             public TemporalAccessor resolve(
-                    Map<TemporalField, Long> fieldValues, Chronology chronology,
-                    ZoneId zone, ResolverStyle resolverStyle) {
+                    Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) {
                 return ZonedDateTime.of(2010, 6, 30, 12, 30, 0, 0, ZoneId.of("Europe/Paris"));
             }
         };
--- a/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -123,7 +123,7 @@
         };
     }
 
-    @SuppressWarnings("deprecated")
+    @SuppressWarnings("deprecation")
     @Test(dataProvider="date")
     public void test_date_print(LocalDate date, FormatStyle dateStyle, int dateStyleOld, Locale locale) {
         DateFormat old = DateFormat.getDateInstance(dateStyleOld, locale);
@@ -135,7 +135,7 @@
         assertEquals(formatted, text);
     }
 
-    @SuppressWarnings("deprecated")
+    @SuppressWarnings("deprecation")
     @Test(dataProvider="date")
     public void test_date_parse(LocalDate date, FormatStyle dateStyle, int dateStyleOld, Locale locale) {
         DateFormat old = DateFormat.getDateInstance(dateStyleOld, locale);
@@ -176,7 +176,7 @@
         };
     }
 
-    @SuppressWarnings("deprecated")
+    @SuppressWarnings("deprecation")
     @Test(dataProvider="time")
     public void test_time_print(LocalTime time, FormatStyle timeStyle, int timeStyleOld, Locale locale) {
         DateFormat old = DateFormat.getTimeInstance(timeStyleOld, locale);
@@ -188,7 +188,7 @@
         assertEquals(formatted, text);
     }
 
-    @SuppressWarnings("deprecated")
+    @SuppressWarnings("deprecation")
     @Test(dataProvider="time")
     public void test_time_parse(LocalTime time, FormatStyle timeStyle, int timeStyleOld, Locale locale) {
         DateFormat old = DateFormat.getTimeInstance(timeStyleOld, locale);
--- a/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -71,7 +71,7 @@
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 import java.util.Locale;
 import java.util.Objects;
 
@@ -214,9 +214,9 @@
         assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + text);
         assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + text);
         if (expected != null) {
-            assertEquals(parsed.query(TemporalQuery.zoneId()), expected, "Incorrect zoneId parsing: " + text);
-            assertEquals(parsed.query(TemporalQuery.offset()), null, "Incorrect offset parsing: " + text);
-            assertEquals(parsed.query(TemporalQuery.zone()), expected, "Incorrect zone parsing: " + text);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + text);
+            assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + text);
+            assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + text);
         } else {
             assertEquals(parsed, null);
         }
@@ -231,9 +231,9 @@
         assertEquals(pos.getErrorIndex(), expectedErrorIndex >= 0  ? expectedErrorIndex + 3 : expectedErrorIndex, "Incorrect error index parsing: " + prefixText);
         assertEquals(pos.getIndex(), expectedIndex + 3, "Incorrect index parsing: " + prefixText);
         if (expected != null) {
-            assertEquals(parsed.query(TemporalQuery.zoneId()), expected, "Incorrect zoneId parsing: " + prefixText);
-            assertEquals(parsed.query(TemporalQuery.offset()), null, "Incorrect offset parsing: " + prefixText);
-            assertEquals(parsed.query(TemporalQuery.zone()), expected, "Incorrect zone parsing: " + prefixText);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + prefixText);
+            assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + prefixText);
+            assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + prefixText);
         } else {
             assertEquals(parsed, null);
         }
@@ -247,9 +247,9 @@
         assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + suffixText);
         assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + suffixText);
         if (expected != null) {
-            assertEquals(parsed.query(TemporalQuery.zoneId()), expected, "Incorrect zoneId parsing: " + suffixText);
-            assertEquals(parsed.query(TemporalQuery.offset()), null, "Incorrect offset parsing: " + suffixText);
-            assertEquals(parsed.query(TemporalQuery.zone()), expected, "Incorrect zone parsing: " + suffixText);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + suffixText);
+            assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + suffixText);
+            assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + suffixText);
         } else {
             assertEquals(parsed, null);
         }
@@ -269,9 +269,9 @@
             assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + lcText);
             assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + lcText);
             if (expected != null) {
-                assertEquals(parsed.query(TemporalQuery.zoneId()), expected);
-                assertEquals(parsed.query(TemporalQuery.offset()), null);
-                assertEquals(parsed.query(TemporalQuery.zone()), expected);
+                assertEquals(parsed.query(TemporalQueries.zoneId()), expected);
+                assertEquals(parsed.query(TemporalQueries.offset()), null);
+                assertEquals(parsed.query(TemporalQueries.zone()), expected);
             } else {
                 assertEquals(parsed, null);
             }
@@ -286,10 +286,10 @@
         assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + lcText);
         assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + lcText);
         if (expected != null) {
-            ZoneId zid = parsed.query(TemporalQuery.zoneId());
-            assertEquals(parsed.query(TemporalQuery.zoneId()), expected, "Incorrect zoneId parsing: " + lcText);
-            assertEquals(parsed.query(TemporalQuery.offset()), null, "Incorrect offset parsing: " + lcText);
-            assertEquals(parsed.query(TemporalQuery.zone()), expected, "Incorrect zone parsing: " + lcText);
+            ZoneId zid = parsed.query(TemporalQueries.zoneId());
+            assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + lcText);
+            assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + lcText);
+            assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + lcText);
         } else {
             assertEquals(parsed, null);
         }
--- a/test/java/time/tck/java/time/serial/TCKOffsetDateTimeSerialization.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/serial/TCKOffsetDateTimeSerialization.java	Wed Oct 30 18:38:20 2013 +0000
@@ -59,9 +59,6 @@
  */
 package tck.java.time.serial;
 
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import tck.java.time.AbstractTCKTest;
 
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
@@ -69,6 +66,10 @@
 import java.time.OffsetDateTime;
 import java.time.ZoneOffset;
 
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
 /**
  * Test OffsetDateTime serialization.
  */
@@ -96,11 +97,6 @@
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         try (DataOutputStream dos = new DataOutputStream(baos) ) {
             dos.writeByte(10);       // java.time.Ser.OFFSET_DATE_TIME_TYPE
-        }
-        byte[] bytes = baos.toByteArray();
-        ByteArrayOutputStream baosDateTime = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baosDateTime) ) {
-            dos.writeByte(5);
             dos.writeInt(2012);
             dos.writeByte(9);
             dos.writeByte(16);
@@ -108,17 +104,11 @@
             dos.writeByte(17);
             dos.writeByte(59);
             dos.writeInt(464_000_000);
-        }
-        byte[] bytesDateTime = baosDateTime.toByteArray();
-        ByteArrayOutputStream baosOffset = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baosOffset) ) {
-            dos.writeByte(8);
             dos.writeByte(4);  // quarter hours stored: 3600 / 900
         }
-        byte[] bytesOffset = baosOffset.toByteArray();
+        byte[] bytes = baos.toByteArray();
         LocalDateTime ldt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 464_000_000);
-        assertSerializedBySer(OffsetDateTime.of(ldt, ZoneOffset.ofHours(1)), bytes, bytesDateTime, bytesOffset);
+        assertSerializedBySer(OffsetDateTime.of(ldt, ZoneOffset.ofHours(1)), bytes);
     }
 
-
 }
--- a/test/java/time/tck/java/time/serial/TCKOffsetTimeSerialization.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/serial/TCKOffsetTimeSerialization.java	Wed Oct 30 18:38:20 2013 +0000
@@ -97,25 +97,14 @@
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         try (DataOutputStream dos = new DataOutputStream(baos) ) {
             dos.writeByte(9);       // java.time.Ser.OFFSET_TIME_TYPE
-        }
-        byte[] bytes = baos.toByteArray();
-        ByteArrayOutputStream baosTime = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baosTime) ) {
-            dos.writeByte(4);
             dos.writeByte(22);
             dos.writeByte(17);
             dos.writeByte(59);
             dos.writeInt(464_000_000);
-        }
-        byte[] bytesTime = baosTime.toByteArray();
-        ByteArrayOutputStream baosOffset = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baosOffset) ) {
-            dos.writeByte(8);
             dos.writeByte(4);  // quarter hours stored: 3600 / 900
         }
-        byte[] bytesOffset = baosOffset.toByteArray();
-        assertSerializedBySer(OffsetTime.of(22, 17, 59, 464_000_000, ZoneOffset.ofHours(1)), bytes,
-                bytesTime, bytesOffset);
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(OffsetTime.of(22, 17, 59, 464_000_000, ZoneOffset.ofHours(1)), bytes);
     }
 
 
--- a/test/java/time/tck/java/time/temporal/TCKTemporalAdjusters.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/tck/java/time/temporal/TCKTemporalAdjusters.java	Wed Oct 30 18:38:20 2013 +0000
@@ -73,12 +73,13 @@
 import java.time.LocalDate;
 import java.time.Month;
 import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAdjusters;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 /**
- * Test TemporalAdjuster.
+ * Test TemporalAdjusters.
  */
 @Test
 public class TCKTemporalAdjusters {
@@ -88,13 +89,13 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_ofDateAdjuster() {
-        TemporalAdjuster test = TemporalAdjuster.ofDateAdjuster(date -> date.plusDays(2));
+        TemporalAdjuster test = TemporalAdjusters.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);
+        TemporalAdjusters.ofDateAdjuster(null);
     }
 
 
@@ -103,7 +104,7 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_firstDayOfMonth() {
-        assertNotNull(TemporalAdjuster.firstDayOfMonth());
+        assertNotNull(TemporalAdjusters.firstDayOfMonth());
     }
 
     @Test
@@ -111,7 +112,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfMonth().adjustInto(date);
                 assertEquals(test.getYear(), 2007);
                 assertEquals(test.getMonth(), month);
                 assertEquals(test.getDayOfMonth(), 1);
@@ -124,7 +125,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfMonth().adjustInto(date);
                 assertEquals(test.getYear(), 2008);
                 assertEquals(test.getMonth(), month);
                 assertEquals(test.getDayOfMonth(), 1);
@@ -137,7 +138,7 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_lastDayOfMonth() {
-        assertNotNull(TemporalAdjuster.lastDayOfMonth());
+        assertNotNull(TemporalAdjusters.lastDayOfMonth());
     }
 
     @Test
@@ -145,7 +146,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.lastDayOfMonth().adjustInto(date);
                 assertEquals(test.getYear(), 2007);
                 assertEquals(test.getMonth(), month);
                 assertEquals(test.getDayOfMonth(), month.length(false));
@@ -158,7 +159,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.lastDayOfMonth().adjustInto(date);
                 assertEquals(test.getYear(), 2008);
                 assertEquals(test.getMonth(), month);
                 assertEquals(test.getDayOfMonth(), month.length(true));
@@ -171,7 +172,7 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_firstDayOfNextMonth() {
-        assertNotNull(TemporalAdjuster.firstDayOfNextMonth());
+        assertNotNull(TemporalAdjusters.firstDayOfNextMonth());
     }
 
     @Test
@@ -179,7 +180,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfNextMonth().adjustInto(date);
                 assertEquals(test.getYear(), month == DECEMBER ? 2008 : 2007);
                 assertEquals(test.getMonth(), month.plus(1));
                 assertEquals(test.getDayOfMonth(), 1);
@@ -192,7 +193,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfNextMonth().adjustInto(date);
                 assertEquals(test.getYear(), month == DECEMBER ? 2009 : 2008);
                 assertEquals(test.getMonth(), month.plus(1));
                 assertEquals(test.getDayOfMonth(), 1);
@@ -205,7 +206,7 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_firstDayOfYear() {
-        assertNotNull(TemporalAdjuster.firstDayOfYear());
+        assertNotNull(TemporalAdjusters.firstDayOfYear());
     }
 
     @Test
@@ -213,7 +214,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfYear().adjustInto(date);
                 assertEquals(test.getYear(), 2007);
                 assertEquals(test.getMonth(), Month.JANUARY);
                 assertEquals(test.getDayOfMonth(), 1);
@@ -226,7 +227,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfYear().adjustInto(date);
                 assertEquals(test.getYear(), 2008);
                 assertEquals(test.getMonth(), Month.JANUARY);
                 assertEquals(test.getDayOfMonth(), 1);
@@ -239,7 +240,7 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_lastDayOfYear() {
-        assertNotNull(TemporalAdjuster.lastDayOfYear());
+        assertNotNull(TemporalAdjusters.lastDayOfYear());
     }
 
     @Test
@@ -247,7 +248,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.lastDayOfYear().adjustInto(date);
                 assertEquals(test.getYear(), 2007);
                 assertEquals(test.getMonth(), Month.DECEMBER);
                 assertEquals(test.getDayOfMonth(), 31);
@@ -260,7 +261,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.lastDayOfYear().adjustInto(date);
                 assertEquals(test.getYear(), 2008);
                 assertEquals(test.getMonth(), Month.DECEMBER);
                 assertEquals(test.getDayOfMonth(), 31);
@@ -273,7 +274,7 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_firstDayOfNextYear() {
-        assertNotNull(TemporalAdjuster.firstDayOfNextYear());
+        assertNotNull(TemporalAdjusters.firstDayOfNextYear());
     }
 
     @Test
@@ -281,7 +282,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfNextYear().adjustInto(date);
                 assertEquals(test.getYear(), 2008);
                 assertEquals(test.getMonth(), JANUARY);
                 assertEquals(test.getDayOfMonth(), 1);
@@ -294,7 +295,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfNextYear().adjustInto(date);
                 assertEquals(test.getYear(), 2009);
                 assertEquals(test.getMonth(), JANUARY);
                 assertEquals(test.getDayOfMonth(), 1);
@@ -307,12 +308,12 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_dayOfWeekInMonth() {
-        assertNotNull(TemporalAdjuster.dayOfWeekInMonth(1, MONDAY));
+        assertNotNull(TemporalAdjusters.dayOfWeekInMonth(1, MONDAY));
     }
 
     @Test(expectedExceptions=NullPointerException.class)
     public void factory_dayOfWeekInMonth_nullDayOfWeek() {
-        TemporalAdjuster.dayOfWeekInMonth(1, null);
+        TemporalAdjusters.dayOfWeekInMonth(1, null);
     }
 
     @DataProvider(name = "dayOfWeekInMonth_positive")
@@ -338,7 +339,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.dayOfWeekInMonth(ordinal, dow).adjustInto(date);
                 assertEquals(test, expected.plusWeeks(ordinal - 1));
             }
         }
@@ -366,7 +367,7 @@
     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);
+            LocalDate test = (LocalDate) TemporalAdjusters.dayOfWeekInMonth(0, dow).adjustInto(date);
             assertEquals(test, expected);
         }
     }
@@ -394,7 +395,7 @@
         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);
+                LocalDate test = (LocalDate) TemporalAdjusters.dayOfWeekInMonth(-1 - ordinal, dow).adjustInto(date);
                 assertEquals(test, expected.minusWeeks(ordinal));
             }
         }
@@ -405,19 +406,19 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_firstInMonth() {
-        assertNotNull(TemporalAdjuster.firstInMonth(MONDAY));
+        assertNotNull(TemporalAdjusters.firstInMonth(MONDAY));
     }
 
     @Test(expectedExceptions=NullPointerException.class)
     public void factory_firstInMonth_nullDayOfWeek() {
-        TemporalAdjuster.firstInMonth(null);
+        TemporalAdjusters.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);
+            LocalDate test = (LocalDate) TemporalAdjusters.firstInMonth(dow).adjustInto(date);
             assertEquals(test, expected, "day-of-month=" + day);
         }
     }
@@ -427,19 +428,19 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_lastInMonth() {
-        assertNotNull(TemporalAdjuster.lastInMonth(MONDAY));
+        assertNotNull(TemporalAdjusters.lastInMonth(MONDAY));
     }
 
     @Test(expectedExceptions=NullPointerException.class)
     public void factory_lastInMonth_nullDayOfWeek() {
-        TemporalAdjuster.lastInMonth(null);
+        TemporalAdjusters.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);
+            LocalDate test = (LocalDate) TemporalAdjusters.lastInMonth(dow).adjustInto(date);
             assertEquals(test, expected, "day-of-month=" + day);
         }
     }
@@ -449,12 +450,12 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_next() {
-        assertNotNull(TemporalAdjuster.next(MONDAY));
+        assertNotNull(TemporalAdjusters.next(MONDAY));
     }
 
     @Test(expectedExceptions = NullPointerException.class)
     public void factory_next_nullDayOfWeek() {
-        TemporalAdjuster.next(null);
+        TemporalAdjusters.next(null);
     }
 
     @Test
@@ -464,7 +465,7 @@
                 LocalDate date = date(2007, month, i);
 
                 for (DayOfWeek dow : DayOfWeek.values()) {
-                    LocalDate test = (LocalDate) TemporalAdjuster.next(dow).adjustInto(date);
+                    LocalDate test = (LocalDate) TemporalAdjusters.next(dow).adjustInto(date);
 
                     assertSame(test.getDayOfWeek(), dow, date + " " + test);
 
@@ -488,12 +489,12 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_nextOrCurrent() {
-        assertNotNull(TemporalAdjuster.nextOrSame(MONDAY));
+        assertNotNull(TemporalAdjusters.nextOrSame(MONDAY));
     }
 
     @Test(expectedExceptions = NullPointerException.class)
     public void factory_nextOrCurrent_nullDayOfWeek() {
-        TemporalAdjuster.nextOrSame(null);
+        TemporalAdjusters.nextOrSame(null);
     }
 
     @Test
@@ -503,7 +504,7 @@
                 LocalDate date = date(2007, month, i);
 
                 for (DayOfWeek dow : DayOfWeek.values()) {
-                    LocalDate test = (LocalDate) TemporalAdjuster.nextOrSame(dow).adjustInto(date);
+                    LocalDate test = (LocalDate) TemporalAdjusters.nextOrSame(dow).adjustInto(date);
 
                     assertSame(test.getDayOfWeek(), dow);
 
@@ -529,12 +530,12 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_previous() {
-        assertNotNull(TemporalAdjuster.previous(MONDAY));
+        assertNotNull(TemporalAdjusters.previous(MONDAY));
     }
 
     @Test(expectedExceptions = NullPointerException.class)
     public void factory_previous_nullDayOfWeek() {
-        TemporalAdjuster.previous(null);
+        TemporalAdjusters.previous(null);
     }
 
     @Test
@@ -544,7 +545,7 @@
                 LocalDate date = date(2007, month, i);
 
                 for (DayOfWeek dow : DayOfWeek.values()) {
-                    LocalDate test = (LocalDate) TemporalAdjuster.previous(dow).adjustInto(date);
+                    LocalDate test = (LocalDate) TemporalAdjusters.previous(dow).adjustInto(date);
 
                     assertSame(test.getDayOfWeek(), dow, date + " " + test);
 
@@ -568,12 +569,12 @@
     //-----------------------------------------------------------------------
     @Test
     public void factory_previousOrCurrent() {
-        assertNotNull(TemporalAdjuster.previousOrSame(MONDAY));
+        assertNotNull(TemporalAdjusters.previousOrSame(MONDAY));
     }
 
     @Test(expectedExceptions = NullPointerException.class)
     public void factory_previousOrCurrent_nullDayOfWeek() {
-        TemporalAdjuster.previousOrSame(null);
+        TemporalAdjusters.previousOrSame(null);
     }
 
     @Test
@@ -583,7 +584,7 @@
                 LocalDate date = date(2007, month, i);
 
                 for (DayOfWeek dow : DayOfWeek.values()) {
-                    LocalDate test = (LocalDate) TemporalAdjuster.previousOrSame(dow).adjustInto(date);
+                    LocalDate test = (LocalDate) TemporalAdjusters.previousOrSame(dow).adjustInto(date);
 
                     assertSame(test.getDayOfWeek(), dow);
 
--- a/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java	Wed Oct 30 18:38:20 2013 +0000
@@ -60,7 +60,7 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAdjusters;
 import java.time.temporal.ValueRange;
 import java.time.temporal.WeekFields;
 import java.util.Locale;
@@ -357,12 +357,12 @@
     @Test
     public void test_temporalDayAdjustments() {
         HijrahDate date = HijrahDate.of(1554, 7, 21);
-        assertEquals(date.with(TemporalAdjuster.firstDayOfMonth()), HijrahDate.of(1554, 7, 1));
-        assertEquals(date.with(TemporalAdjuster.lastDayOfMonth()), HijrahDate.of(1554, 7, 29));
-        assertEquals(date.with(TemporalAdjuster.firstDayOfNextMonth()), HijrahDate.of(1554, 8, 1));
-        assertEquals(date.with(TemporalAdjuster.firstDayOfNextYear()), HijrahDate.of(1555, 1, 1));
-        assertEquals(date.with(TemporalAdjuster.firstDayOfYear()), HijrahDate.of(1554, 1, 1));
-        assertEquals(date.with(TemporalAdjuster.lastDayOfYear()), HijrahDate.of(1554, 12, 30));
+        assertEquals(date.with(TemporalAdjusters.firstDayOfMonth()), HijrahDate.of(1554, 7, 1));
+        assertEquals(date.with(TemporalAdjusters.lastDayOfMonth()), HijrahDate.of(1554, 7, 29));
+        assertEquals(date.with(TemporalAdjusters.firstDayOfNextMonth()), HijrahDate.of(1554, 8, 1));
+        assertEquals(date.with(TemporalAdjusters.firstDayOfNextYear()), HijrahDate.of(1555, 1, 1));
+        assertEquals(date.with(TemporalAdjusters.firstDayOfYear()), HijrahDate.of(1554, 1, 1));
+        assertEquals(date.with(TemporalAdjusters.lastDayOfYear()), HijrahDate.of(1554, 12, 30));
     }
 
     // Data provider for string representation of the date instances
@@ -412,7 +412,7 @@
     @Test(dataProvider="monthDays")
     public void test_lastDayOfMonth(int year, int month, int numDays) {
         HijrahDate hDate = HijrahChronology.INSTANCE.date(year, month, 1);
-        hDate = hDate.with(TemporalAdjuster.lastDayOfMonth());
+        hDate = hDate.with(TemporalAdjusters.lastDayOfMonth());
         assertEquals(hDate.get(ChronoField.DAY_OF_MONTH), numDays);
     }
 
--- a/test/java/time/test/java/time/format/TestCharLiteralParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/test/java/time/format/TestCharLiteralParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -66,7 +66,7 @@
 
 import java.text.ParsePosition;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -111,8 +111,8 @@
         } else {
             assertEquals(ppos.getIndex(), expectedPos);
             assertEquals(parsed.isSupported(YEAR), false);
-            assertEquals(parsed.query(TemporalQuery.chronology()), null);
-            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
+            assertEquals(parsed.query(TemporalQueries.chronology()), null);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), null);
         }
     }
 
--- a/test/java/time/test/java/time/format/TestNonIsoFormatter.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/test/java/time/format/TestNonIsoFormatter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -39,7 +39,7 @@
 import java.time.format.FormatStyle;
 import java.time.format.TextStyle;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 import java.util.Locale;
 
 import org.testng.annotations.BeforeMethod;
@@ -163,7 +163,7 @@
         String text = dtf.format(chrono.dateNow());
         assertEquals(text, expected);
         TemporalAccessor ta = dtf.parse(text);
-        Chronology cal = ta.query(TemporalQuery.chronology());
+        Chronology cal = ta.query(TemporalQueries.chronology());
         assertEquals(cal, chrono);
     }
 }
--- a/test/java/time/test/java/time/format/TestNumberParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/test/java/time/format/TestNumberParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -72,7 +72,7 @@
 import java.time.format.SignStyle;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -178,8 +178,8 @@
             assertTrue(subsequentWidth >= 0);
             assertEquals(ppos.getIndex(), expectedPos + subsequentWidth);
             assertEquals(parsed.getLong(DAY_OF_MONTH), expectedValue);
-            assertEquals(parsed.query(TemporalQuery.chronology()), null);
-            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
+            assertEquals(parsed.query(TemporalQueries.chronology()), null);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), null);
         }
     }
 
@@ -198,8 +198,8 @@
             assertTrue(subsequentWidth >= 0);
             assertEquals(ppos.getIndex(), expectedPos + subsequentWidth);
             assertEquals(parsed.getLong(DAY_OF_WEEK), expectedValue);
-            assertEquals(parsed.query(TemporalQuery.chronology()), null);
-            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
+            assertEquals(parsed.query(TemporalQueries.chronology()), null);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), null);
         }
     }
 
@@ -313,8 +313,8 @@
         } else {
             assertEquals(pos.getIndex(), parseLen);
             assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal);
-            assertEquals(parsed.query(TemporalQuery.chronology()), null);
-            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
+            assertEquals(parsed.query(TemporalQueries.chronology()), null);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), null);
         }
     }
 
@@ -423,8 +423,8 @@
         } else {
             assertEquals(pos.getIndex(), parseLen);
             assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal);
-            assertEquals(parsed.query(TemporalQuery.chronology()), null);
-            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
+            assertEquals(parsed.query(TemporalQueries.chronology()), null);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), null);
         }
     }
 
@@ -514,8 +514,8 @@
         } else {
             assertEquals(pos.getIndex(), parseLen);
             assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal);
-            assertEquals(parsed.query(TemporalQuery.chronology()), null);
-            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
+            assertEquals(parsed.query(TemporalQueries.chronology()), null);
+            assertEquals(parsed.query(TemporalQueries.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(TemporalQuery.chronology()), null);
-            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
+            assertEquals(parsed.query(TemporalQueries.chronology()), null);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), null);
         }
     }
 
--- a/test/java/time/test/java/time/format/TestReducedParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/test/java/time/format/TestReducedParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -78,10 +78,12 @@
 import java.time.chrono.JapaneseChronology;
 import java.time.chrono.MinguoChronology;
 import java.time.chrono.ThaiBuddhistChronology;
+import java.time.chrono.ThaiBuddhistDate;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -443,6 +445,52 @@
 
     }
 
+    @Test
+    public void test_reducedWithLateChronoChange() {
+        ThaiBuddhistDate date = ThaiBuddhistDate.of(2543, 1, 1);
+        DateTimeFormatter df
+                = new DateTimeFormatterBuilder()
+                        .appendValueReduced(YEAR, 2, 2, LocalDate.of(2000, 1, 1))
+                        .appendLiteral(" ")
+                        .appendChronologyId()
+                .toFormatter();
+        int expected = date.get(YEAR);
+        String input = df.format(date);
+
+        ParsePosition pos = new ParsePosition(0);
+        TemporalAccessor parsed = df.parseUnresolved(input, pos);
+        assertEquals(pos.getIndex(), input.length(), "Input not parsed completely");
+        assertEquals(pos.getErrorIndex(), -1, "Error index should be -1 (no-error)");
+        int actual = parsed.get(YEAR);
+        assertEquals(actual, expected,
+                String.format("Wrong date parsed, chrono: %s, input: %s",
+                parsed.query(TemporalQueries.chronology()), input));
+
+    }
+
+    @Test
+    public void test_reducedWithLateChronoChangeTwice() {
+        DateTimeFormatter df
+                = new DateTimeFormatterBuilder()
+                        .appendValueReduced(YEAR, 2, 2, LocalDate.of(2000, 1, 1))
+                        .appendLiteral(" ")
+                        .appendChronologyId()
+                        .appendLiteral(" ")
+                        .appendChronologyId()
+                .toFormatter();
+        int expected = 2044;
+        String input = "44 ThaiBuddhist ISO";
+        ParsePosition pos = new ParsePosition(0);
+        TemporalAccessor parsed = df.parseUnresolved(input, pos);
+        assertEquals(pos.getIndex(), input.length(), "Input not parsed completely: " + pos);
+        assertEquals(pos.getErrorIndex(), -1, "Error index should be -1 (no-error)");
+        int actual = parsed.get(YEAR);
+        assertEquals(actual, expected,
+                String.format("Wrong date parsed, chrono: %s, input: %s",
+                parsed.query(TemporalQueries.chronology()), input));
+
+    }
+
     //-----------------------------------------------------------------------
     // Class to structure the test data
     //-----------------------------------------------------------------------
--- a/test/java/time/test/java/time/format/TestStringLiteralParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/test/java/time/format/TestStringLiteralParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -66,7 +66,7 @@
 
 import java.text.ParsePosition;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -114,8 +114,8 @@
         } else {
             assertEquals(ppos.getIndex(), expectedPos);
             assertEquals(parsed.isSupported(YEAR), false);
-            assertEquals(parsed.query(TemporalQuery.chronology()), null);
-            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
+            assertEquals(parsed.query(TemporalQueries.chronology()), null);
+            assertEquals(parsed.query(TemporalQueries.zoneId()), null);
         }
     }
 
--- a/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -33,7 +33,7 @@
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.TextStyle;
 import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 import java.time.zone.ZoneRulesProvider;
 import java.util.Arrays;
 import java.util.Date;
@@ -112,13 +112,13 @@
     }
 
     private static Set<ZoneId> preferred = new HashSet<>(Arrays.asList(new ZoneId[] {
-        ZoneId.of("EST"),
+        ZoneId.of("EST", ZoneId.SHORT_IDS),
         ZoneId.of("Asia/Taipei"),
         ZoneId.of("CET"),
     }));
 
     private static Set<ZoneId> preferred_s = new HashSet<>(Arrays.asList(new ZoneId[] {
-         ZoneId.of("EST"),
+         ZoneId.of("EST", ZoneId.SHORT_IDS),
          ZoneId.of("CET"),
          ZoneId.of("Australia/South"),
          ZoneId.of("Australia/West"),
@@ -131,7 +131,7 @@
     Object[][] data_preferredZones() {
         return new Object[][] {
             {"America/New_York", "Eastern Standard Time", none,      Locale.ENGLISH, TextStyle.FULL},
-            {"EST",              "Eastern Standard Time", preferred, Locale.ENGLISH, TextStyle.FULL},
+//          {"EST",              "Eastern Standard Time", preferred, Locale.ENGLISH, TextStyle.FULL},
             {"Europe/Paris",     "Central European Time", none,      Locale.ENGLISH, TextStyle.FULL},
             {"CET",              "Central European Time", preferred, Locale.ENGLISH, TextStyle.FULL},
             {"Asia/Shanghai",    "China Standard Time",   none,      Locale.ENGLISH, TextStyle.FULL},
@@ -150,7 +150,7 @@
                                                               .toFormatter(locale)
                                                               .withDecimalStyle(DecimalStyle.of(locale));
 
-        String ret = fmt.parse(text, TemporalQuery.zone()).getId();
+        String ret = fmt.parse(text, TemporalQueries.zone()).getId();
 
         System.out.printf("[%-5s %s] %24s -> %s(%s)%n",
                           locale.toString(),
@@ -186,7 +186,7 @@
         if (ci) {
             text = text.toUpperCase();
         }
-        String ret = fmt.parse(text, TemporalQuery.zone()).getId();
+        String ret = fmt.parse(text, TemporalQueries.zone()).getId();
         // TBD: need an excluding list
         // assertEquals(...);
         if (ret.equals(expected) ||
--- a/test/java/time/test/java/util/TestFormatter.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/time/test/java/util/TestFormatter.java	Wed Oct 30 18:38:20 2013 +0000
@@ -36,7 +36,7 @@
 import java.time.chrono.Chronology;
 
 import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalAccessor;
 
 import java.util.*;
@@ -134,7 +134,7 @@
         Class<?> c = o.getClass();
         String clname = c.getName().substring(c.getPackage().getName().length() + 1);
         if (o instanceof TemporalAccessor) {
-            Chronology chrono = ((TemporalAccessor)o).query(TemporalQuery.chronology());
+            Chronology chrono = ((TemporalAccessor)o).query(TemporalQueries.chronology());
             if (chrono != null) {
                 clname = clname + "(" + chrono.getId() + ")";
             }
--- a/test/java/util/Base64/Base64GetEncoderTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/Base64/Base64GetEncoderTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -41,7 +41,7 @@
 public class Base64GetEncoderTest {
 
     public static void main(String args[]) throws Throwable {
-        final Base64.Encoder encoder = Base64.getEncoder(0, "$$$".getBytes(US_ASCII));
+        final Base64.Encoder encoder = Base64.getMimeEncoder(0, "$$$".getBytes(US_ASCII));
 
         testEncodeToString(encoder);
 
--- a/test/java/util/Base64/TestBase64.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/Base64/TestBase64.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,7 +23,7 @@
 
 /**
  * @test 4235519 8004212 8005394 8007298 8006295 8006315 8006530 8007379 8008925
- *       8014217
+ *       8014217 8025003
  * @summary tests java.util.Base64
  */
 
@@ -60,13 +60,13 @@
         byte[] nl_3 = new byte[] {'\n', '\r', '\n'};
         for (int i = 0; i < 10; i++) {
             int len = rnd.nextInt(200) + 4;
-            test(Base64.getEncoder(len, nl_1),
+            test(Base64.getMimeEncoder(len, nl_1),
                  Base64.getMimeDecoder(),
                  numRuns, numBytes);
-            test(Base64.getEncoder(len, nl_2),
+            test(Base64.getMimeEncoder(len, nl_2),
                  Base64.getMimeDecoder(),
                  numRuns, numBytes);
-            test(Base64.getEncoder(len, nl_3),
+            test(Base64.getMimeEncoder(len, nl_3),
                  Base64.getMimeDecoder(),
                  numRuns, numBytes);
         }
@@ -74,16 +74,16 @@
         testNull(Base64.getEncoder());
         testNull(Base64.getUrlEncoder());
         testNull(Base64.getMimeEncoder());
-        testNull(Base64.getEncoder(10, new byte[]{'\n'}));
+        testNull(Base64.getMimeEncoder(10, new byte[]{'\n'}));
         testNull(Base64.getDecoder());
         testNull(Base64.getUrlDecoder());
         testNull(Base64.getMimeDecoder());
-        checkNull(new Runnable() { public void run() { Base64.getEncoder(10, null); }});
+        checkNull(new Runnable() { public void run() { Base64.getMimeEncoder(10, null); }});
 
         testIOE(Base64.getEncoder());
         testIOE(Base64.getUrlEncoder());
         testIOE(Base64.getMimeEncoder());
-        testIOE(Base64.getEncoder(10, new byte[]{'\n'}));
+        testIOE(Base64.getMimeEncoder(10, new byte[]{'\n'}));
 
         byte[] src = new byte[1024];
         new Random().nextBytes(src);
@@ -93,7 +93,7 @@
         testIOE(Base64.getUrlDecoder(), Base64.getUrlEncoder().encode(src));
 
         // illegal line separator
-        checkIAE(new Runnable() { public void run() { Base64.getEncoder(10, new byte[]{'\r', 'N'}); }});
+        checkIAE(new Runnable() { public void run() { Base64.getMimeEncoder(10, new byte[]{'\r', 'N'}); }});
 
         // illegal base64 character
         decoded[2] = (byte)0xe0;
@@ -109,8 +109,6 @@
             Base64.getDecoder().decode(ByteBuffer.wrap(decoded), ByteBuffer.allocateDirect(1024)); }});
 
         // illegal ending unit
-        checkIAE(new Runnable() { public void run() { Base64.getMimeDecoder().decode("$=#"); }});
-
         checkIOE(new Testable() { public void test() throws IOException {
                                      byte[] bytes = "AA=".getBytes("ASCII");
                                      try (InputStream stream =
@@ -129,6 +127,10 @@
         testDecodeUnpadded();
         // test mime decoding with ignored character after padding
         testDecodeIgnoredAfterPadding();
+
+        // lenient mode for ending unit
+        testLenientPadding();
+
     }
 
     private static sun.misc.BASE64Encoder sunmisc = new sun.misc.BASE64Encoder();
@@ -436,6 +438,48 @@
         }
     }
 
+    private static void testLenientPadding() throws Throwable {
+        String[] data = new String[] {
+            "=",         "",        // unnecessary padding
+            "QUJD=",     "ABC",     //"ABC".encode() -> "QUJD"
+
+            "QQ=",       "A",       // incomplete padding
+            "QQ=N",      "A",       // incorrect padding
+            "QQ=?",      "A",
+            "QUJDQQ=",   "ABCA",
+            "QUJDQQ=N",  "ABCA",
+            "QUJDQQ=?",  "ABCA",
+
+            "QUI=X",     "AB",      // incorrect padding
+            "QUI=?",     "AB",      // incorrect padding
+        };
+        Base64.Decoder dec = Base64.getMimeDecoder();
+
+        for (int i = 0; i < data.length; i += 2) {
+            byte[] src = data[i].getBytes("ASCII");
+            byte[] expected = data[i + 1].getBytes("ASCII");
+            // decode(byte[])
+            byte[] ret = dec.decode(src);
+            checkEqual(ret, expected, "lenient padding decoding failed!");
+
+            // decode(String)
+            ret = dec.decode(data[i]);
+            checkEqual(ret, expected, "lenient padding decoding failed!");
+
+            // decode(ByteBuffer)
+            ByteBuffer srcBB = ByteBuffer.wrap(src);
+            ByteBuffer retBB = dec.decode(srcBB);
+            checkEqual(srcBB.remaining(), 0, "lenient padding decoding failed!");
+            checkEqual(Arrays.copyOf(retBB.array(), retBB.remaining()),
+                       expected, "lenient padding decoding failed!");
+
+            // wrap.decode(byte[])
+            ret = new byte[10];
+            int n = dec.wrap(new ByteArrayInputStream(src)).read(ret);
+            checkEqual(Arrays.copyOf(ret, n), expected, "lenient padding decoding failed!");
+        }
+    }
+
     private static void  testDecodeUnpadded() throws Throwable {
         byte[] srcA = new byte[] { 'Q', 'Q' };
         byte[] srcAA = new byte[] { 'Q', 'Q', 'E'};
--- a/test/java/util/Base64/TestBase64Golden.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/Base64/TestBase64Golden.java	Wed Oct 30 18:38:20 2013 +0000
@@ -230,7 +230,7 @@
             46, -97, -35, -44, 127, -60, -39, -4, -112, 34, -57, 47, -14, 67,
             40, 18, 90, -59, 68, 112, 23, 121, -91, 94, 35, 49, 104, 17, 30,
             -80, -104, -3, -53, 27, 38, -72, -47, 113, -52, 18, 5, -126 };
-        Encoder encoder = Base64.getEncoder(49, new byte[] { 0x7e });
+        Encoder encoder = Base64.getMimeEncoder(49, new byte[] { 0x7e });
         byte[] encoded = encoder.encode(src);
         Decoder decoder = Base64.getMimeDecoder();
         byte[] decoded = decoder.decode(encoded);
--- a/test/java/util/Calendar/JavatimeTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/Calendar/JavatimeTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -114,14 +114,14 @@
                 zidStr.equals("MST")) {
                 continue;
             }
-            ZoneId zid = ZoneId.of(zidStr, ZoneId.OLD_SHORT_IDS);
+            ZoneId zid = ZoneId.of(zidStr, ZoneId.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_SHORT_IDS.containsKey(zidStr) &&
+                !ZoneId.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/Locale/Bug8025703.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,71 @@
+/*
+ * 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 8025703
+ * @summary Verify implementation for Locale matching.
+ * @run main Bug8025703
+ */
+
+import java.util.*;
+import java.util.Locale.LanguageRange;
+
+public class Bug8025703 {
+
+    public static void main(String[] args) {
+        boolean err = false;
+
+        String[][] mappings = {{"ilw", "gal"},
+                               {"meg", "cir"},
+                               {"pcr", "adx"},
+                               {"xia", "acn"},
+                               {"yos", "zom"}};
+
+        for (int i = 0; i < mappings.length; i++) {
+            List<LanguageRange> got = LanguageRange.parse(mappings[i][0]);
+            ArrayList<LanguageRange> expected = new ArrayList<>();
+            expected.add(new LanguageRange(mappings[i][0], 1.0));
+            expected.add(new LanguageRange(mappings[i][1], 1.0));
+
+            if (!expected.equals(got)) {
+                err = true;
+                System.err.println("Incorrect language ranges. ");
+                for (LanguageRange lr : expected) {
+                    System.err.println("  Expected: range="
+                        + lr.getRange() + ", weight=" + lr.getWeight());
+                }
+                for (LanguageRange lr : got) {
+                    System.err.println("  Got:      range="
+                        + lr.getRange() + ", weight=" + lr.getWeight());
+                }
+            }
+        }
+
+        if (err) {
+            throw new RuntimeException("Failed.");
+        }
+    }
+
+}
+
--- a/test/java/util/Locale/tools/language-subtag-registry.txt	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/Locale/tools/language-subtag-registry.txt	Wed Oct 30 18:38:20 2013 +0000
@@ -1,4 +1,4 @@
-File-Date: 2012-09-04
+File-Date: 2013-09-23
 %%
 Type: language
 Subtag: aa
@@ -3103,7 +3103,7 @@
 %%
 Type: language
 Subtag: asj
-Description: Nsari
+Description: Sari
 Added: 2009-07-29
 %%
 Type: language
@@ -3622,13 +3622,18 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: axl
+Description: Lower Southern Aranda
+Added: 2013-09-10
+%%
+Type: language
 Subtag: axm
 Description: Middle Armenian
 Added: 2009-07-29
 %%
 Type: language
 Subtag: axx
-Description: Xaragure
+Description: Xârâgurè
 Added: 2009-07-29
 %%
 Type: language
@@ -5021,6 +5026,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: bjp
+Description: Fanamaket
+Added: 2013-09-10
+%%
+Type: language
 Subtag: bjq
 Description: Southern Betsimisaraka Malagasy
 Added: 2009-07-29
@@ -5705,7 +5715,7 @@
 %%
 Type: language
 Subtag: bpa
-Description: Dakaka
+Description: Daakaka
 Added: 2009-07-29
 %%
 Type: language
@@ -5741,6 +5751,7 @@
 Type: language
 Subtag: bpk
 Description: Orowe
+Description: 'Ôrôê
 Added: 2009-07-29
 %%
 Type: language
@@ -5831,6 +5842,7 @@
 Type: language
 Subtag: bqc
 Description: Boko (Benin)
+Description: Boo
 Added: 2009-07-29
 %%
 Type: language
@@ -6523,6 +6535,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: bvp
+Description: Bumang
+Added: 2013-09-10
+%%
+Type: language
 Subtag: bvq
 Description: Birri
 Added: 2009-07-29
@@ -6696,7 +6713,7 @@
 %%
 Type: language
 Subtag: bxa
-Description: Bauro
+Description: Tairaha
 Added: 2009-07-29
 %%
 Type: language
@@ -6722,7 +6739,9 @@
 Type: language
 Subtag: bxf
 Description: Bilur
-Added: 2009-07-29
+Description: Minigir
+Added: 2009-07-29
+Comments: see also vmg
 %%
 Type: language
 Subtag: bxg
@@ -7054,7 +7073,7 @@
 %%
 Type: language
 Subtag: bzv
-Description: Bebe
+Description: Naami
 Added: 2009-07-29
 %%
 Type: language
@@ -7700,6 +7719,8 @@
 Type: language
 Subtag: cir
 Description: Tiri
+Description: Haméa
+Description: Méa
 Added: 2009-07-29
 %%
 Type: language
@@ -7805,6 +7826,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: ckn
+Description: Kaang Chin
+Added: 2013-09-10
+%%
+Type: language
 Subtag: cko
 Description: Anufo
 Added: 2009-07-29
@@ -8229,6 +8255,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: cpo
+Description: Kpeego
+Added: 2013-09-10
+%%
+Type: language
 Subtag: cpp
 Description: Portuguese-based creoles and pidgins
 Added: 2005-10-16
@@ -8441,6 +8472,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: csj
+Description: Songlai Chin
+Added: 2013-09-10
+%%
+Type: language
 Subtag: csk
 Description: Jola-Kasa
 Added: 2009-07-29
@@ -8800,6 +8836,8 @@
 Subtag: daf
 Description: Dan
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see dnj, lda
 %%
 Type: language
 Subtag: dag
@@ -8897,7 +8935,7 @@
 %%
 Type: language
 Subtag: dba
-Description: Bangi Me
+Description: Bangime
 Added: 2009-07-29
 %%
 Type: language
@@ -9221,7 +9259,7 @@
 %%
 Type: language
 Subtag: dgt
-Description: Ndrag'ngith
+Description: Ndra'ngith
 Added: 2012-08-12
 %%
 Type: language
@@ -9258,6 +9296,7 @@
 %%
 Type: language
 Subtag: dhg
+Description: Djangu
 Description: Dhangu
 Added: 2009-07-29
 %%
@@ -9304,6 +9343,7 @@
 Type: language
 Subtag: dhv
 Description: Dehu
+Description: Drehu
 Added: 2009-07-29
 %%
 Type: language
@@ -9312,6 +9352,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: dhx
+Description: Dhungaloo
+Added: 2013-09-10
+%%
+Type: language
 Subtag: dia
 Description: Dia
 Added: 2009-07-29
@@ -9489,6 +9534,8 @@
 Subtag: djl
 Description: Djiwarli
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see dze, iin
 %%
 Type: language
 Subtag: djm
@@ -9559,6 +9606,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: dlk
+Description: Dahalik
+Added: 2013-09-10
+%%
+Type: language
 Subtag: dlm
 Description: Dalmatian
 Added: 2009-07-29
@@ -9580,7 +9632,7 @@
 %%
 Type: language
 Subtag: dmc
-Description: Dimir
+Description: Gavak
 Added: 2009-07-29
 %%
 Type: language
@@ -9646,6 +9698,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: dmw
+Description: Mudburra
+Added: 2013-09-10
+%%
+Type: language
 Subtag: dmx
 Description: Dema
 Added: 2009-07-29
@@ -9682,6 +9739,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: dnj
+Description: Dan
+Added: 2013-09-10
+%%
+Type: language
 Subtag: dnk
 Description: Dengka
 Added: 2009-07-29
@@ -10067,6 +10129,7 @@
 Type: language
 Subtag: duf
 Description: Dumbea
+Description: Drubea
 Added: 2009-07-29
 %%
 Type: language
@@ -10259,6 +10322,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: dze
+Description: Djiwarli
+Added: 2013-09-10
+%%
+Type: language
 Subtag: dzg
 Description: Dazaga
 Added: 2009-07-29
@@ -10274,6 +10342,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: eaa
+Description: Karenggapa
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ebg
 Description: Ebughu
 Added: 2009-07-29
@@ -10392,6 +10465,11 @@
 Added: 2005-10-16
 %%
 Type: language
+Subtag: ekc
+Description: Eastern Karnic
+Added: 2013-09-10
+%%
+Type: language
 Subtag: eke
 Description: Ekit
 Added: 2009-07-29
@@ -10859,6 +10937,11 @@
 Macrolanguage: kln
 %%
 Type: language
+Subtag: eza
+Description: Ezaa
+Added: 2013-09-10
+%%
+Type: language
 Subtag: eze
 Description: Uzekwe
 Added: 2009-07-29
@@ -10870,7 +10953,7 @@
 %%
 Type: language
 Subtag: fab
-Description: Fa D'ambu
+Description: Fa d'Ambu
 Added: 2009-07-29
 %%
 Type: language
@@ -11374,7 +11457,7 @@
 %%
 Type: language
 Subtag: gal
-Description: Galoli
+Description: Galolen
 Added: 2009-07-29
 %%
 Type: language
@@ -11564,6 +11647,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: gbw
+Description: Gabi-Gabi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: gbx
 Description: Eastern Xwla Gbe
 Added: 2009-07-29
@@ -11710,6 +11798,11 @@
 Added: 2012-08-12
 %%
 Type: language
+Subtag: gdt
+Description: Kungardutyi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: gdu
 Description: Gudu
 Added: 2009-07-29
@@ -11872,6 +11965,8 @@
 Subtag: ggr
 Description: Aghu Tharnggalu
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see ggm, gtu, ikr
 %%
 Type: language
 Subtag: ggt
@@ -11881,6 +11976,7 @@
 Type: language
 Subtag: ggu
 Description: Gagu
+Description: Gban
 Added: 2009-07-29
 %%
 Type: language
@@ -11970,6 +12066,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: gih
+Description: Githabul
+Added: 2013-09-10
+%%
+Type: language
 Subtag: gil
 Description: Gilbertese
 Added: 2005-10-16
@@ -12052,6 +12153,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: gjm
+Description: Gunditjmara
+Added: 2013-09-10
+%%
+Type: language
 Subtag: gjn
 Description: Gonja
 Added: 2009-07-29
@@ -12119,6 +12225,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: gll
+Description: Garlali
+Added: 2013-09-10
+%%
+Type: language
 Subtag: glo
 Description: Galambu
 Added: 2009-07-29
@@ -12218,6 +12329,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: gmz
+Description: Mgbolizhia
+Added: 2013-09-10
+%%
+Type: language
 Subtag: gna
 Description: Kaansa
 Added: 2009-07-29
@@ -12651,6 +12767,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: gtu
+Description: Aghu-Tharnggala
+Added: 2013-09-10
+%%
+Type: language
 Subtag: gua
 Description: Shiki
 Added: 2009-07-29
@@ -13703,6 +13824,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: hrc
+Description: Niwer Mil
+Added: 2013-09-10
+%%
+Type: language
 Subtag: hre
 Description: Hre
 Added: 2009-07-29
@@ -13724,6 +13850,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: hrp
+Description: Nhirrpi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: hrr
 Description: Horuru
 Added: 2009-07-29
@@ -13741,6 +13872,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: hrw
+Description: Warwar Feni
+Added: 2013-09-10
+%%
+Type: language
 Subtag: hrx
 Description: Hunsrik
 Added: 2009-07-29
@@ -13957,6 +14093,7 @@
 Type: language
 Subtag: hwc
 Description: Hawai'i Creole English
+Description: Hawai'i Pidgin
 Added: 2009-07-29
 %%
 Type: language
@@ -14092,6 +14229,7 @@
 Type: language
 Subtag: idc
 Description: Idon
+Description: Ajiya
 Added: 2009-07-29
 %%
 Type: language
@@ -14236,6 +14374,11 @@
 Added: 2012-08-12
 %%
 Type: language
+Subtag: iin
+Description: Thiin
+Added: 2013-09-10
+%%
+Type: language
 Subtag: iir
 Description: Indo-Iranian languages
 Added: 2009-07-29
@@ -14304,6 +14447,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: ikr
+Description: Ikaranggal
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ikt
 Description: Inuinnaqtun
 Description: Western Canadian Inuktitut
@@ -14384,6 +14532,8 @@
 Subtag: ilw
 Description: Talur
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Preferred-Value: gal
 %%
 Type: language
 Subtag: ima
@@ -14533,6 +14683,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: iqw
+Description: Ikwo
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ira
 Description: Iranian languages
 Added: 2005-10-16
@@ -14809,6 +14964,8 @@
 Subtag: izi
 Description: Izi-Ezaa-Ikwo-Mgbo
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see eza, gmz, iqw, izz
 %%
 Type: language
 Subtag: izr
@@ -14816,6 +14973,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: izz
+Description: Izii
+Added: 2013-09-10
+%%
+Type: language
 Subtag: jaa
 Description: Jamamadí
 Added: 2009-07-29
@@ -14932,6 +15094,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: jbi
+Description: Badjiri
+Added: 2013-09-10
+%%
+Type: language
 Subtag: jbj
 Description: Arandai
 Added: 2009-07-29
@@ -15902,7 +16069,8 @@
 %%
 Type: language
 Subtag: kdk
-Description: Numee
+Description: Numèè
+Description: Kwényi
 Added: 2009-07-29
 %%
 Type: language
@@ -19073,8 +19241,6 @@
 Subtag: lcq
 Description: Luhu
 Added: 2009-07-29
-Deprecated: 2012-08-12
-Preferred-Value: ppr
 %%
 Type: language
 Subtag: lcs
@@ -19082,6 +19248,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: lda
+Description: Kla-Dan
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ldb
 Description: DÅ©ya
 Added: 2009-07-29
@@ -19526,6 +19697,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: lja
+Description: Golpa
+Added: 2013-09-10
+%%
+Type: language
 Subtag: lje
 Description: Rampi
 Added: 2009-07-29
@@ -19546,6 +19722,16 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: ljw
+Description: Yirandali
+Added: 2013-09-10
+%%
+Type: language
+Subtag: ljx
+Description: Yuru
+Added: 2013-09-10
+%%
+Type: language
 Subtag: lka
 Description: Lakalei
 Added: 2009-07-29
@@ -19593,6 +19779,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: lkm
+Description: Kalaamaya
+Added: 2013-09-10
+%%
+Type: language
 Subtag: lkn
 Description: Lakon
 Description: Vure
@@ -19623,6 +19814,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: lku
+Description: Kungkari
+Added: 2013-09-10
+%%
+Type: language
 Subtag: lky
 Description: Lokoya
 Added: 2009-07-29
@@ -19914,6 +20110,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: lnw
+Description: Lanima
+Added: 2013-09-10
+%%
+Type: language
 Subtag: lnz
 Description: Lonzo
 Added: 2009-07-29
@@ -20432,6 +20633,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: lwu
+Description: Lawu
+Added: 2013-09-10
+%%
+Type: language
 Subtag: lww
 Description: Lewo
 Added: 2009-07-29
@@ -20526,6 +20732,7 @@
 Type: language
 Subtag: man
 Description: Mandingo
+Description: Manding
 Added: 2005-10-16
 Scope: macrolanguage
 %%
@@ -20990,6 +21197,8 @@
 Subtag: meg
 Description: Mea
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Preferred-Value: cir
 %%
 Type: language
 Subtag: meh
@@ -21065,7 +21274,7 @@
 %%
 Type: language
 Subtag: mev
-Description: Mann
+Description: Mano
 Added: 2009-07-29
 %%
 Type: language
@@ -21117,7 +21326,7 @@
 %%
 Type: language
 Subtag: mfg
-Description: Mixifore
+Description: Mogofin
 Added: 2009-07-29
 %%
 Type: language
@@ -21525,6 +21734,7 @@
 Type: language
 Subtag: mij
 Description: Abar
+Description: Mungbam
 Added: 2009-07-29
 %%
 Type: language
@@ -21871,6 +22081,7 @@
 Subtag: mld
 Description: Malakhel
 Added: 2009-07-29
+Deprecated: 2013-09-10
 %%
 Type: language
 Subtag: mle
@@ -22199,6 +22410,8 @@
 Subtag: mnt
 Description: Maykulan
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see wnn, xyj, xyk, xyt
 %%
 Type: language
 Subtag: mnu
@@ -22996,7 +23209,7 @@
 %%
 Type: language
 Subtag: muc
-Description: Mbu'
+Description: Ajumbu
 Added: 2009-07-29
 %%
 Type: language
@@ -23250,6 +23463,8 @@
 Subtag: mwd
 Description: Mudbura
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see dmw, xrq
 %%
 Type: language
 Subtag: mwe
@@ -23577,6 +23792,7 @@
 Subtag: myq
 Description: Forest Maninka
 Added: 2009-07-29
+Deprecated: 2013-09-10
 Macrolanguage: man
 %%
 Type: language
@@ -23990,6 +24206,8 @@
 Subtag: nbx
 Description: Ngura
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see ekc, gll, jbi, xpt, xwk
 %%
 Type: language
 Subtag: nby
@@ -24428,7 +24646,7 @@
 %%
 Type: language
 Subtag: ngk
-Description: Ngalkbun
+Description: Dalabon
 Added: 2009-07-29
 %%
 Type: language
@@ -25011,9 +25229,16 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: nlq
+Description: Lao Naga
+Added: 2013-09-10
+%%
+Type: language
 Subtag: nlr
 Description: Ngarla
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see nrk, ywg
 %%
 Type: language
 Subtag: nlu
@@ -25026,6 +25251,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: nlw
+Description: Walangama
+Added: 2013-09-10
+%%
+Type: language
 Subtag: nlx
 Description: Nahali
 Added: 2009-07-29
@@ -25348,6 +25578,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: nol
+Description: Nomlaki
+Added: 2013-09-10
+%%
+Type: language
 Subtag: nom
 Description: Nocamán
 Added: 2009-07-29
@@ -25493,6 +25728,11 @@
 Suppress-Script: Nkoo
 %%
 Type: language
+Subtag: nqq
+Description: Kyan-Karyaw Naga
+Added: 2013-09-10
+%%
+Type: language
 Subtag: nqy
 Description: Akyaung Ari Naga
 Added: 2012-08-12
@@ -25528,6 +25768,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: nrk
+Description: Ngarla
+Added: 2013-09-10
+%%
+Type: language
 Subtag: nrl
 Description: Ngarluma
 Added: 2009-07-29
@@ -25550,6 +25795,7 @@
 Type: language
 Subtag: nrr
 Description: Norra
+Description: Nora
 Added: 2009-07-29
 %%
 Type: language
@@ -25701,6 +25947,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: ntg
+Description: Ngantangarra
+Added: 2013-09-10
+%%
+Type: language
 Subtag: nti
 Description: Natioro
 Added: 2009-07-29
@@ -25768,7 +26019,7 @@
 %%
 Type: language
 Subtag: nua
-Description: Yuaga
+Description: Yuanga
 Added: 2009-07-29
 %%
 Type: language
@@ -26517,6 +26768,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: olk
+Description: Olkol
+Added: 2013-09-10
+%%
+Type: language
 Subtag: olm
 Description: Oloma
 Added: 2009-07-29
@@ -27339,6 +27595,8 @@
 Subtag: pcr
 Description: Panang
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Preferred-Value: adx
 %%
 Type: language
 Subtag: pcw
@@ -28086,11 +28344,22 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: pnj
+Description: Pinjarup
+Added: 2013-09-10
+%%
+Type: language
 Subtag: pnk
 Description: Paunaka
 Added: 2012-08-12
 %%
 Type: language
+Subtag: pnl
+Description: Paleni
+Added: 2013-09-10
+Comments: see also wbf
+%%
+Type: language
 Subtag: pnm
 Description: Punan Batu 1
 Added: 2009-07-29
@@ -28219,7 +28488,7 @@
 %%
 Type: language
 Subtag: pop
-Description: Pwapwa
+Description: Pwapwâ
 Added: 2009-07-29
 %%
 Type: language
@@ -28318,6 +28587,8 @@
 Subtag: ppr
 Description: Piru
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Preferred-Value: lcq
 %%
 Type: language
 Subtag: pps
@@ -28758,6 +29029,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: pwi
+Description: Patwin
+Added: 2013-09-10
+%%
+Type: language
 Subtag: pwm
 Description: Molbog
 Added: 2009-07-29
@@ -29532,6 +29808,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: rkw
+Description: Arakwal
+Added: 2013-09-10
+%%
+Type: language
 Subtag: rma
 Description: Rama
 Added: 2009-07-29
@@ -29941,6 +30222,16 @@
 Macrolanguage: mwr
 %%
 Type: language
+Subtag: rxd
+Description: Ngardi
+Added: 2013-09-10
+%%
+Type: language
+Subtag: rxw
+Description: Karuwali
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ryn
 Description: Northern Amami-Oshima
 Added: 2009-07-29
@@ -30840,6 +31131,7 @@
 Type: language
 Subtag: sih
 Description: Zire
+Description: Sîshëë
 Added: 2009-07-29
 %%
 Type: language
@@ -32117,6 +32409,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: sty
+Description: Siberian Tatar
+Added: 2013-09-10
+%%
+Type: language
 Subtag: sua
 Description: Sulka
 Added: 2009-07-29
@@ -32241,6 +32538,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: svm
+Description: Slavomolisano
+Added: 2013-09-10
+%%
+Type: language
 Subtag: svr
 Description: Savara
 Added: 2009-07-29
@@ -33213,6 +33515,8 @@
 Subtag: tgg
 Description: Tangga
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see bjp, hrc, hrw
 %%
 Type: language
 Subtag: tgh
@@ -33570,6 +33874,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: tjw
+Description: Djabwurrung
+Added: 2013-09-10
+%%
+Type: language
 Subtag: tka
 Description: Truká
 Added: 2009-07-29
@@ -34004,7 +34313,7 @@
 %%
 Type: language
 Subtag: tnr
-Description: Bedik
+Description: Ménik
 Added: 2009-07-29
 %%
 Type: language
@@ -35088,7 +35397,7 @@
 %%
 Type: language
 Subtag: tye
-Description: Kyenga
+Description: Kyanga
 Added: 2009-07-29
 %%
 Type: language
@@ -35172,6 +35481,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: tzl
+Description: Talossan
+Added: 2013-09-10
+%%
+Type: language
 Subtag: tzm
 Description: Central Atlas Tamazight
 Added: 2009-07-29
@@ -35409,6 +35723,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: ule
+Description: Lule
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ulf
 Description: Usku
 Description: Afra
@@ -35548,6 +35867,11 @@
 Macrolanguage: del
 %%
 Type: language
+Subtag: unn
+Description: Kurnai
+Added: 2013-09-10
+%%
+Type: language
 Subtag: unp
 Description: Worora
 Added: 2009-07-29
@@ -35560,6 +35884,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: unu
+Description: Unubahe
+Added: 2013-09-10
+%%
+Type: language
 Subtag: unx
 Description: Munda
 Added: 2009-07-29
@@ -35781,6 +36110,7 @@
 Type: language
 Subtag: uve
 Description: West Uvean
+Description: Fagauvea
 Added: 2009-07-29
 %%
 Type: language
@@ -36071,7 +36401,7 @@
 %%
 Type: language
 Subtag: vmb
-Description: Mbabaram
+Description: Barbaram
 Added: 2009-07-29
 %%
 Type: language
@@ -36096,8 +36426,9 @@
 %%
 Type: language
 Subtag: vmg
-Description: Minigir
-Added: 2009-07-29
+Description: Lungalunga
+Added: 2009-07-29
+Comments: see also bxf
 %%
 Type: language
 Subtag: vmh
@@ -36389,6 +36720,7 @@
 Type: language
 Subtag: wax
 Description: Watam
+Description: Marangis
 Added: 2009-07-29
 %%
 Type: language
@@ -36420,6 +36752,7 @@
 Subtag: wbf
 Description: Wara
 Added: 2009-07-29
+Comments: see also pnl
 %%
 Type: language
 Subtag: wbh
@@ -36508,11 +36841,21 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: wdk
+Description: Wadikali
+Added: 2013-09-10
+%%
+Type: language
 Subtag: wdu
 Description: Wadjigu
 Added: 2009-07-29
 %%
 Type: language
+Subtag: wdy
+Description: Wadjabangayi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: wea
 Description: Wewaw
 Added: 2009-07-29
@@ -36528,6 +36871,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: weg
+Description: Wergaia
+Added: 2013-09-10
+%%
+Type: language
 Subtag: weh
 Description: Weh
 Added: 2009-07-29
@@ -36720,6 +37068,8 @@
 Subtag: wit
 Description: Wintu
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see nol, pwi, wnw
 %%
 Type: language
 Subtag: wiu
@@ -36785,6 +37135,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: wky
+Description: Wangkayutyuru
+Added: 2013-09-10
+%%
+Type: language
 Subtag: wla
 Description: Walio
 Added: 2009-07-29
@@ -36975,6 +37330,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: wnn
+Description: Wunumara
+Added: 2013-09-10
+%%
+Type: language
 Subtag: wno
 Description: Wano
 Added: 2009-07-29
@@ -36990,6 +37350,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: wnw
+Description: Wintu
+Added: 2013-09-10
+%%
+Type: language
 Subtag: wny
 Description: Wanyi
 Added: 2012-08-12
@@ -37221,6 +37586,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: wth
+Description: Wathawurrung
+Added: 2013-09-10
+%%
+Type: language
 Subtag: wti
 Description: Berta
 Added: 2009-07-29
@@ -37338,6 +37708,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: wxw
+Description: Wardandi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: wya
 Description: Wyandot
 Added: 2009-07-29
@@ -37348,6 +37723,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: wyi
+Description: Woiwurrung
+Added: 2013-09-10
+%%
+Type: language
 Subtag: wym
 Description: Wymysorys
 Added: 2009-07-29
@@ -37479,11 +37859,31 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xbd
+Description: Bindal
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xbe
+Description: Bigambal
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xbg
+Description: Bunganditj
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xbi
 Description: Kombio
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xbj
+Description: Birrpayi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xbm
 Description: Middle Breton
 Added: 2009-07-29
@@ -37499,6 +37899,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xbp
+Description: Bibbulman
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xbr
 Description: Kambera
 Added: 2009-07-29
@@ -37514,6 +37919,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xby
+Description: Batyala
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xcb
 Description: Cumbric
 Added: 2009-07-29
@@ -37590,11 +38000,21 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xda
+Description: Darkinyung
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xdc
 Description: Dacian
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xdk
+Description: Dharuk
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xdm
 Description: Edomite
 Added: 2009-07-29
@@ -37670,16 +38090,36 @@
 Added: 2012-08-12
 %%
 Type: language
+Subtag: xgd
+Description: Gudang
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xgf
 Description: Gabrielino-Fernandeño
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xgg
+Description: Goreng
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xgi
+Description: Garingbal
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xgl
 Description: Galindan
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xgm
+Description: Guwinmal
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xgn
 Description: Mongolian languages
 Added: 2009-07-29
@@ -37696,6 +38136,11 @@
 Added: 2012-08-12
 %%
 Type: language
+Subtag: xgw
+Description: Guwa
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xha
 Description: Harami
 Added: 2009-07-29
@@ -37740,6 +38185,8 @@
 Subtag: xia
 Description: Xiandao
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Preferred-Value: acn
 %%
 Type: language
 Subtag: xib
@@ -37782,6 +38229,16 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xjb
+Description: Minjungbal
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xjt
+Description: Jaitmatang
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xka
 Description: Kalkoti
 Added: 2009-07-29
@@ -38127,6 +38584,16 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xni
+Description: Ngarigu
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xnk
+Description: Nganakarti
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xnn
 Description: Northern Kankanay
 Added: 2009-07-29
@@ -38153,6 +38620,16 @@
 Added: 2010-03-11
 %%
 Type: language
+Subtag: xnu
+Description: Nukunul
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xny
+Description: Nyiyaparli
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xnz
 Description: Kenzi
 Description: Mattoki
@@ -38214,6 +38691,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xpa
+Description: Pirriya
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xpc
 Description: Pecheneg
 Added: 2009-07-29
@@ -38280,6 +38762,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xpt
+Description: Punthamara
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xpu
 Description: Punic
 Added: 2009-07-29
@@ -38310,11 +38797,21 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xrd
+Description: Gundungurra
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xre
 Description: Kreye
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xrg
+Description: Minang
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xri
 Description: Krikati-Timbira
 Added: 2009-07-29
@@ -38330,6 +38827,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xrq
+Description: Karranga
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xrr
 Description: Raetic
 Added: 2009-07-29
@@ -38476,6 +38978,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xth
+Description: Yitha Yitha
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xti
 Description: Sinicahua Mixtec
 Added: 2009-07-29
@@ -38536,6 +39043,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xtv
+Description: Thawa
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xtw
 Description: Tawandê
 Added: 2009-07-29
@@ -38576,13 +39088,18 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xul
+Description: Ngunawal
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xum
 Description: Umbrian
 Added: 2009-07-29
 %%
 Type: language
 Subtag: xun
-Description: Unggarranggu
+Description: Unggaranggu
 Added: 2012-08-12
 %%
 Type: language
@@ -38646,6 +39163,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xwd
+Description: Wadi Wadi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xwe
 Description: Xwela Gbe
 Added: 2009-07-29
@@ -38656,6 +39178,16 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xwj
+Description: Wajuk
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xwk
+Description: Wangkumara
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xwl
 Description: Western Xwla Gbe
 Added: 2009-07-29
@@ -38671,6 +39203,16 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xwt
+Description: Wotjobaluk
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xww
+Description: Wemba Wemba
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xxb
 Description: Boro (Ghana)
 Added: 2009-07-29
@@ -38681,6 +39223,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xxm
+Description: Minkin
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xxr
 Description: Koropó
 Added: 2009-07-29
@@ -38691,11 +39238,36 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xya
+Description: Yaygir
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xyb
+Description: Yandjibara
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xyj
+Description: Mayi-Yapi
+Added: 2013-09-10
+%%
+Type: language
+Subtag: xyk
+Description: Mayi-Kulan
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xyl
 Description: Yalakalore
 Added: 2009-07-29
 %%
 Type: language
+Subtag: xyt
+Description: Mayi-Thakurti
+Added: 2013-09-10
+%%
+Type: language
 Subtag: xyy
 Description: Yorta Yorta
 Added: 2012-08-12
@@ -38938,6 +39510,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: yda
+Description: Yanda
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ydd
 Description: Eastern Yiddish
 Added: 2009-07-29
@@ -39036,6 +39613,11 @@
 Added: 2012-08-12
 %%
 Type: language
+Subtag: ygi
+Description: Yiningayi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ygl
 Description: Yangum Gel
 Added: 2009-07-29
@@ -39056,6 +39638,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: ygu
+Description: Yugul
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ygw
 Description: Yagwoia
 Added: 2009-07-29
@@ -39171,6 +39758,8 @@
 Subtag: yiy
 Description: Yir Yoront
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Comments: see yrm, yyr
 %%
 Type: language
 Subtag: yiz
@@ -39295,6 +39884,7 @@
 Type: language
 Subtag: yly
 Description: Nyâlayu
+Description: Nyelâyu
 Added: 2009-07-29
 %%
 Type: language
@@ -39499,6 +40089,8 @@
 Subtag: yos
 Description: Yos
 Added: 2009-07-29
+Deprecated: 2013-09-10
+Preferred-Value: zom
 %%
 Type: language
 Subtag: yot
@@ -39597,6 +40189,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: yrm
+Description: Yirrk-Mel
+Added: 2013-09-10
+%%
+Type: language
 Subtag: yrn
 Description: Yerong
 Added: 2009-07-29
@@ -39612,6 +40209,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: yry
+Description: Yarluyandi
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ysc
 Description: Yassic
 Added: 2009-07-29
@@ -39682,6 +40284,11 @@
 Added: 2010-03-11
 %%
 Type: language
+Subtag: yty
+Description: Yatay
+Added: 2013-09-10
+%%
+Type: language
 Subtag: yua
 Description: Yucateco
 Description: Yucatec Maya
@@ -39810,6 +40417,11 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: ywg
+Description: Yinhawangka
+Added: 2013-09-10
+%%
+Type: language
 Subtag: ywl
 Description: Western Lalu
 Added: 2009-07-29
@@ -39846,16 +40458,41 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: yxa
+Description: Mayawali
+Added: 2013-09-10
+%%
+Type: language
 Subtag: yxg
 Description: Yagara
 Added: 2012-08-12
 %%
 Type: language
+Subtag: yxl
+Description: Yardliyawarra
+Added: 2013-09-10
+%%
+Type: language
+Subtag: yxm
+Description: Yinwum
+Added: 2013-09-10
+%%
+Type: language
+Subtag: yxu
+Description: Yuyu
+Added: 2013-09-10
+%%
+Type: language
 Subtag: yxy
 Description: Yabula Yabula
 Added: 2012-08-12
 %%
 Type: language
+Subtag: yyr
+Description: Yir Yoront
+Added: 2013-09-03
+%%
+Type: language
 Subtag: yyu
 Description: Yau (Sandaun Province)
 Added: 2009-07-29
@@ -40096,6 +40733,11 @@
 Macrolanguage: za
 %%
 Type: language
+Subtag: zgh
+Description: Standard Moroccan Tamazight
+Added: 2013-01-25
+%%
+Type: language
 Subtag: zgm
 Description: Minz Zhuang
 Added: 2009-07-29
@@ -40859,7 +41501,7 @@
 %%
 Type: language
 Subtag: zyp
-Description: Zyphe
+Description: Zyphe Chin
 Added: 2009-07-29
 %%
 Type: language
@@ -42574,6 +43216,11 @@
 Added: 2011-01-07
 %%
 Type: script
+Subtag: Aghb
+Description: Caucasian Albanian
+Added: 2012-11-01
+%%
+Type: script
 Subtag: Arab
 Description: Arabic
 Added: 2005-10-16
@@ -42844,6 +43491,7 @@
 Type: script
 Subtag: Hung
 Description: Old Hungarian
+Description: Hungarian Runic
 Added: 2005-10-16
 %%
 Type: script
@@ -42986,6 +43634,11 @@
 Added: 2006-07-21
 %%
 Type: script
+Subtag: Mahj
+Description: Mahajani
+Added: 2012-11-01
+%%
+Type: script
 Subtag: Mand
 Description: Mandaic
 Description: Mandaean
@@ -44404,7 +45057,7 @@
 %%
 Type: region
 Subtag: PS
-Description: Occupied Palestinian Territory
+Description: State of Palestine
 Added: 2005-10-16
 %%
 Type: region
--- a/test/java/util/Map/Defaults.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/Map/Defaults.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8010122 8004518 8024331
+ * @bug 8010122 8004518 8024331 8024688
  * @summary Test Map default methods
  * @author Mike Duigou
  * @run testng Defaults
@@ -36,8 +36,8 @@
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.IdentityHashMap;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -288,19 +288,11 @@
         assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
     }
 
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeIfAbsentNPEHashMap() {
-        Object value = new HashMap().computeIfAbsent(KEYS[1], null);
-    }
-
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeIfAbsentNPEHashtable() {
-        Object value = new Hashtable().computeIfAbsent(KEYS[1], null);
-    }
-
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeIfAbsentNPETreeMap() {
-        Object value = new TreeMap().computeIfAbsent(KEYS[1], null);
+    @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=all values=all")
+    public void testComputeIfAbsentNullFunction(String description, Map<IntegerEnum, String> map) {
+        assertThrows( () -> { map.computeIfAbsent(KEYS[1], null);},
+                NullPointerException.class,
+                "Should throw NPE");
     }
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=withNull values=withNull")
@@ -343,22 +335,14 @@
         assertSame(map.get(EXTRA_KEY), null);
     }
 
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeIfPresentNPEHashMap() {
-        Object value = new HashMap().computeIfPresent(KEYS[1], null);
+    @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=all values=all")
+    public void testComputeIfPresentNullFunction(String description, Map<IntegerEnum, String> map) {
+        assertThrows( () -> { map.computeIfPresent(KEYS[1], null);},
+                NullPointerException.class,
+                "Should throw NPE");
     }
 
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeIfPresentNPEHashtable() {
-        Object value = new Hashtable().computeIfPresent(KEYS[1], null);
-    }
-
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeIfPresentNPETreeMap() {
-        Object value = new TreeMap().computeIfPresent(KEYS[1], null);
-    }
-
-    @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=withNull values=withNull")
+     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=withNull values=withNull")
     public void testComputeNulls(String description, Map<IntegerEnum, String> map) {
         assertTrue(map.containsKey(null), "null key absent");
         assertNull(map.get(null), "value not null");
@@ -444,78 +428,86 @@
         assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
     }
 
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeNPEHashMap() {
-        Object value = new HashMap().compute(KEYS[1], null);
-    }
-
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeNPEHashtable() {
-        Object value = new Hashtable().compute(KEYS[1], null);
+    @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=all values=all")
+    public void testComputeNullFunction(String description, Map<IntegerEnum, String> map) {
+        assertThrows( () -> { map.compute(KEYS[1], null);},
+                NullPointerException.class,
+                "Should throw NPE");
     }
 
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testComputeNPETreeMap() {
-        Object value = new TreeMap().compute(KEYS[1], null);
-    }
+    @Test(dataProvider = "MergeCases")
+    private void testMerge(String description, Map<IntegerEnum, String> map, Merging.Value oldValue, Merging.Value newValue, Merging.Merger merger, Merging.Value put, Merging.Value result) {
+            // add and check initial conditions.
+            switch(oldValue) {
+                case ABSENT :
+                    map.remove(EXTRA_KEY);
+                    assertFalse(map.containsKey(EXTRA_KEY), "key not absent");
+                    break;
+                case NULL :
+                    map.put(EXTRA_KEY, null);
+                    assertTrue(map.containsKey(EXTRA_KEY), "key absent");
+                    assertNull(map.get(EXTRA_KEY), "wrong value");
+                    break;
+                case OLDVALUE :
+                    map.put(EXTRA_KEY, VALUES[1]);
+                    assertTrue(map.containsKey(EXTRA_KEY), "key absent");
+                    assertSame(map.get(EXTRA_KEY), VALUES[1], "wrong value");
+                    break;
+                default:
+                    fail("unexpected old value");
+            }
+
+            String returned = map.merge(EXTRA_KEY,
+                newValue == Merging.Value.NULL ? (String) null : VALUES[2],
+                merger
+                );
+
+            // check result
 
-    @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=withNull values=withNull")
-    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);
+            switch(result) {
+                case NULL :
+                    assertNull(returned, "wrong value");
+                    break;
+                case NEWVALUE :
+                    assertSame(returned, VALUES[2], "wrong value");
+                    break;
+                case RESULT :
+                    assertSame(returned, VALUES[3], "wrong value");
+                    break;
+                default:
+                    fail("unexpected new value");
+            }
+
+            // check map
+            switch(put) {
+                case ABSENT :
+                    assertFalse(map.containsKey(EXTRA_KEY), "key not absent");
+                    break;
+                case NULL :
+                    assertTrue(map.containsKey(EXTRA_KEY), "key absent");
+                    assertNull(map.get(EXTRA_KEY), "wrong value");
+                    break;
+                case NEWVALUE :
+                    assertTrue(map.containsKey(EXTRA_KEY), "key absent");
+                    assertSame(map.get(EXTRA_KEY), VALUES[2], "wrong value");
+                    break;
+                case RESULT :
+                    assertTrue(map.containsKey(EXTRA_KEY), "key absent");
+                    assertSame(map.get(EXTRA_KEY), VALUES[3], "wrong value");
+                    break;
+                default:
+                    fail("unexpected new value");
+            }
     }
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=all values=all")
-    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);
+    public void testMergeNullMerger(String description, Map<IntegerEnum, String> map) {
+        assertThrows( () -> { map.merge(KEYS[1], VALUES[1], null);},
+                NullPointerException.class,
+                "Should throw NPE");
     }
 
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testMergeNPEHashMap() {
-        Object value = new HashMap().merge(KEYS[1], VALUES[1], null);
-    }
-
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testMergeNPEHashtable() {
-        Object value = new Hashtable().merge(KEYS[1], VALUES[1], null);
-    }
-
-    @Test(expectedExceptions = {NullPointerException.class})
-    public void testMergeNPETreeMap() {
-        Object value = new TreeMap().merge(KEYS[1], VALUES[1], null);
-    }
-
-    enum IntegerEnum {
+    public enum IntegerEnum {
 
         e0, e1, e2, e3, e4, e5, e6, e7, e8, e9,
         e10, e11, e12, e13, e14, e15, e16, e17, e18, e19,
@@ -715,6 +707,89 @@
         return result;
     }
 
+    static class Merging {
+        public enum Value {
+            ABSENT,
+            NULL,
+            OLDVALUE,
+            NEWVALUE,
+            RESULT
+        }
+
+        public enum Merger implements BiFunction<String,String,String> {
+            UNUSED {
+                public String apply(String oldValue, String newValue) {
+                    fail("should not be called");
+                    return null;
+                }
+            },
+            NULL {
+                public String apply(String oldValue, String newValue) {
+                    return null;
+                }
+            },
+            RESULT {
+                public String apply(String oldValue, String newValue) {
+                    return VALUES[3];
+                }
+            },
+        }
+    }
+
+    @DataProvider(name = "MergeCases", parallel = true)
+    public Iterator<Object[]> mergeCasesProvider() {
+        Collection<Object[]> cases = new ArrayList<>();
+
+        cases.addAll(makeMergeTestCases());
+        cases.addAll(makeMergeNullValueTestCases());
+
+        return cases.iterator();
+    }
+
+    static Collection<Object[]> makeMergeTestCases() {
+        Collection<Object[]> cases = new ArrayList<>();
+
+        for( Object[] mapParams : makeAllRWMaps() ) {
+            cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.ABSENT, Merging.Value.NEWVALUE, Merging.Merger.UNUSED, Merging.Value.NEWVALUE, Merging.Value.NEWVALUE });
+        }
+
+        for( Object[] mapParams : makeAllRWMaps() ) {
+            cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.OLDVALUE, Merging.Value.NEWVALUE, Merging.Merger.NULL, Merging.Value.ABSENT, Merging.Value.NULL });
+        }
+
+        for( Object[] mapParams : makeAllRWMaps() ) {
+            cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.OLDVALUE, Merging.Value.NEWVALUE, Merging.Merger.RESULT, Merging.Value.RESULT, Merging.Value.RESULT });
+        }
+
+        return cases;
+    }
+
+    static Collection<Object[]> makeMergeNullValueTestCases() {
+        Collection<Object[]> cases = new ArrayList<>();
+
+        for( Object[] mapParams : makeAllRWMapsWithNulls() ) {
+            cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.OLDVALUE, Merging.Value.NULL, Merging.Merger.NULL, Merging.Value.ABSENT, Merging.Value.NULL });
+        }
+
+        for( Object[] mapParams : makeAllRWMapsWithNulls() ) {
+            cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.OLDVALUE, Merging.Value.NULL, Merging.Merger.RESULT, Merging.Value.RESULT, Merging.Value.RESULT });
+        }
+
+        for( Object[] mapParams : makeAllRWMapsWithNulls() ) {
+            cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.ABSENT, Merging.Value.NULL, Merging.Merger.UNUSED, Merging.Value.ABSENT, Merging.Value.NULL });
+        }
+
+        for( Object[] mapParams : makeAllRWMapsWithNulls() ) {
+            cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.NULL, Merging.Value.NULL, Merging.Merger.UNUSED, Merging.Value.ABSENT, Merging.Value.NULL });
+        }
+
+        for( Object[] mapParams : makeAllRWMapsWithNulls() ) {
+            cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.NULL, Merging.Value.NEWVALUE, Merging.Merger.UNUSED, Merging.Value.NEWVALUE, Merging.Value.NEWVALUE });
+        }
+
+        return cases;
+    }
+
     public interface Thrower<T extends Throwable> {
 
         public void run() throws T;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Properties/LoadAndStoreXMLWithDefaults.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,171 @@
+/*
+ * 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.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+
+/**
+ * @test
+ * @bug 8016344
+ * @summary checks that Properties.storeToXML only stores properties locally
+ *          defined on the Properties object, excluding those that are inherited.
+ * @author danielfuchs
+ */
+public class LoadAndStoreXMLWithDefaults {
+
+    public static enum StoreMethod {
+        // Note: this case will test the default provider when available,
+        //       and the basic provider when it's not.
+        PROPERTIES {
+            @Override
+            public String writeToXML(Properties p) throws IOException {
+                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                p.storeToXML(baos, "Test 8016344");
+                return baos.toString();
+            }
+            @Override
+            public Properties loadFromXML(String xml, Properties defaults)
+                    throws IOException {
+                final ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes("UTF-8"));
+                Properties p = new Properties(defaults);
+                p.loadFromXML(bais);
+                return p;
+            }
+        },
+        // Note: this case always test the basic provider, which is always available.
+        //       so sometimes it's just a dup with the previous case...
+        BASICPROVIDER {
+            @Override
+            public String writeToXML(Properties p) throws IOException {
+                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                jdk.internal.util.xml.BasicXmlPropertiesProvider provider =
+                        new  jdk.internal.util.xml.BasicXmlPropertiesProvider();
+                provider.store(p, baos, "Test 8016344", "UTF-8");
+                return baos.toString();
+            }
+            @Override
+            public Properties loadFromXML(String xml, Properties defaults)
+                    throws IOException {
+                final ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes("UTF-8"));
+                Properties p = new Properties(defaults);
+                jdk.internal.util.xml.BasicXmlPropertiesProvider provider =
+                        new  jdk.internal.util.xml.BasicXmlPropertiesProvider();
+                provider.load(p, bais);
+                return p;
+            }
+        };
+        public abstract String writeToXML(Properties p) throws IOException;
+        public abstract Properties loadFromXML(String xml, Properties defaults)
+                    throws IOException;
+        public String displayName() {
+            switch(this) {
+                case PROPERTIES: return "Properties.storeToXML";
+                case BASICPROVIDER: return "BasicXmlPropertiesProvider.store";
+                default:
+                    throw new UnsupportedOperationException(this.name());
+            }
+        }
+    }
+
+    static enum Objects { OBJ1, OBJ2, OBJ3 };
+
+    public static void main(String[] args) throws IOException {
+        Properties p1 = new Properties();
+        p1.setProperty("p1.prop", "prop1-p1");
+        p1.setProperty("p1.and.p2.prop", "prop2-p1");
+        p1.setProperty("p1.and.p2.and.p3.prop", "prop3-p1");
+        Properties p2 = new Properties(p1);
+        p2.setProperty("p2.prop", "prop4-p2");
+        p2.setProperty("p1.and.p2.prop", "prop5-p2");
+        p2.setProperty("p1.and.p2.and.p3.prop", "prop6-p2");
+        p2.setProperty("p2.and.p3.prop", "prop7-p2");
+        Properties p3 = new Properties(p2);
+        p3.setProperty("p3.prop", "prop8-p3");
+        p3.setProperty("p1.and.p2.and.p3.prop", "prop9-p3");
+        p3.setProperty("p2.and.p3.prop", "prop10-p3");
+
+        for (StoreMethod m : StoreMethod.values()) {
+            System.out.println("Testing with " + m.displayName());
+            Properties P1 = m.loadFromXML(m.writeToXML(p1), null);
+            Properties P2 = m.loadFromXML(m.writeToXML(p2), P1);
+            Properties P3 = m.loadFromXML(m.writeToXML(p3), P2);
+
+            testResults(m, p1, P1, p2, P2, p3, P3);
+
+            // Now check that properties whose keys or values are objects
+            // are skipped.
+
+            System.out.println("Testing with " + m.displayName() + " and Objects");
+            P1.put("p1.object.prop", Objects.OBJ1);
+            P1.put(Objects.OBJ1, "p1.object.prop");
+            P1.put("p2.object.prop", "p2.object.prop");
+            P2.put("p2.object.prop", Objects.OBJ2);
+            P2.put(Objects.OBJ2, "p2.object.prop");
+            P3.put("p3.object.prop", Objects.OBJ3);
+            P3.put(Objects.OBJ3, "p3.object.prop");
+
+            Properties PP1 = m.loadFromXML(m.writeToXML(P1), null);
+            Properties PP2 = m.loadFromXML(m.writeToXML(P2), PP1);
+            Properties PP3 = m.loadFromXML(m.writeToXML(P3), PP2);
+
+            p1.setProperty("p2.object.prop", "p2.object.prop");
+            try {
+                testResults(m, p1, PP1, p2, PP2, p3, PP3);
+            } finally {
+                p1.remove("p2.object.prop");
+            }
+        }
+    }
+
+    public static void testResults(StoreMethod m, Properties... pps) {
+        for (int i=0 ; i < pps.length ; i += 2) {
+            if (!pps[i].equals(pps[i+1])) {
+                System.err.println(m.displayName() +": P" + (i/2+1)
+                        + " Reloaded properties differ from original");
+                System.err.println("\toriginal: " + pps[i]);
+                System.err.println("\treloaded: " + pps[i+1]);
+                throw new RuntimeException(m.displayName() +": P" + (i/2+1)
+                        + " Reloaded properties differ from original");
+            }
+            if (!pps[i].keySet().equals(pps[i+1].keySet())) {
+                System.err.println(m.displayName() +": P" + (i/2+1)
+                        + " Reloaded property names differ from original");
+                System.err.println("\toriginal: " + pps[i].keySet());
+                System.err.println("\treloaded: " + pps[i+1].keySet());
+                throw new RuntimeException(m.displayName() +": P" + (i/2+1)
+                        + " Reloaded property names differ from original");
+            }
+            if (!pps[i].stringPropertyNames().equals(pps[i+1].stringPropertyNames())) {
+                System.err.println(m.displayName() +": P" + (i/2+1)
+                        + " Reloaded string property names differ from original");
+                System.err.println("\toriginal: " + pps[i].stringPropertyNames());
+                System.err.println("\treloaded: " + pps[i+1].stringPropertyNames());
+                throw new RuntimeException(m.displayName() +": P" + (i/2+1)
+                        + " Reloaded string property names differ from original");
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/ResourceBundle/getBaseBundleName/TestGetBaseBundleName.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,144 @@
+/*
+ * 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.Collections;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+
+/**
+ * @test
+ * @bug 4814565
+ * @summary tests ResourceBundle.getBaseBundleName();
+ * @build TestGetBaseBundleName resources.ListBundle resources.ListBundle_fr
+ * @run main TestGetBaseBundleName
+ * @author danielfuchs
+ */
+public class TestGetBaseBundleName {
+
+    final static String PROPERTY_BUNDLE_NAME = "resources/PropertyBundle";
+    final static String LIST_BUNDLE_NAME = "resources.ListBundle";
+
+    public static String getBaseName(ResourceBundle bundle) {
+        return bundle == null ? null : bundle.getBaseBundleName();
+    }
+
+    public static void main(String... args) throws Exception {
+
+        Locale defaultLocale = Locale.getDefault();
+        System.out.println("Default locale is: " + defaultLocale);
+        for (String baseName : new String[] {
+                    PROPERTY_BUNDLE_NAME,
+                    LIST_BUNDLE_NAME
+        }) {
+            ResourceBundle bundle = ResourceBundle.getBundle(baseName);
+            System.out.println(getBaseName(bundle));
+            if (!Locale.ROOT.equals(bundle.getLocale())) {
+                throw new RuntimeException("Unexpected locale: "
+                        + bundle.getLocale());
+            }
+            if (!baseName.equals(getBaseName(bundle))) {
+                throw new RuntimeException("Unexpected base name: "
+                        + getBaseName(bundle));
+            }
+            Locale.setDefault(Locale.FRENCH);
+            try {
+                ResourceBundle bundle_fr = ResourceBundle.getBundle(baseName);
+                if (!Locale.FRENCH.equals(bundle_fr.getLocale())) {
+                    throw new RuntimeException("Unexpected locale: "
+                            + bundle_fr.getLocale());
+                }
+                if (!baseName.equals(getBaseName(bundle_fr))) {
+                    throw new RuntimeException("Unexpected base name: "
+                            + getBaseName(bundle_fr));
+                }
+            } finally {
+                Locale.setDefault(defaultLocale);
+            }
+        }
+
+        final ResourceBundle bundle = new ResourceBundle() {
+            @Override
+            protected Object handleGetObject(String key) {
+                if ("dummy".equals(key)) return "foo";
+                throw new MissingResourceException("Missing key",
+                        this.getClass().getName(), key);
+            }
+            @Override
+            public Enumeration<String> getKeys() {
+                return Collections.enumeration(java.util.Arrays.asList(
+                        new String[] {"dummy"}));
+            }
+        };
+
+        if (getBaseName(bundle) != null) {
+            throw new RuntimeException("Expected null baseName, got "
+                    + getBaseName(bundle));
+        }
+
+        final ResourceBundle bundle2 = new ResourceBundle() {
+            @Override
+            protected Object handleGetObject(String key) {
+                if ("dummy".equals(key)) return "foo";
+                throw new MissingResourceException("Missing key",
+                        this.getClass().getName(), key);
+            }
+            @Override
+            public Enumeration<String> getKeys() {
+                return Collections.enumeration(java.util.Arrays.asList(
+                        new String[] {"dummy"}));
+            }
+
+            @Override
+            public String getBaseBundleName() {
+                return this.getClass().getName();
+            }
+
+
+        };
+
+        if (!bundle2.getClass().getName().equals(getBaseName(bundle2))) {
+            throw new RuntimeException("Expected "
+                    + bundle2.getClass().getName() + ", got "
+                    + getBaseName(bundle2));
+        }
+
+        ResourceBundle propertyBundle = new PropertyResourceBundle(
+                TestGetBaseBundleName.class.getResourceAsStream(
+                    PROPERTY_BUNDLE_NAME+".properties"));
+
+        if (getBaseName(propertyBundle) != null) {
+            throw new RuntimeException("Expected null baseName, got "
+                    + getBaseName(propertyBundle));
+        }
+
+        ResourceBundle listBundle = new resources.ListBundle_fr();
+        if (getBaseName(listBundle) != null) {
+            throw new RuntimeException("Expected null baseName, got "
+                    + getBaseName(listBundle));
+        }
+
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/ResourceBundle/getBaseBundleName/resources/ListBundle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ */
+package resources;
+
+import java.util.ListResourceBundle;
+
+/**
+ *
+ * @author danielfuchs
+ */
+public class ListBundle extends ListResourceBundle {
+
+    @Override
+    protected Object[][] getContents() {
+        return new Object[][] {
+            { "dummy", "foo" },
+        };
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/ResourceBundle/getBaseBundleName/resources/ListBundle_fr.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ */
+package resources;
+
+import java.util.ListResourceBundle;
+
+/**
+ *
+ * @author danielfuchs
+ */
+public class ListBundle_fr extends ListResourceBundle {
+
+    @Override
+    protected Object[][] getContents() {
+        return new Object[][] {
+            { "dummy", "toto" },
+        };
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/ResourceBundle/getBaseBundleName/resources/PropertyBundle.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute 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.
+#
+dummy=foo
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/ResourceBundle/getBaseBundleName/resources/PropertyBundle_fr.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+dummy=toto
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/TimeZone/SetDefaultSecurityTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8001029
+ * @summary Make sure that TimeZone.setDefault throws a SecurityException if the
+ *          security manager doesn't permit.
+ * @run main/othervm SetDefaultSecurityTest
+ */
+
+import java.util.SimpleTimeZone;
+import java.util.TimeZone;
+
+public class SetDefaultSecurityTest {
+    static final TimeZone NOWHERE = new SimpleTimeZone(Integer.MAX_VALUE, "Nowhere");
+
+    public static void main(String[] args)   {
+        TimeZone defaultZone = TimeZone.getDefault();
+
+        // Make sure that TimeZone.setDefault works for trusted code
+        TimeZone.setDefault(NOWHERE);
+        if (!NOWHERE.equals(TimeZone.getDefault())) {
+            new RuntimeException("TimeZone.setDefault doesn't work for trusted code.");
+        }
+        // Restore defaultZone
+        TimeZone.setDefault(defaultZone);
+        if (!defaultZone.equals(TimeZone.getDefault())) {
+            new RuntimeException("TimeZone.setDefault doesn't restore defaultZone.");
+        }
+
+        // Install a SecurityManager.
+        System.setSecurityManager(new SecurityManager());
+        try {
+            TimeZone.setDefault(NOWHERE);
+            throw new RuntimeException("TimeZone.setDefault doesn't throw a SecurityException.");
+        } catch (SecurityException se) {
+            // OK
+        }
+        TimeZone tz = TimeZone.getDefault();
+        if (!defaultZone.equals(tz)) {
+            throw new RuntimeException("Default TimeZone changed: " + tz);
+        }
+    }
+}
--- a/test/java/util/TimeZone/TimeZoneDatePermissionCheck.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/TimeZone/TimeZoneDatePermissionCheck.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -40,6 +40,7 @@
 ${COMPILEJAVA}/bin/keytool ${TESTTOOLVMOPTS} -genkeypair -alias testcert \
   -keystore ${TESTCLASSES}/timezonedatetest.store \
   -storepass testpass -validity 360 \
+  -keyalg rsa \
   -dname "cn=Mark Wildebeest, ou=FreeSoft, o=Red Hat, c=NL" \
   -keypass testpass
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/concurrent/atomic/Serial.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,157 @@
+/*
+ * 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 8026344
+ * @summary Exercise classes in j.u.c.atomic that use serialization proxies
+ */
+
+import java.util.concurrent.atomic.DoubleAdder;
+import java.util.concurrent.atomic.DoubleAccumulator;
+import java.util.concurrent.atomic.LongAdder;
+import java.util.concurrent.atomic.LongAccumulator;
+import java.util.function.DoubleBinaryOperator;
+import java.util.function.LongBinaryOperator;
+import java.io.ByteArrayOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.Serializable;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.IOException;
+
+/**
+ * Basic test to exercise the j.u.c.atomic classes that use serialization
+ * proxies.
+ */
+
+public class Serial {
+
+    public static void main(String[] args) {
+        testDoubleAdder();
+        testDoubleAccumulator();
+        testLongAdder();
+        testLongAccumulator();
+    }
+
+    static void testDoubleAdder() {
+        DoubleAdder a = new DoubleAdder();
+        a.add(20.1d);
+        DoubleAdder result = echo(a);
+        if (result.doubleValue() != a.doubleValue())
+            throw new RuntimeException("Unexpected doubleValue");
+
+        checkSerialClassName(a, "java.util.concurrent.atomic.DoubleAdder$SerializationProxy");
+    }
+
+    static void testDoubleAccumulator() {
+        DoubleBinaryOperator plus = (DoubleBinaryOperator & Serializable) (x, y) -> x + y;
+        DoubleAccumulator a = new DoubleAccumulator(plus, 13.9d);
+        a.accumulate(17.5d);
+        DoubleAccumulator result = echo(a);
+        if (result.get() != a.get())
+            throw new RuntimeException("Unexpected value");
+        a.reset();
+        result.reset();
+        if (result.get() != a.get())
+            throw new RuntimeException("Unexpected value after reset");
+
+        checkSerialClassName(a, "java.util.concurrent.atomic.DoubleAccumulator$SerializationProxy");
+    }
+
+    static void testLongAdder() {
+        LongAdder a = new LongAdder();
+        a.add(45);
+        LongAdder result = echo(a);
+        if (result.longValue() != a.longValue())
+            throw new RuntimeException("Unexpected longValue");
+
+        checkSerialClassName(a, "java.util.concurrent.atomic.LongAdder$SerializationProxy");
+    }
+
+    static void testLongAccumulator() {
+        LongBinaryOperator plus = (LongBinaryOperator & Serializable) (x, y) -> x + y;
+        LongAccumulator a = new LongAccumulator(plus, -2);
+        a.accumulate(34);
+        LongAccumulator result = echo(a);
+        if (result.get() != a.get())
+            throw new RuntimeException("Unexpected value");
+        a.reset();
+        result.reset();
+        if (result.get() != a.get())
+            throw new RuntimeException("Unexpected value after reset");
+
+        checkSerialClassName(a, "java.util.concurrent.atomic.LongAccumulator$SerializationProxy");
+    }
+
+    /**
+     * Serialize the given object, returning the reconstituted object.
+     */
+    @SuppressWarnings("unchecked")
+    static <T extends Serializable> T echo(T obj) {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        try (ObjectOutputStream oos = new ObjectOutputStream(out)) {
+            oos.writeObject(obj);
+        } catch (IOException e) {
+            throw new RuntimeException("Serialization failed: " + e);
+        }
+        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+        try (ObjectInputStream ois = new ObjectInputStream(in)) {
+            return (T) ois.readObject();
+        } catch (IOException | ClassNotFoundException e) {
+            throw new RuntimeException("Deserialization failed: " + e);
+        }
+    }
+
+    /**
+     * Checks that the given object serializes to the expected class.
+     */
+    static void checkSerialClassName(Serializable obj, String expected) {
+        String cn = serialClassName(obj);
+        if (!cn.equals(expected))
+            throw new RuntimeException(obj.getClass() + " serialized as " + cn
+                + ", expected " + expected);
+    }
+
+    /**
+     * Returns the class name that the given object serializes as.
+     */
+    static String serialClassName(Serializable obj) {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        try (ObjectOutputStream oos = new ObjectOutputStream(out)) {
+            oos.writeObject(obj);
+        } catch (IOException e) {
+            throw new RuntimeException("Serialization failed: " + e);
+        }
+        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+        try (DataInputStream dis = new DataInputStream(in)) {
+            dis.readShort();      // STREAM_MAGIC
+            dis.readShort();      // STREAM_VERSION
+            dis.readByte();       // TC_OBJECT
+            dis.readByte();       // TC_CLASSDESC
+            return dis.readUTF(); // className
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/concurrent/forkjoin/FJExceptionTableLeak.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,73 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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:
+ *
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @author Doug Lea
+ * @bug 8004138
+ * @summary Check if ForkJoinPool table leaks thrown exceptions.
+ * @run main/othervm -Xmx32m FJExceptionTableLeak
+ */
+import java.util.concurrent.*;
+
+public class FJExceptionTableLeak {
+
+    // Run with TASKS_PER_STEP * 40 < Xmx < STEPS * TASKS_PER_STEP * 40
+    // These work for Xmx32m:
+    static final int STEPS = 2000;
+    static final int TASKS_PER_STEP = 1000;
+
+    static class FailingTaskException extends RuntimeException {}
+    static class FailingTask extends RecursiveAction {
+        public void compute() {
+            throw new FailingTaskException();
+        }
+    }
+
+    public static void main(String[] args) throws InterruptedException {
+        ForkJoinPool pool = new ForkJoinPool(4);
+        FailingTask[] tasks = new FailingTask[TASKS_PER_STEP];
+        for (int k = 0; k < STEPS; ++k) {
+            for (int i = 0; i < tasks.length; ++i)
+                tasks[i] = new FailingTask();
+            for (int i = 0; i < tasks.length; ++i)
+                pool.execute(tasks[i]);
+            for (int i = 0; i < tasks.length; ++i) {
+                try {
+                    tasks[i].join();
+                    throw new AssertionError("should throw");
+                } catch (FailingTaskException success) {}
+            }
+        }
+    }
+}
--- a/test/java/util/jar/JarInputStream/ExtraFileInMetaInf.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/jar/JarInputStream/ExtraFileInMetaInf.java	Wed Oct 30 18:38:20 2013 +0000
@@ -49,7 +49,7 @@
         new File("ks").delete();
         sun.security.tools.keytool.Main.main(
                 ("-keystore ks -storepass changeit -keypass changeit " +
-                        "-alias a -dname CN=A -genkeypair").split(" "));
+                        "-keyalg rsa -alias a -dname CN=A -genkeypair").split(" "));
         sun.security.tools.jarsigner.Main.main(
                 "-keystore ks -storepass changeit x.jar a".split(" "));
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/AnonymousLogger/TestAnonymousLogger.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,133 @@
+/*
+ * 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.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.LinkedHashSet;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.logging.Filter;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import java.util.logging.SimpleFormatter;
+
+/**
+ * @test
+ * @bug 8026863
+ * @summary checks that anonymous logger setters work as expected when a
+ *          security manager is set, and checks that getters return expected
+ *          values.
+ * @run main/othervm TestAnonymousLogger
+ */
+public class TestAnonymousLogger {
+
+    final public static class TestHandler extends Handler {
+        @Override
+        public void publish(LogRecord record) {
+            System.out.println(new SimpleFormatter().format(record));
+        }
+        @Override
+        public void flush() {
+            System.out.flush();
+        }
+        @Override
+        public void close() {
+            flush();
+        }
+    }
+
+    final public static class TestFilter implements Filter {
+        @Override
+        public boolean isLoggable(LogRecord record) {
+            return true;
+        }
+    }
+
+    final public static class TestBundle extends ResourceBundle {
+        Set<String> keys = Collections.synchronizedSet(new LinkedHashSet<>());
+        @Override
+        protected Object handleGetObject(String key) {
+            keys.add(key);
+            return "[LOCALIZED] "+key;
+        }
+        @Override
+        public Enumeration<String> getKeys() {
+            return Collections.enumeration(keys);
+        }
+    }
+
+    public static void main(String[] args) {
+        System.setSecurityManager(new SecurityManager());
+        Logger anonymous = Logger.getAnonymousLogger();
+
+        final TestHandler handler = new TestHandler();
+        final TestFilter filter = new TestFilter();
+        final ResourceBundle bundle = ResourceBundle.getBundle(TestBundle.class.getName());
+        anonymous.setLevel(Level.FINEST);
+        anonymous.addHandler(handler);
+        anonymous.setFilter(filter);
+        anonymous.setUseParentHandlers(true);
+        anonymous.setResourceBundle(bundle);
+
+        if (anonymous.getLevel() != Level.FINEST) {
+            throw new RuntimeException("Unexpected level: " + anonymous.getLevel());
+        } else {
+            System.out.println("Got expected level: " + anonymous.getLevel());
+        }
+        if (!Arrays.asList(anonymous.getHandlers()).contains(handler)) {
+            throw new RuntimeException("Expected handler not found in: "
+                    + Arrays.asList(anonymous.getHandlers()));
+        } else {
+            System.out.println("Got expected handler in: " + Arrays.asList(anonymous.getHandlers()));
+        }
+        if (anonymous.getFilter() != filter) {
+            throw new RuntimeException("Unexpected filter: " + anonymous.getFilter());
+        } else {
+            System.out.println("Got expected filter: " + anonymous.getFilter());
+        }
+        if (!anonymous.getUseParentHandlers()) {
+            throw new RuntimeException("Unexpected flag: " + anonymous.getUseParentHandlers());
+        } else {
+            System.out.println("Got expected flag: " + anonymous.getUseParentHandlers());
+        }
+        if (anonymous.getResourceBundle() != bundle) {
+            throw new RuntimeException("Unexpected bundle: " + anonymous.getResourceBundle());
+        } else {
+            System.out.println("Got expected bundle: " + anonymous.getResourceBundle());
+        }
+        try {
+            anonymous.setParent(Logger.getLogger("foo.bar"));
+            throw new RuntimeException("Expected SecurityException not raised!");
+        } catch (SecurityException x) {
+            System.out.println("Got expected exception: " + x);
+        }
+        if (anonymous.getParent() != Logger.getLogger("")) {
+            throw new RuntimeException("Unexpected parent: " + anonymous.getParent());
+        } else {
+            System.out.println("Got expected parent: " + anonymous.getParent());
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,147 @@
+/*
+ * 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.security.Permission;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+
+
+/**
+ * @test
+ * @bug 8023163
+ * @summary checks that Logger.getLogger("").setLevel() is working correctly.
+ * @build TestRootLoggerLevel
+ * @run main/othervm -Dtest.security=on TestRootLoggerLevel
+ * @run main/othervm -Dtest.security=off TestRootLoggerLevel
+ * @author danielfuchs
+ */
+public class TestRootLoggerLevel {
+
+    public static enum Loggers {
+        ROOT("", "root"),
+        GLOBAL(Logger.GLOBAL_LOGGER_NAME);
+
+        private final String name;
+        private final String displayName;
+        Loggers(String name) {
+            this(name, name);
+        }
+        Loggers(String name, String displayName) {
+            this.name = name;
+            this.displayName = displayName;
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        for (Loggers log : Loggers.values()) {
+            System.out.println(log.displayName + ": "
+                    + Logger.getLogger(log.name)
+                    + ": " + Logger.getLogger(log.name).getLevel());
+        }
+
+        if ("on".equals(System.getProperty("test.security","on"))) {
+            System.out.println("*** SecurityManager is ON");
+            Policy.setPolicy(new SimplePolicy());
+
+            System.setSecurityManager(new SecurityManager());
+        } else {
+            System.out.println("*** SecurityManager is OFF");
+        }
+
+        // Before the fix, setting the root logger level here had only
+        // a transient effect...
+        for (Loggers log : Loggers.values()) {
+            System.out.println("Logger.getLogger(\""
+                    + log.name
+                    + "\").setLevel(Level.FINEST);");
+            Logger.getLogger(log.name).setLevel(Level.FINEST);
+            System.out.println(log.displayName + ": "
+                    + Logger.getLogger(log.name)
+                    + ": " + Logger.getLogger(log.name).getLevel());
+
+            // At this point - the root logger should have a level which is
+            // FINEST - just check it here for sanity.
+            if (Logger.getLogger(log.name).getLevel() != Level.FINEST) {
+                throw new RuntimeException("Logger " + log.displayName
+                        + " level should be FINEST: "
+                        + Logger.getLogger(log.name).getLevel());
+            }
+        }
+        // Initializing some PlatformLogger caused the root logger
+        // level to be reset to INFO.
+        //
+        final Object platformLogger =
+                sun.util.logging.PlatformLogger.getLogger("java.foo");
+        System.out.println("Got platform logger: " + platformLogger);
+
+        for (Loggers log : Loggers.values()) {
+            // Check that the root logger still has the FINEST value assigned
+            // to it earlier.
+            System.out.println(log.displayName + ": "
+                    + Logger.getLogger(log.name)
+                    + ": " + Logger.getLogger(log.name).getLevel());
+
+            if (Logger.getLogger(log.name).getLevel() != Level.FINEST) {
+                throw new RuntimeException("Logger " + log.displayName
+                        + " level should be FINEST: "
+                        + Logger.getLogger(log.name).getLevel());
+            }
+        }
+
+     }
+
+    private static final class SimplePolicy extends Policy {
+        private final Permissions perms;
+
+        private static final Permissions permissions(Permission... perms) {
+            Permissions permissions = new Permissions();
+            for (Permission perm : perms) {
+                permissions.add(perm);
+            }
+            return permissions;
+        }
+
+        SimplePolicy() {
+            this(permissions(new LoggingPermission("control", null),
+                    new RuntimePermission("accessClassInPackage.sun.util.logging")
+            ));
+        }
+
+        SimplePolicy(Permissions perms) {
+            this.perms = perms;
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain domain, Permission permission) {
+            return perms.implies(permission);
+        }
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/logrb/TestLogrbResourceBundle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,381 @@
+/*
+ * 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.Arrays;
+import java.util.Locale;
+import java.util.Objects;
+import java.util.ResourceBundle;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import resources.ListBundle;
+
+/**
+ * @test
+ * @bug 8013839
+ * @summary tests Logger.logrb(..., ResourceBundle);
+ * @build TestLogrbResourceBundle resources.ListBundle resources.ListBundle_fr
+ * @run main TestLogrbResourceBundle
+ * @author danielfuchs
+ */
+public class TestLogrbResourceBundle {
+
+    final static String LIST_BUNDLE_NAME = "resources.ListBundle";
+    final static String PROPERTY_BUNDLE_NAME = "resources.PropertyBundle";
+
+    /**
+     * A dummy handler class that we can use to check the bundle/bundle name
+     * that was present in the last LogRecord instance published.
+     */
+    static final class TestHandler extends Handler {
+        ResourceBundle lastBundle = null;
+        String lastBundleName = null;
+        Object[] lastParams = null;
+        Throwable lastThrown = null;
+        String lastMessage = null;
+        @Override
+        public void publish(LogRecord record) {
+            lastBundle = record.getResourceBundle();
+            lastBundleName = record.getResourceBundleName();
+            lastParams = record.getParameters();
+            lastThrown = record.getThrown();
+            lastMessage = record.getMessage();
+        }
+
+        @Override
+        public void flush() {
+        }
+
+        @Override
+        public void close() throws SecurityException {
+        }
+    }
+
+    /**
+     * We're going to do the same test with each of the different new logrb
+     * forms.
+     * <ul>
+     *    <li> LOGRB_NO_ARGS: calling logrb with no message argument.
+     *    <li> LOGRB_SINGLE_ARG: calling logrb with a single message argument.
+     *    <li> LOGRB_ARG_ARRAY: calling logrb with an array of message arguments.
+     *    <li> LOGRB_VARARGS: calling logrb with a variable list of message arguments.
+     *    <li> LOGRB_THROWABLE: calling logrb with an exception.
+     * </ul>
+     */
+    private static enum TestCase {
+        LOGRB_NO_ARGS, LOGRB_SINGLE_ARG, LOGRB_ARG_ARRAY, LOGRB_VARARGS, LOGRB_THROWABLE;
+
+        public void logrb(Logger logger, ResourceBundle bundle) {
+            switch(this) {
+                case LOGRB_NO_ARGS:
+                    logger.logrb(Level.CONFIG,
+                            TestLogrbResourceBundle.class.getName(),
+                            "main", bundle, "dummy");
+                    break;
+                case LOGRB_SINGLE_ARG:
+                    logger.logrb(Level.CONFIG,
+                            TestLogrbResourceBundle.class.getName(),
+                            "main", bundle, "dummy", "bar");
+                    break;
+                case LOGRB_ARG_ARRAY:
+                    logger.logrb(Level.CONFIG,
+                            TestLogrbResourceBundle.class.getName(),
+                            "main", bundle, "dummy",
+                            new Object[] { "bar", "baz"} );
+                    break;
+                case LOGRB_VARARGS:
+                    logger.logrb(Level.CONFIG,
+                            TestLogrbResourceBundle.class.getName(),
+                            "main", bundle, "dummy",
+                            "bar", "baz" );
+                    break;
+                case LOGRB_THROWABLE:
+                    logger.logrb(Level.CONFIG,
+                            TestLogrbResourceBundle.class.getName(),
+                            "main", bundle, "dummy",
+                            new Exception("dummy exception") );
+                    break;
+                default:
+            }
+        }
+
+        /**
+         * Checks that the last published logged record had the expected data.
+         * @param handler the TestHandler through which the record was published.
+         */
+        public void checkLogged(TestHandler handler) {
+            checkLogged(handler.lastMessage, handler.lastParams, handler.lastThrown);
+        }
+
+        private void checkLogged(String message, Object[] parameters, Throwable thrown) {
+            switch(this) {
+                case LOGRB_NO_ARGS:
+                    if ("dummy".equals(message) && thrown == null
+                            && (parameters == null || parameters.length == 0)) {
+                        return; // OK: all was as expected.
+                    }
+                    break;
+                case LOGRB_SINGLE_ARG:
+                    if ("dummy".equals(message) && thrown == null
+                            && parameters != null
+                            && parameters.length == 1
+                            && "bar".equals(parameters[0])) {
+                        return; // OK: all was as expected.
+                    }
+                    break;
+                case LOGRB_VARARGS:
+                case LOGRB_ARG_ARRAY:
+                    if ("dummy".equals(message) && thrown == null
+                            && parameters != null
+                            && parameters.length > 1
+                            && Arrays.deepEquals(new Object[] { "bar", "baz"},
+                                    parameters)) {
+                        return; // OK: all was as expected.
+                    }
+                    break;
+                case LOGRB_THROWABLE:
+                    if ("dummy".equals(message) && thrown != null
+                            && thrown.getClass() == Exception.class
+                            && "dummy exception".equals(thrown.getMessage())) {
+                        return; // OK: all was as expected.
+                    }
+                    break;
+                default:
+            }
+
+            // We had some unexpected stuff: throw exception.
+            throw new RuntimeException(this + ": "
+                    + "Unexpected content in last published log record: "
+                    + "\n\tmessage=\"" + message + "\""
+                    + "\n\tparameters=" + Arrays.toString(parameters)
+                    + "\n\tthrown=" + thrown);
+        }
+    }
+
+    static String getBaseName(ResourceBundle bundle) {
+        return bundle == null ? null : bundle.getBaseBundleName();
+    }
+
+    public static void main(String... args) throws Exception {
+
+        Locale defaultLocale = Locale.getDefault();
+
+        final ResourceBundle bundle = ResourceBundle.getBundle(LIST_BUNDLE_NAME);
+        final ResourceBundle bundle_fr =
+                    ResourceBundle.getBundle(LIST_BUNDLE_NAME, Locale.FRENCH);
+        final ResourceBundle propertyBundle = ResourceBundle.getBundle(PROPERTY_BUNDLE_NAME);
+        final ResourceBundle propertyBundle_fr =
+                    ResourceBundle.getBundle(PROPERTY_BUNDLE_NAME, Locale.FRENCH);
+        Logger foobar = Logger.getLogger("foo.bar");
+        final TestHandler handler = new TestHandler();
+        foobar.addHandler(handler);
+        foobar.setLevel(Level.CONFIG);
+
+        final ResourceBundle anonBundle = new ListBundle();
+        try {
+            // First we're going to call logrb on a logger that
+            // has no bundle set...
+
+            // For each possible logrb form...
+            for (TestCase test : TestCase.values()) {
+                // For various resource bundles
+                for (ResourceBundle b : new ResourceBundle[] {
+                    anonBundle, bundle, bundle_fr, propertyBundle,
+                    anonBundle, null, propertyBundle_fr,
+                }) {
+                    // Prints the resource bundle base name (can be null,
+                    //   we don't enforce non-null names in logrb.
+                    final String baseName = getBaseName(b);
+                    System.out.println("Testing " + test + " with " + baseName);
+
+                    // log in the 'foobar' logger using bundle 'b'
+                    test.logrb(foobar, b);
+
+                    // check that the correct bundle was set in the published
+                    // LogRecord
+                    if (handler.lastBundle != b) {
+                        throw new RuntimeException("Unexpected bundle: "
+                                + handler.lastBundle);
+                    }
+
+                    // check that the correct bundle name was set in the published
+                    // LogRecord
+                    if (!Objects.equals(handler.lastBundleName, baseName)) {
+                        throw new RuntimeException("Unexpected bundle name: "
+                                + handler.lastBundleName);
+                    }
+
+                    // check that calling foobar.logrb() had no side effect on
+                    // the bundle used by foobar. foobar should still have no
+                    // bundle set.
+                    if (foobar.getResourceBundle() != null) {
+                        throw new RuntimeException("Unexpected bundle: "
+                            + foobar.getResourceBundle());
+                    }
+                    if (foobar.getResourceBundleName() != null) {
+                        throw new RuntimeException("Unexpected bundle: "
+                            + foobar.getResourceBundleName());
+                    }
+
+                    // Test that the last published log record had all the
+                    // data that this test case had logged (message, parameters,
+                    // thrown...
+                    test.checkLogged(handler);
+                }
+            }
+
+            // No we're going to set a resource bundle on the foobar logger
+            // and do it all again...
+
+            // For the same bundle in two different locales
+            for (ResourceBundle propBundle : new ResourceBundle[] {
+                propertyBundle, propertyBundle_fr,
+            }) {
+
+                // set the bundle on foobar...
+                foobar.setResourceBundle(propBundle);
+
+                // check the bundle was correctly set...
+                if (!propBundle.equals(foobar.getResourceBundle())) {
+                    throw new RuntimeException("Unexpected bundle: "
+                            + foobar.getResourceBundle());
+                }
+                if (!Objects.equals(getBaseName(propBundle), foobar.getResourceBundleName())) {
+                    throw new RuntimeException("Unexpected bundle name: "
+                            + foobar.getResourceBundleName());
+                }
+
+                System.out.println("Configuring " + foobar.getName() + " with "
+                        + propBundle);
+
+                // for each possible logrb form...
+                for (TestCase test : TestCase.values()) {
+
+                    // for various resource bundles
+                    for (ResourceBundle b : new ResourceBundle[] {
+                        anonBundle, bundle, null, bundle_fr, propertyBundle,
+                        anonBundle, propertyBundle_fr,
+                    }) {
+
+                        final String baseName = getBaseName(b);
+                        System.out.println("Testing " + test + " with " + baseName);
+
+                        // call foobar.logrb
+                        test.logrb(foobar, b);
+
+                        // check which resource bundle was used (should be
+                        // the one passed to logrb)
+                        if (handler.lastBundle != b) {
+                            throw new RuntimeException("Unexpected bundle: "
+                                    + handler.lastBundle);
+                        }
+                        if (!Objects.equals(handler.lastBundleName, baseName)) {
+                            throw new RuntimeException("Unexpected bundle name: "
+                                    + handler.lastBundleName);
+                        }
+
+                        // Verify there was no side effect on the bundle that
+                        // had been previously set on the logger...
+                        if (foobar.getResourceBundle() != propBundle) {
+                            throw new RuntimeException("Unexpected bundle: "
+                                + foobar.getResourceBundle());
+                        }
+                        if (!Objects.equals(getBaseName(propBundle),
+                                foobar.getResourceBundleName())) {
+                            throw new RuntimeException("Unexpected bundle name: "
+                                + foobar.getResourceBundleName());
+                        }
+
+                        // Checked that the published LogRecord had the
+                        // expected content logged by this test case.
+                        test.checkLogged(handler);
+                    }
+                }
+            }
+
+            // Now we're going to the same thing, but with a logger which
+            // has an inherited resource bundle.
+            Logger foobaz = Logger.getLogger("foo.bar.baz");
+
+            // check that foobaz has no bundle set locally.
+            if (foobaz.getResourceBundle() != null) {
+                throw new RuntimeException("Unexpected bundle: "
+                        + foobaz.getResourceBundle());
+            }
+            if (foobaz.getResourceBundleName() != null) {
+                throw new RuntimeException("Unexpected bundle: "
+                        + foobaz.getResourceBundle());
+            }
+
+            // The current locale should have no effect on logrb.
+            Locale.setDefault(Locale.GERMAN); // shouldn't change anything...
+
+            // for each possible logrb form
+            for (TestCase test : TestCase.values()) {
+
+                // for various resource bundle
+                for (ResourceBundle b : new ResourceBundle[] {
+                    anonBundle, bundle, bundle_fr, propertyBundle, null,
+                     anonBundle, propertyBundle_fr,
+                }) {
+                    final String baseName = getBaseName(b);
+                    System.out.println("Testing " + test + " with "
+                            + foobaz.getName() + " and "
+                            + baseName);
+
+                    // call foobaz.logrb with the bundle
+                    test.logrb(foobaz, b);
+
+                    // check that the bundle passed to logrb was used.
+                    if (handler.lastBundle != b) {
+                        throw new RuntimeException("Unexpected bundle: "
+                                + handler.lastBundle);
+                    }
+                    if (!Objects.equals(handler.lastBundleName, baseName)) {
+                        throw new RuntimeException("Unexpected bundle name: "
+                                + handler.lastBundleName);
+                    }
+
+                    // check that there was no effect on the bundle set
+                    // on foobaz: it should still be null.
+                    if (foobaz.getResourceBundle() != null) {
+                        throw new RuntimeException("Unexpected bundle: "
+                            + foobaz.getResourceBundle());
+                    }
+                    if (foobaz.getResourceBundleName() != null) {
+                        throw new RuntimeException("Unexpected bundle: "
+                            + foobaz.getResourceBundleName());
+                    }
+
+                    // check that the last published log record had all the
+                    // data that was logged by this testcase.
+                    test.checkLogged(handler);
+                }
+            }
+
+        } finally {
+            Locale.setDefault(defaultLocale);
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/logrb/resources/ListBundle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ */
+package resources;
+
+import java.util.ListResourceBundle;
+
+/**
+ *
+ * @author danielfuchs
+ */
+public class ListBundle extends ListResourceBundle {
+
+    @Override
+    protected Object[][] getContents() {
+        return new Object[][] {
+            { "dummy", "foo" },
+        };
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/logrb/resources/ListBundle_fr.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ */
+package resources;
+
+import java.util.ListResourceBundle;
+
+/**
+ *
+ * @author danielfuchs
+ */
+public class ListBundle_fr extends ListResourceBundle {
+
+    @Override
+    protected Object[][] getContents() {
+        return new Object[][] {
+            { "dummy", "toto" },
+        };
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/logrb/resources/PropertyBundle.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute 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.
+#
+dummy=foo
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/logrb/resources/PropertyBundle_fr.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+dummy=toto
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/setResourceBundle/TestSetResourceBundle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,393 @@
+/*
+ * 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.security.AccessControlException;
+import java.security.Permission;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Locale;
+import java.util.Objects;
+import java.util.PropertyPermission;
+import java.util.ResourceBundle;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+import resources.ListBundle;
+
+/**
+ * @test
+ * @bug 8013839
+ * @summary tests Logger.setResourceBundle;
+ * @build TestSetResourceBundle resources.ListBundle resources.ListBundle_fr
+ * @run main/othervm TestSetResourceBundle UNSECURE
+ * @run main/othervm TestSetResourceBundle PERMISSION
+ * @run main/othervm TestSetResourceBundle SECURE
+ * @author danielfuchs
+ */
+public class TestSetResourceBundle {
+
+    final static String LIST_BUNDLE_NAME = "resources.ListBundle";
+    final static String PROPERTY_BUNDLE_NAME = "resources.PropertyBundle";
+
+    /**
+     * A dummy handler class that we can use to check the bundle/bundle name
+     * that was present in the last LogRecord instance published.
+     */
+    static final class TestHandler extends Handler {
+        ResourceBundle lastBundle = null;
+        String lastBundleName = null;
+        @Override
+        public void publish(LogRecord record) {
+            lastBundle = record.getResourceBundle();
+            lastBundleName = record.getResourceBundleName();
+        }
+
+        @Override
+        public void flush() {
+        }
+
+        @Override
+        public void close() throws SecurityException {
+        }
+    }
+
+    /**
+     * We will test setResourceBundle() in 3 configurations.
+     * UNSECURE: No security manager.
+     * SECURE: With the security manager present - and the required
+     *         LoggingPermission("control") granted.
+     * PERMISSION: With the security manager present - and the required
+     *         LoggingPermission("control") *not* granted. Here we will
+     *         test that the expected security permission is thrown.
+     */
+    public static enum TestCase {
+        UNSECURE, SECURE, PERMISSION;
+        public void run(String name) throws Exception {
+            System.out.println("Running test case: " + name());
+            switch (this) {
+                case UNSECURE:
+                    testUnsecure(name);
+                    break;
+                case SECURE:
+                    testSecure(name);
+                    break;
+                case PERMISSION:
+                    testPermission(name);
+                    break;
+                default:
+                    throw new Error("Unknown test case: "+this);
+            }
+        }
+        public String loggerName(String name) {
+            return name().toLowerCase(Locale.ROOT) + "." + name;
+        }
+    }
+
+    public static void main(String... args) throws Exception {
+
+        Locale defaultLocale = Locale.getDefault();
+
+        if (args == null || args.length == 0) {
+            args = new String[] {
+                TestCase.UNSECURE.name(),
+                TestCase.SECURE.name()
+            };
+        }
+
+        for (String testName : args) {
+            TestCase test = TestCase.valueOf(testName);
+            try {
+                test.run(test.loggerName("foo.bar"));
+            } finally {
+                Locale.setDefault(defaultLocale);
+            }
+        }
+    }
+
+    /**
+     * Test without security manager.
+     * @param loggerName The logger to use.
+     * @throws Exception if the test fails.
+     */
+    public static void testUnsecure(String loggerName) throws Exception {
+        if (System.getSecurityManager() != null) {
+            throw new Error("Security manager is set");
+        }
+        test(loggerName);
+    }
+
+    /**
+     * Test with security manager.
+     * @param loggerName The logger to use.
+     * @throws Exception if the test fails.
+     */
+    public static void testSecure(String loggerName) throws Exception {
+        if (System.getSecurityManager() != null) {
+            throw new Error("Security manager is already set");
+        }
+        Policy.setPolicy(new SimplePolicy(TestCase.SECURE));
+        System.setSecurityManager(new SecurityManager());
+        test(loggerName);
+    }
+
+    /**
+     * Test the LoggingPermission("control") is required.
+     * @param loggerName The logger to use.
+     */
+    public static void testPermission(String loggerName) {
+        if (System.getSecurityManager() != null) {
+            throw new Error("Security manager is already set");
+        }
+        Policy.setPolicy(new SimplePolicy(TestCase.PERMISSION));
+        System.setSecurityManager(new SecurityManager());
+        final ResourceBundle bundle = ResourceBundle.getBundle(LIST_BUNDLE_NAME);
+        Logger foobar = Logger.getLogger(loggerName);
+        try {
+            foobar.setResourceBundle(bundle);
+            throw new RuntimeException("Permission not checked!");
+        } catch (AccessControlException x) {
+            if (x.getPermission() instanceof LoggingPermission) {
+                if ("control".equals(x.getPermission().getName())) {
+                    System.out.println("Got expected exception: " + x);
+                    return;
+                }
+            }
+            throw new RuntimeException("Unexpected exception: "+x, x);
+        }
+
+    }
+
+    static String getBaseName(ResourceBundle bundle) {
+        return bundle == null ? null : bundle.getBaseBundleName();
+    }
+
+    public static void test(String loggerName) throws Exception {
+
+        final ResourceBundle bundle = ResourceBundle.getBundle(LIST_BUNDLE_NAME);
+        Logger foobar = Logger.getLogger(loggerName);
+
+        // Checks that IAE is thrown if the bundle has a null base name.
+        try {
+            foobar.setResourceBundle(new ListBundle());
+            throw new RuntimeException("Expected exception not raised!");
+        } catch (IllegalArgumentException x) {
+            System.out.println("Got expected exception: " + x);
+        }
+
+        // Verify that resource bundle was not set.
+        if (foobar.getResourceBundle() != null) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + foobar.getResourceBundle());
+        }
+        if (foobar.getResourceBundleName() != null) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + foobar.getResourceBundleName());
+        }
+
+        // Set acceptable resource bundle on logger.
+        foobar.setResourceBundle(bundle);
+
+        // check that the bundle has been set correctly
+        if (bundle != foobar.getResourceBundle()) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + foobar.getResourceBundle());
+        }
+        if (!Objects.equals(getBaseName(bundle), foobar.getResourceBundleName())) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + foobar.getResourceBundleName());
+        }
+
+        // Check that we can replace the bundle with a bundle of the same name.
+        final ResourceBundle bundle_fr =
+                ResourceBundle.getBundle(LIST_BUNDLE_NAME, Locale.FRENCH);
+        foobar.setResourceBundle(bundle_fr);
+
+        if (bundle_fr != foobar.getResourceBundle()) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + foobar.getResourceBundle());
+        }
+        if (!Objects.equals(getBaseName(bundle_fr), foobar.getResourceBundleName())) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + foobar.getResourceBundleName());
+        }
+
+        // Create a child logger
+        Logger foobaz = Logger.getLogger(loggerName + ".baz");
+
+        // Check that the child logger does not have a bundle set locally
+        if (foobaz.getResourceBundle() != null) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + foobar.getResourceBundle());
+        }
+        if (foobaz.getResourceBundleName() != null) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + foobar.getResourceBundleName());
+        }
+
+
+        // Add a handler on the child logger.
+        final TestHandler handler = new TestHandler();
+        foobaz.addHandler(handler);
+
+        // log a message on the child logger
+        foobaz.severe("dummy");
+
+        // checks that the message has been logged with the bundle
+        // inherited from the parent logger
+        if (!LIST_BUNDLE_NAME.equals(handler.lastBundleName)) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + handler.lastBundleName);
+        }
+        if (!bundle_fr.equals(handler.lastBundle)) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + handler.lastBundle);
+        }
+
+        // Check that we can get set a bundle on the child logger
+        // using Logger.getLogger.
+        foobaz = Logger.getLogger(loggerName + ".baz", PROPERTY_BUNDLE_NAME);
+
+        // check that the child logger has the correct bundle.
+        // it should no longer inherit it from its parent.
+        if (!PROPERTY_BUNDLE_NAME.equals(foobaz.getResourceBundleName())) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + foobaz.getResourceBundleName());
+        }
+        if (!PROPERTY_BUNDLE_NAME.equals(foobaz.getResourceBundle().getBaseBundleName())) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + foobaz.getResourceBundle().getBaseBundleName());
+        }
+
+        // log a message on the child logger
+        foobaz.severe("dummy");
+
+        // check that the last published log record has the appropriate
+        // bundle.
+        if (!PROPERTY_BUNDLE_NAME.equals(handler.lastBundleName)) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + handler.lastBundleName);
+        }
+        if (foobaz.getResourceBundle() != handler.lastBundle) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + handler.lastBundle);
+        }
+
+        // try to set a bundle that has a different name, and checks that
+        // it fails in IAE.
+        try {
+            foobaz.setResourceBundle(bundle_fr);
+            throw new RuntimeException("Expected exception not raised!");
+        } catch (IllegalArgumentException x) {
+            System.out.println("Got expected exception: " + x);
+        }
+
+        // Test with a subclass of logger which overrides
+        // getResourceBundle() and getResourceBundleName()
+        Logger customLogger = new Logger(foobar.getName()+".bie", null) {
+            @Override
+            public ResourceBundle getResourceBundle() {
+                return bundle_fr;
+            }
+
+            @Override
+            public String getResourceBundleName() {
+                return PROPERTY_BUNDLE_NAME;
+            }
+        };
+
+        final TestHandler handler2 = new TestHandler();
+        customLogger.addHandler(handler2);
+        customLogger.setLevel(Level.FINE);
+        LogManager.getLogManager().addLogger(customLogger);
+
+        Logger l = Logger.getLogger(customLogger.getName());
+        if (l != customLogger) {
+            throw new RuntimeException("Wrong logger: " + l);
+        }
+
+        // log on the custom logger.
+        customLogger.fine("dummy");
+
+        // check that the log record had the correct bundle.
+        if (! PROPERTY_BUNDLE_NAME.equals(handler2.lastBundleName)) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + handler2.lastBundleName);
+        }
+        if (! PROPERTY_BUNDLE_NAME.equals(customLogger.getResourceBundleName())) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + customLogger.getResourceBundleName());
+        }
+        if (bundle_fr != handler2.lastBundle) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + handler2.lastBundle);
+        }
+        if (bundle_fr != customLogger.getResourceBundle()) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + customLogger.getResourceBundle());
+        }
+
+        // Do the same thing again with a child of the custom logger.
+        Logger biebar = Logger.getLogger(customLogger.getName() + ".bar");
+        biebar.fine("dummy");
+
+        // because getResourceBundleName() is called on parent logger
+        //         we will have handler2.lastBundleName = PROPERTY_BUNDLE_NAME
+        if (!PROPERTY_BUNDLE_NAME.equals(handler2.lastBundleName)) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + handler2.lastBundleName);
+        }
+        // because getResourceBundle() is not called on parent logger
+        //         we will have getBaseName(handler2.lastBundle) = PROPERTY_BUNDLE_NAME
+        //         and not handler2.lastBundle = bundle_fr
+        if (handler2.lastBundle == null) {
+            throw new RuntimeException("Unexpected bundle: "
+                    + handler2.lastBundle);
+        }
+        if (!PROPERTY_BUNDLE_NAME.equals(getBaseName(handler2.lastBundle))) {
+            throw new RuntimeException("Unexpected bundle name: "
+                    + getBaseName(handler2.lastBundle));
+        }
+    }
+
+    public static class SimplePolicy extends Policy {
+
+        final Permissions permissions;
+        public SimplePolicy(TestCase test) {
+            permissions = new Permissions();
+            if (test != TestCase.PERMISSION) {
+                permissions.add(new LoggingPermission("control", null));
+            }
+            // required for calling Locale.setDefault in the test.
+            permissions.add(new PropertyPermission("user.language", "write"));
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain domain, Permission permission) {
+            return permissions.implies(permission);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/setResourceBundle/resources/ListBundle.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ */
+package resources;
+
+import java.util.ListResourceBundle;
+
+/**
+ *
+ * @author danielfuchs
+ */
+public class ListBundle extends ListResourceBundle {
+
+    @Override
+    protected Object[][] getContents() {
+        return new Object[][] {
+            { "dummy", "foo" },
+        };
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/setResourceBundle/resources/ListBundle_fr.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ */
+package resources;
+
+import java.util.ListResourceBundle;
+
+/**
+ *
+ * @author danielfuchs
+ */
+public class ListBundle_fr extends ListResourceBundle {
+
+    @Override
+    protected Object[][] getContents() {
+        return new Object[][] {
+            { "dummy", "toto" },
+        };
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/setResourceBundle/resources/PropertyBundle.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute 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.
+#
+dummy=foo
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/setResourceBundle/resources/PropertyBundle_fr.properties	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+dummy=toto
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/TestMainAppContext.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.logging.Logger;
+import sun.awt.AppContext;
+import sun.awt.SunToolkit;
+
+
+/**
+ * @test
+ * @bug 8026404
+ * @summary checks that calling getLogger() from a Thread whose ThreadGroup is
+ *          a child of the main root group doesn't throw an exception.
+ * @build TestMainAppContext
+ * @run main/othervm TestMainAppContext
+ * @author danielfuchs
+ */
+public class TestMainAppContext {
+
+    static volatile Throwable thrown = null;
+
+    public static void main(String... args) throws Exception {
+        ThreadGroup rootTG = Thread.currentThread().getThreadGroup();
+        while (rootTG.getParent() != null) {
+            rootTG = rootTG.getParent();
+        }
+
+        ThreadGroup tg = new ThreadGroup(rootTG, "FakeApplet");
+        final Thread t1 = new Thread(tg, "createNewAppContext") {
+            @Override
+            public void run() {
+                try {
+                    AppContext context = SunToolkit.createNewAppContext();
+                } catch(Throwable t) {
+                    thrown = t;
+                }
+            }
+        };
+        t1.start();
+        t1.join();
+        if (thrown != null) {
+            throw new RuntimeException("Unexpected exception: " + thrown, thrown);
+        }
+        Thread t2 = new Thread(tg, "BugDetector") {
+
+            @Override
+            public void run() {
+                try {
+                    Logger.getLogger("foo").info("Done");
+                } catch (Throwable x) {
+                    thrown = x;
+                }
+            }
+
+        };
+
+        System.setSecurityManager(new SecurityManager());
+        t2.start();
+        t2.join();
+        if (thrown != null) {
+            throw new RuntimeException("Test failed: " + thrown, thrown);
+        }
+
+    }
+
+}
--- a/test/java/util/stream/boottest/java/util/stream/SpinedBufferTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/stream/boottest/java/util/stream/SpinedBufferTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -109,7 +109,7 @@
 
         List<Integer> end = Arrays.stream(array)
                 .boxed()
-                .substream(array.length - lastSplitSize)
+                .skip(array.length - lastSplitSize)
                 .collect(Collectors.toList());
         assertEquals(contentOfLastSplit, end);
     }
@@ -184,7 +184,7 @@
 
         List<Integer> end = Arrays.stream(array)
                 .boxed()
-                .substream(array.length - lastSplitSize)
+                .skip(array.length - lastSplitSize)
                 .collect(Collectors.toList());
         assertEquals(contentOfLastSplit, end);
     }
@@ -259,7 +259,7 @@
 
         List<Long> end = Arrays.stream(array)
                 .boxed()
-                .substream(array.length - lastSplitSize)
+                .skip(array.length - lastSplitSize)
                 .collect(Collectors.toList());
         assertEquals(contentOfLastSplit, end);
     }
@@ -335,7 +335,7 @@
 
         List<Double> end = Arrays.stream(array)
                 .boxed()
-                .substream(array.length - lastSplitSize)
+                .skip(array.length - lastSplitSize)
                 .collect(Collectors.toList());
         assertEquals(contentOfLastSplit, end);
     }
--- a/test/java/util/stream/test/org/openjdk/tests/java/util/stream/InfiniteStreamWithLimitOpTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/stream/test/org/openjdk/tests/java/util/stream/InfiniteStreamWithLimitOpTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -63,10 +63,8 @@
 
         data.add(new Object[]{f.apply("Stream.limit(%d)"),
                 (UnaryOperator<Stream>) s -> s.limit(SKIP_LIMIT_SIZE)});
-        data.add(new Object[]{f.apply("Stream.substream(%d)"),
-                (UnaryOperator<Stream>) s -> s.substream(SKIP_LIMIT_SIZE, SKIP_LIMIT_SIZE * 2)});
-        data.add(new Object[]{f.apply("Stream.substream(%1$d).limit(%1$d)"),
-                (UnaryOperator<Stream>) s -> s.substream(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)});
+        data.add(new Object[]{f.apply("Stream.skip(%1$d).limit(%1$d)"),
+                (UnaryOperator<Stream>) s -> s.skip(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)});
 
         return data.toArray(new Object[0][]);
     }
@@ -79,10 +77,8 @@
 
         data.add(new Object[]{f.apply("IntStream.limit(%d)"),
                 (UnaryOperator<IntStream>) s -> s.limit(SKIP_LIMIT_SIZE)});
-        data.add(new Object[]{f.apply("IntStream.substream(%d)"),
-                (UnaryOperator<IntStream>) s -> s.substream(SKIP_LIMIT_SIZE, SKIP_LIMIT_SIZE * 2)});
-        data.add(new Object[]{f.apply("IntStream.substream(%1$d).limit(%1$d)"),
-                (UnaryOperator<IntStream>) s -> s.substream(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)});
+        data.add(new Object[]{f.apply("IntStream.skip(%1$d).limit(%1$d)"),
+                (UnaryOperator<IntStream>) s -> s.skip(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)});
 
         return data.toArray(new Object[0][]);
     }
@@ -95,10 +91,8 @@
 
         data.add(new Object[]{f.apply("LongStream.limit(%d)"),
                 (UnaryOperator<LongStream>) s -> s.limit(SKIP_LIMIT_SIZE)});
-        data.add(new Object[]{f.apply("LongStream.substream(%d)"),
-                (UnaryOperator<LongStream>) s -> s.substream(SKIP_LIMIT_SIZE, SKIP_LIMIT_SIZE * 2)});
-        data.add(new Object[]{f.apply("LongStream.substream(%1$d).limit(%1$d)"),
-                (UnaryOperator<LongStream>) s -> s.substream(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)});
+        data.add(new Object[]{f.apply("LongStream.skip(%1$d).limit(%1$d)"),
+                (UnaryOperator<LongStream>) s -> s.skip(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)});
 
         return data.toArray(new Object[0][]);
     }
@@ -111,10 +105,8 @@
 
         data.add(new Object[]{f.apply("DoubleStream.limit(%d)"),
                 (UnaryOperator<DoubleStream>) s -> s.limit(SKIP_LIMIT_SIZE)});
-        data.add(new Object[]{f.apply("DoubleStream.substream(%d)"),
-                (UnaryOperator<DoubleStream>) s -> s.substream(SKIP_LIMIT_SIZE, SKIP_LIMIT_SIZE * 2)});
-        data.add(new Object[]{f.apply("DoubleStream.substream(%1$d).limit(%1$d)"),
-                (UnaryOperator<DoubleStream>) s -> s.substream(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)});
+        data.add(new Object[]{f.apply("DoubleStream.skip(%1$d).limit(%1$d)"),
+                (UnaryOperator<DoubleStream>) s -> s.skip(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)});
 
         return data.toArray(new Object[0][]);
     }
--- a/test/java/util/stream/test/org/openjdk/tests/java/util/stream/IntSliceOpTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/stream/test/org/openjdk/tests/java/util/stream/IntSliceOpTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -44,27 +44,27 @@
     private static final int[] EMPTY_INT_ARRAY = new int[0];
 
     public void testSkip() {
-        assertCountSum(IntStream.range(0, 0).substream(0).boxed(), 0, 0);
-        assertCountSum(IntStream.range(0, 0).substream(4).boxed(), 0, 0);
-        assertCountSum(IntStream.range(1, 5).substream(4).boxed(), 0, 0);
-        assertCountSum(IntStream.range(1, 5).substream(2).boxed(), 2, 7);
-        assertCountSum(IntStream.range(1, 5).substream(0).boxed(), 4, 10);
+        assertCountSum(IntStream.range(0, 0).skip(0).boxed(), 0, 0);
+        assertCountSum(IntStream.range(0, 0).skip(4).boxed(), 0, 0);
+        assertCountSum(IntStream.range(1, 5).skip(4).boxed(), 0, 0);
+        assertCountSum(IntStream.range(1, 5).skip(2).boxed(), 2, 7);
+        assertCountSum(IntStream.range(1, 5).skip(0).boxed(), 4, 10);
 
-        assertCountSum(IntStream.range(0, 0).parallel().substream(0).boxed(), 0, 0);
-        assertCountSum(IntStream.range(0, 0).parallel().substream(4).boxed(), 0, 0);
-        assertCountSum(IntStream.range(1, 5).parallel().substream(4).boxed(), 0, 0);
-        assertCountSum(IntStream.range(1, 5).parallel().substream(2).boxed(), 2, 7);
-        assertCountSum(IntStream.range(1, 5).parallel().substream(0).boxed(), 4, 10);
+        assertCountSum(IntStream.range(0, 0).parallel().skip(0).boxed(), 0, 0);
+        assertCountSum(IntStream.range(0, 0).parallel().skip(4).boxed(), 0, 0);
+        assertCountSum(IntStream.range(1, 5).parallel().skip(4).boxed(), 0, 0);
+        assertCountSum(IntStream.range(1, 5).parallel().skip(2).boxed(), 2, 7);
+        assertCountSum(IntStream.range(1, 5).parallel().skip(0).boxed(), 4, 10);
 
-        exerciseOps(EMPTY_INT_ARRAY, s -> s.substream(0), EMPTY_INT_ARRAY);
-        exerciseOps(EMPTY_INT_ARRAY, s -> s.substream(10), EMPTY_INT_ARRAY);
+        exerciseOps(EMPTY_INT_ARRAY, s -> s.skip(0), EMPTY_INT_ARRAY);
+        exerciseOps(EMPTY_INT_ARRAY, s -> s.skip(10), EMPTY_INT_ARRAY);
 
-        exerciseOps(IntStream.range(1, 2).toArray(), s -> s.substream(0), IntStream.range(1, 2).toArray());
-        exerciseOps(IntStream.range(1, 2).toArray(), s -> s.substream(1), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(0), IntStream.range(1, 101).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(10), IntStream.range(11, 101).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(100), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(200), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 2).toArray(), s -> s.skip(0), IntStream.range(1, 2).toArray());
+        exerciseOps(IntStream.range(1, 2).toArray(), s -> s.skip(1), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(0), IntStream.range(1, 101).toArray());
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(10), IntStream.range(11, 101).toArray());
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(100), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(200), EMPTY_INT_ARRAY);
     }
 
     public void testLimit() {
@@ -92,41 +92,23 @@
     }
 
     public void testSkipLimit() {
-        exerciseOps(EMPTY_INT_ARRAY, s -> s.substream(0).limit(0), EMPTY_INT_ARRAY);
-        exerciseOps(EMPTY_INT_ARRAY, s -> s.substream(0).limit(10), EMPTY_INT_ARRAY);
-        exerciseOps(EMPTY_INT_ARRAY, s -> s.substream(10).limit(0), EMPTY_INT_ARRAY);
-        exerciseOps(EMPTY_INT_ARRAY, s -> s.substream(10).limit(10), EMPTY_INT_ARRAY);
+        exerciseOps(EMPTY_INT_ARRAY, s -> s.skip(0).limit(0), EMPTY_INT_ARRAY);
+        exerciseOps(EMPTY_INT_ARRAY, s -> s.skip(0).limit(10), EMPTY_INT_ARRAY);
+        exerciseOps(EMPTY_INT_ARRAY, s -> s.skip(10).limit(0), EMPTY_INT_ARRAY);
+        exerciseOps(EMPTY_INT_ARRAY, s -> s.skip(10).limit(10), EMPTY_INT_ARRAY);
 
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(0).limit(100), IntStream.range(1, 101).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(0).limit(10), IntStream.range(1, 11).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(0).limit(0), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(10).limit(100), IntStream.range(11, 101).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(10).limit(10), IntStream.range(11, 21).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(10).limit(0), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(100).limit(100), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(100).limit(10), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(100).limit(0), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(200).limit(100), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(200).limit(10), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(200).limit(0), EMPTY_INT_ARRAY);
-    }
-
-    public void testSlice() {
-        exerciseOps(EMPTY_INT_ARRAY, s -> s.substream(0, 0), EMPTY_INT_ARRAY);
-        exerciseOps(EMPTY_INT_ARRAY, s -> s.substream(10, 10), EMPTY_INT_ARRAY);
-
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(0, 100), IntStream.range(1, 101).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(0, 10), IntStream.range(1, 11).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(0, 0), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(10, 110), IntStream.range(11, 101).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(10, 20), IntStream.range(11, 21).toArray());
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(10, 10), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(100, 200), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(100, 110), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(100, 100), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(200, 300), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(200, 210), EMPTY_INT_ARRAY);
-        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.substream(200, 200), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(0).limit(100), IntStream.range(1, 101).toArray());
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(0).limit(10), IntStream.range(1, 11).toArray());
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(0).limit(0), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(10).limit(100), IntStream.range(11, 101).toArray());
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(10).limit(10), IntStream.range(11, 21).toArray());
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(10).limit(0), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(100).limit(100), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(100).limit(10), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(100).limit(0), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(200).limit(100), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(200).limit(10), EMPTY_INT_ARRAY);
+        exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(200).limit(0), EMPTY_INT_ARRAY);
     }
 
     private int sliceSize(int dataSize, int skip, int limit) {
@@ -146,10 +128,10 @@
 
         for (int s : skips) {
             setContext("skip", s);
-            Collection<Integer> sr = exerciseOps(data, st -> st.substream(s));
+            Collection<Integer> sr = exerciseOps(data, st -> st.skip(s));
             assertEquals(sr.size(), sliceSize(data.size(), s));
 
-            sr = exerciseOps(data, st -> st.substream(s).substream(s / 2));
+            sr = exerciseOps(data, st -> st.skip(s).skip(s / 2));
             assertEquals(sr.size(), sliceSize(sliceSize(data.size(), s), s / 2));
         }
     }
@@ -163,10 +145,10 @@
             setContext("skip", s);
             for (int limit : limits) {
                 setContext("limit", limit);
-                Collection<Integer> sr = exerciseOps(data, st -> st.substream(s).limit(limit));
+                Collection<Integer> sr = exerciseOps(data, st -> st.skip(s).limit(limit));
                 assertEquals(sr.size(), sliceSize(sliceSize(data.size(), s), 0, limit));
 
-                sr = exerciseOps(data, st -> st.substream(s, limit+s));
+                sr = exerciseOps(data, st -> st.skip(s).limit(limit));
                 assertEquals(sr.size(), sliceSize(data.size(), s, limit));
             }
         }
@@ -204,7 +186,7 @@
     }
 
     public void testSkipParallel() {
-        int[] l = IntStream.range(1, 1001).parallel().substream(200).limit(200).sequential().toArray();
+        int[] l = IntStream.range(1, 1001).parallel().skip(200).limit(200).sequential().toArray();
         assertEquals(l.length, 200);
         assertEquals(l[l.length - 1], 400);
     }
--- a/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -50,27 +50,27 @@
 public class SliceOpTest extends OpTestCase {
 
     public void testSkip() {
-        assertCountSum(countTo(0).stream().substream(0), 0, 0);
-        assertCountSum(countTo(0).stream().substream(4), 0, 0);
-        assertCountSum(countTo(4).stream().substream(4), 0, 0);
-        assertCountSum(countTo(4).stream().substream(2), 2, 7);
-        assertCountSum(countTo(4).stream().substream(0), 4, 10);
+        assertCountSum(countTo(0).stream().skip(0), 0, 0);
+        assertCountSum(countTo(0).stream().skip(4), 0, 0);
+        assertCountSum(countTo(4).stream().skip(4), 0, 0);
+        assertCountSum(countTo(4).stream().skip(2), 2, 7);
+        assertCountSum(countTo(4).stream().skip(0), 4, 10);
 
-        assertCountSum(countTo(0).parallelStream().substream(0), 0, 0);
-        assertCountSum(countTo(0).parallelStream().substream(4), 0, 0);
-        assertCountSum(countTo(4).parallelStream().substream(4), 0, 0);
-        assertCountSum(countTo(4).parallelStream().substream(2), 2, 7);
-        assertCountSum(countTo(4).parallelStream().substream(0), 4, 10);
+        assertCountSum(countTo(0).parallelStream().skip(0), 0, 0);
+        assertCountSum(countTo(0).parallelStream().skip(4), 0, 0);
+        assertCountSum(countTo(4).parallelStream().skip(4), 0, 0);
+        assertCountSum(countTo(4).parallelStream().skip(2), 2, 7);
+        assertCountSum(countTo(4).parallelStream().skip(0), 4, 10);
 
-        exerciseOps(Collections.emptyList(), s -> s.substream(0), Collections.emptyList());
-        exerciseOps(Collections.emptyList(), s -> s.substream(10), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(0), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(10), Collections.emptyList());
 
-        exerciseOps(countTo(1), s -> s.substream(0), countTo(1));
-        exerciseOps(countTo(1), s -> s.substream(1), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(0), countTo(100));
-        exerciseOps(countTo(100), s -> s.substream(10), range(11, 100));
-        exerciseOps(countTo(100), s -> s.substream(100), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(200), Collections.emptyList());
+        exerciseOps(countTo(1), s -> s.skip(0), countTo(1));
+        exerciseOps(countTo(1), s -> s.skip(1), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(0), countTo(100));
+        exerciseOps(countTo(100), s -> s.skip(10), range(11, 100));
+        exerciseOps(countTo(100), s -> s.skip(100), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(200), Collections.emptyList());
     }
 
     public void testLimit() {
@@ -97,43 +97,43 @@
     }
 
     public void testSkipLimit() {
-        exerciseOps(Collections.emptyList(), s -> s.substream(0).limit(0), Collections.emptyList());
-        exerciseOps(Collections.emptyList(), s -> s.substream(0).limit(10), Collections.emptyList());
-        exerciseOps(Collections.emptyList(), s -> s.substream(10).limit(0), Collections.emptyList());
-        exerciseOps(Collections.emptyList(), s -> s.substream(10).limit(10), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(0).limit(0), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(0).limit(10), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(10).limit(0), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(10).limit(10), Collections.emptyList());
 
-        exerciseOps(countTo(100), s -> s.substream(0).limit(100), countTo(100));
-        exerciseOps(countTo(100), s -> s.substream(0).limit(10), countTo(10));
-        exerciseOps(countTo(100), s -> s.substream(0).limit(0), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(10).limit(100), range(11, 100));
-        exerciseOps(countTo(100), s -> s.substream(10).limit(10), range(11, 20));
-        exerciseOps(countTo(100), s -> s.substream(10).limit(0), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(100).limit(100), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(100).limit(10), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(100).limit(0), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(200).limit(100), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(200).limit(10), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(200).limit(0), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(0).limit(100), countTo(100));
+        exerciseOps(countTo(100), s -> s.skip(0).limit(10), countTo(10));
+        exerciseOps(countTo(100), s -> s.skip(0).limit(0), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(10).limit(100), range(11, 100));
+        exerciseOps(countTo(100), s -> s.skip(10).limit(10), range(11, 20));
+        exerciseOps(countTo(100), s -> s.skip(10).limit(0), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(100).limit(100), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(100).limit(10), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(100).limit(0), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(200).limit(100), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(200).limit(10), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(200).limit(0), Collections.emptyList());
     }
 
     public void testSlice() {
-        exerciseOps(Collections.emptyList(), s -> s.substream(0, 0), Collections.emptyList());
-        exerciseOps(Collections.emptyList(), s -> s.substream(0, 10), Collections.emptyList());
-        exerciseOps(Collections.emptyList(), s -> s.substream(10, 10), Collections.emptyList());
-        exerciseOps(Collections.emptyList(), s -> s.substream(10, 20), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(0).limit(0), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(0).limit(10), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(10).limit(10), Collections.emptyList());
+        exerciseOps(Collections.emptyList(), s -> s.skip(10).limit(20), Collections.emptyList());
 
-        exerciseOps(countTo(100), s -> s.substream(0, 100), countTo(100));
-        exerciseOps(countTo(100), s -> s.substream(0, 10), countTo(10));
-        exerciseOps(countTo(100), s -> s.substream(0, 0), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(10, 110), range(11, 100));
-        exerciseOps(countTo(100), s -> s.substream(10, 20), range(11, 20));
-        exerciseOps(countTo(100), s -> s.substream(10, 10), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(100, 200), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(100, 110), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(100, 100), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(200, 300), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(200, 210), Collections.emptyList());
-        exerciseOps(countTo(100), s -> s.substream(200, 200), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(0).limit(100), countTo(100));
+        exerciseOps(countTo(100), s -> s.skip(0).limit(10), countTo(10));
+        exerciseOps(countTo(100), s -> s.skip(0).limit(0), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(10).limit(100), range(11, 100));
+        exerciseOps(countTo(100), s -> s.skip(10).limit(10), range(11, 20));
+        exerciseOps(countTo(100), s -> s.skip(10).limit(0), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(100).limit(100), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(100).limit(10), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(100).limit(0), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(200).limit(100), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(200).limit(10), Collections.emptyList());
+        exerciseOps(countTo(100), s -> s.skip(200).limit(0), Collections.emptyList());
     }
 
     private int sliceSize(int dataSize, int skip, int limit) {
@@ -156,17 +156,17 @@
             setContext("skip", s);
             testSliceMulti(data,
                            sliceSize(data.size(), s),
-                           st -> st.substream(s),
-                           st -> st.substream(s),
-                           st -> st.substream(s),
-                           st -> st.substream(s));
+                           st -> st.skip(s),
+                           st -> st.skip(s),
+                           st -> st.skip(s),
+                           st -> st.skip(s));
 
             testSliceMulti(data,
                            sliceSize(sliceSize(data.size(), s), s/2),
-                           st -> st.substream(s).substream(s / 2),
-                           st -> st.substream(s).substream(s / 2),
-                           st -> st.substream(s).substream(s / 2),
-                           st -> st.substream(s).substream(s / 2));
+                           st -> st.skip(s).skip(s / 2),
+                           st -> st.skip(s).skip(s / 2),
+                           st -> st.skip(s).skip(s / 2),
+                           st -> st.skip(s).skip(s / 2));
         }
     }
 
@@ -182,17 +182,10 @@
                 setContext("limit", l);
                 testSliceMulti(data,
                                sliceSize(sliceSize(data.size(), s), 0, l),
-                               st -> st.substream(s).limit(l),
-                               st -> st.substream(s).limit(l),
-                               st -> st.substream(s).limit(l),
-                               st -> st.substream(s).limit(l));
-
-                testSliceMulti(data,
-                               sliceSize(data.size(), s, l),
-                                st -> st.substream(s, l+s),
-                                st -> st.substream(s, l+s),
-                                st -> st.substream(s, l+s),
-                                st -> st.substream(s, l+s));
+                               st -> st.skip(s).limit(l),
+                               st -> st.skip(s).limit(l),
+                               st -> st.skip(s).limit(l),
+                               st -> st.skip(s).limit(l));
             }
         }
     }
--- a/test/java/util/zip/GZIP/GZIPInZip.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/java/util/zip/GZIP/GZIPInZip.java	Wed Oct 30 18:38:20 2013 +0000
@@ -22,12 +22,14 @@
  */
 
 /* @test
- * @bug 7021870
- * @summary Reading last gzip chain member must not close the input stream
+ * @bug 7021870 8023431 8026756
+ * @summary Reading last gzip chain member must not close the input stream.
+ *          Garbage following gzip entry must be ignored.
  */
 
-import java.io.*;
-import java.util.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
 import java.util.zip.ZipEntry;
@@ -37,60 +39,59 @@
 
 public class GZIPInZip {
 
-    private static volatile Throwable trouble;
+    public static void main(String[] args)
+            throws Throwable {
 
-    public static void main(String[] args) throws Throwable {
+        doTest(false, false);
+        doTest(false, true);
+        doTest(true, false);
+        doTest(true, true);
+    }
 
-        final PipedOutputStream pos = new PipedOutputStream();
-        final PipedInputStream pis = new PipedInputStream(pos);
+    private static void doTest(final boolean appendGarbage,
+                               final boolean limitGISBuff)
+            throws Throwable {
 
-        Thread compressor = new Thread() {
-            public void run() {
-                final byte[] xbuf = { 'x' };
-                try {
-                    ZipOutputStream zos = new ZipOutputStream(pos);
+        byte[] buf;
+
+        try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
+             ZipOutputStream zos = new ZipOutputStream(baos)) {
+
+            final byte[] xbuf = { 'x' };
 
-                    zos.putNextEntry(new ZipEntry("a.gz"));
-                    GZIPOutputStream gos1 = new GZIPOutputStream(zos);
-                    gos1.write(xbuf); gos1.finish();
-                    zos.closeEntry();
+            zos.putNextEntry(new ZipEntry("a.gz"));
+            GZIPOutputStream gos1 = new GZIPOutputStream(zos);
+            gos1.write(xbuf);
+            gos1.finish();
+            if (appendGarbage)
+                zos.write(xbuf);
+            zos.closeEntry();
+
+            zos.putNextEntry(new ZipEntry("b.gz"));
+            GZIPOutputStream gos2 = new GZIPOutputStream(zos);
+            gos2.write(xbuf);
+            gos2.finish();
+            zos.closeEntry();
 
-                    zos.putNextEntry(new ZipEntry("b.gz"));
-                    GZIPOutputStream gos2 = new GZIPOutputStream(zos);
-                    gos2.write(xbuf); gos2.finish();
-                    zos.closeEntry();
+            zos.flush();
+            buf = baos.toByteArray();
+        }
+
+        try (ByteArrayInputStream bais = new ByteArrayInputStream(buf);
+             ZipInputStream zis = new ZipInputStream(bais)) {
 
-                } catch (Throwable t) {
-                    trouble = t;
-                }
+            zis.getNextEntry();
+            GZIPInputStream gis1 = limitGISBuff ?
+                    new GZIPInputStream(zis, 4) :
+                    new GZIPInputStream(zis);
+            // try to read more than the entry has
+            gis1.skip(2);
+
+            try {
+                zis.getNextEntry();
+            } catch (IOException e) {
+                throw new RuntimeException("ZIP stream was prematurely closed", e);
             }
-        };
-
-        Thread uncompressor = new Thread() {
-            public void run() {
-                try {
-                    ZipInputStream zis = new ZipInputStream(pis);
-                    zis.getNextEntry();
-                    InputStream gis = new GZIPInputStream(zis);
-                    // try to read more than the entry has
-                    gis.skip(2);
-
-                    try {
-                        zis.getNextEntry();
-                    } catch (IOException e) {
-                        throw new AssertionError("ZIP stream was prematurely closed");
-                    }
-
-                } catch (Throwable t) {
-                    trouble = t;
-                }
-            }
-        };
-
-        compressor.start(); uncompressor.start();
-        compressor.join();  uncompressor.join();
-
-        if (trouble != null)
-            throw trouble;
+        }
     }
 }
--- a/test/javax/management/remote/mandatory/connection/RMIConnector_NPETest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/javax/management/remote/mandatory/connection/RMIConnector_NPETest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,49 +25,48 @@
  * @test
  * @summary NPE IN RMIConnector.connect
  * @bug 6984520
+ * @library /java/rmi/testlibrary
  * @run clean RMIConnector_NPETest
+ * @run build TestLibrary RMID
  * @run build RMIConnector_NPETest
  * @run main RMIConnector_NPETest
  */
-
-import java.io.*;
-import java.lang.management.*;
-import java.rmi.registry.*;
+import java.io.IOException;
 import javax.management.*;
-import javax.management.remote.*;
 import javax.management.remote.rmi.*;
 
-public class RMIConnector_NPETest  {
-
+public class RMIConnector_NPETest {
     public static void main(String argv[]) throws Exception {
-        boolean testFailed = false;
-        String rmidCmd = System.getProperty("java.home") + File.separator +
-            "bin" + File.separator + "rmid -port 3333";
-        String stopRmidCmd = System.getProperty("java.home") + File.separator +
-                "bin" + File.separator + "rmid -stop -port 3333";
-    try {
-        //start an rmid daemon and give it some time
-        System.out.println("Starting rmid");
-        Runtime.getRuntime().exec(rmidCmd);
-        Thread.sleep(5000);
+        RMID rmid = RMID.createRMID();
+        rmid.start();
+        int rmidPort = rmid.getPort();
+        Exception failureCause = null;
+        RMIConnector agent = null;
 
-        MBeanServer mbs = MBeanServerFactory.createMBeanServer();
-        RMIJRMPServerImpl rmiserver = new RMIJRMPServerImpl(3333, null, null, null);
-        rmiserver.setMBeanServer(mbs);
-        RMIConnector agent = new RMIConnector(rmiserver, null);
-        agent.connect();
-    } catch(NullPointerException npe) {
-        npe.printStackTrace();
-        testFailed = true;
-    } catch (Exception e) {
-        // OK
-    } finally {
-        System.out.println("Stopping rmid");
-        Runtime.getRuntime().exec(stopRmidCmd);
+        try {
+            MBeanServer mbs = MBeanServerFactory.createMBeanServer();
+            RMIJRMPServerImpl rmiserver = new RMIJRMPServerImpl(rmidPort, null, null, null);
+            rmiserver.setMBeanServer(mbs);
+            agent = new RMIConnector(rmiserver, null);
+            agent.connect();
+        } catch (NullPointerException npe) {
+            failureCause = npe;
+        } catch (Exception e) {
+            // OK
+        } finally {
+            if (agent != null) {
+                try {
+                    agent.close();
+                } catch (IOException e) {
+                    // ignore
+                }
+            }
+            rmid.shutdown(rmidPort);
         }
 
-    if(testFailed)
-        throw new Exception("Test failed");
+        if (failureCause != null) {
+            TestLibrary.bomb("Test failed", failureCause);
+        }
 
     }
-}
+}
\ No newline at end of file
--- a/test/javax/management/remote/mandatory/loading/MissingClassTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/javax/management/remote/mandatory/loading/MissingClassTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4915825 4921009 4934965 4977469
+ * @bug 4915825 4921009 4934965 4977469 8019584
  * @summary Tests behavior when client or server gets object of unknown class
  * @author Eamonn McManus
  * @run clean MissingClassTest SingleClassLoader
--- a/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
 
 // java imports
 //
-import java.io.IOException;
 import java.net.MalformedURLException;
+import java.util.Map;
 
 // JMX imports
 //
@@ -44,7 +44,7 @@
 import javax.management.remote.JMXServiceURL;
 
 public class NotSerializableNotifTest {
-    private static MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
+    private static final MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
     private static ObjectName emitter;
     private static int port = 2468;
 
@@ -52,9 +52,19 @@
 
     private static final int sentNotifs = 10;
 
+    private static double timeoutFactor = 1.0;
+    private static final double defaultTimeout = 10;
+
     public static void main(String[] args) throws Exception {
         System.out.println(">>> Test to send a not serializable notification");
 
+        String timeoutVal = System.getProperty("test.timeout.factor");
+        if (timeoutVal != null) {
+            timeoutFactor = Double.parseDouble(
+                System.getProperty("test.timeout.factor")
+            );
+        }
+
         // IIOP fails on JDK1.4, see 5034318
         final String v = System.getProperty("java.version");
         float f = Float.parseFloat(v.substring(0, 3));
@@ -136,7 +146,8 @@
 
         // waiting ...
         synchronized (listener) {
-            for (int i=0; i<10; i++) {
+            int top = (int)Math.ceil(timeoutFactor * defaultTimeout);
+            for (int i=0; i<top; i++) {
                 if (listener.received() < sentNotifs) {
                     listener.wait(1000);
                 } else {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/transform/jdk8004476/SecureProcessingTest.xml	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<helloWorld/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/transform/jdk8004476/TestBase.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+import java.security.Policy;
+
+/**
+ *
+ *
+ * @author huizhe.wang@oracle.com
+ */
+public class TestBase {
+    public static boolean isWindows = false;
+    static {
+        if (System.getProperty("os.name").indexOf("Windows")>-1) {
+            isWindows = true;
+        }
+    };
+
+    String filepath;
+    boolean hasSM;
+    String curDir;
+    Policy origPolicy;
+    String testName;
+    static String errMessage;
+
+    int passed = 0, failed = 0;
+
+    /**
+     * Creates a new instance of StreamReader
+     */
+    public TestBase(String name) {
+        testName = name;
+    }
+
+    //junit @Override
+    protected void setUp() {
+        if (System.getSecurityManager() != null) {
+            hasSM = true;
+            System.setSecurityManager(null);
+        }
+
+        filepath = System.getProperty("test.src");
+        if (filepath == null) {
+            //current directory
+            filepath = System.getProperty("user.dir");
+        }
+        origPolicy = Policy.getPolicy();
+
+    }
+
+    //junit @Override
+    public void tearDown() {
+        // turn off security manager and restore policy
+        System.setSecurityManager(null);
+        Policy.setPolicy(origPolicy);
+        if (hasSM) {
+            System.setSecurityManager(new SecurityManager());
+        }
+        System.out.println("\nNumber of tests passed: " + passed);
+        System.out.println("Number of tests failed: " + failed + "\n");
+
+        if (errMessage != null ) {
+            throw new RuntimeException(errMessage);
+        }
+    }
+
+    void fail(String errMsg) {
+        if (errMessage == null) {
+            errMessage = errMsg;
+        } else {
+            errMessage = errMessage + "\n" + errMsg;
+        }
+        failed++;
+    }
+
+    void success(String msg) {
+        passed++;
+        System.out.println(msg);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/transform/jdk8004476/XPathExFuncTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 8004476
+ * @summary test XPath extension functions
+ * @run main/othervm XPathExFuncTest
+ */
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.security.AllPermission;
+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.util.Iterator;
+import java.util.List;
+import javax.xml.XMLConstants;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import javax.xml.xpath.XPathFactoryConfigurationException;
+import javax.xml.xpath.XPathFunction;
+import javax.xml.xpath.XPathFunctionException;
+import javax.xml.xpath.XPathFunctionResolver;
+import org.w3c.dom.Document;
+
+/**
+ * test XPath extension functions
+ *
+ * @author huizhe.wang@oracle.com
+ */
+public class XPathExFuncTest extends TestBase {
+
+    final static String ENABLE_EXTENSION_FUNCTIONS = "http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions";
+    final static String CLASSNAME = "DocumentBuilderFactoryImpl";
+    final String XPATH_EXPRESSION = "ext:helloWorld()";
+
+    /**
+     * Creates a new instance of StreamReader
+     */
+    public XPathExFuncTest(String name) {
+        super(name);
+    }
+    boolean hasSM;
+    String xslFile, xslFileId;
+    String xmlFile, xmlFileId;
+
+    protected void setUp() {
+        super.setUp();
+        xmlFile = filepath + "/SecureProcessingTest.xml";
+
+    }
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String[] args) {
+        XPathExFuncTest test = new XPathExFuncTest("OneTest");
+        test.setUp();
+
+        test.testExtFunc();
+        test.testExtFuncNotAllowed();
+        test.testEnableExtFunc();
+        test.tearDown();
+
+    }
+
+    /**
+     * by default, extension function is enabled
+     */
+    public void testExtFunc() {
+
+        try {
+            evaluate(false);
+            System.out.println("testExtFunc: OK");
+        } catch (XPathFactoryConfigurationException e) {
+            fail(e.getMessage());
+        } catch (XPathExpressionException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    /**
+     * Security is enabled, extension function not allowed
+     */
+    public void testExtFuncNotAllowed() {
+        Policy p = new SimplePolicy(new AllPermission());
+        Policy.setPolicy(p);
+        System.setSecurityManager(new SecurityManager());
+
+        try {
+            evaluate(false);
+        } catch (XPathFactoryConfigurationException e) {
+            fail(e.getMessage());
+        } catch (XPathExpressionException ex) {
+            //expected since extension function is disallowed
+            System.out.println("testExtFuncNotAllowed: OK");
+        } finally {
+            System.setSecurityManager(null);
+        }
+    }
+
+    /**
+     * Security is enabled, use new feature: enableExtensionFunctions
+     */
+    public void testEnableExtFunc() {
+        Policy p = new SimplePolicy(new AllPermission());
+        Policy.setPolicy(p);
+        System.setSecurityManager(new SecurityManager());
+
+
+        try {
+            evaluate(true);
+            System.out.println("testEnableExt: OK");
+        } catch (XPathFactoryConfigurationException e) {
+            fail(e.getMessage());
+        } catch (XPathExpressionException e) {
+            fail(e.getMessage());
+        } finally {
+            System.setSecurityManager(null);
+        }
+    }
+
+    Document getDocument() {
+        // the xml source
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder documentBuilder = null;
+        Document document = null;
+
+        try {
+            documentBuilder = documentBuilderFactory.newDocumentBuilder();
+            InputStream xmlStream = new FileInputStream(xmlFile);
+            document = documentBuilder.parse(xmlStream);
+        } catch (Exception e) {
+            fail(e.toString());
+        }
+        return document;
+    }
+
+    void evaluate(boolean enableExt) throws XPathFactoryConfigurationException, XPathExpressionException {
+        Document document = getDocument();
+
+        XPathFactory xPathFactory = XPathFactory.newInstance();
+        /**
+         * Use of the extension function 'http://exslt.org/strings:tokenize' is
+         * not allowed when the secure processing feature is set to true.
+         * Attempt to use the new property to enable extension function
+         */
+        if (enableExt) {
+            boolean isExtensionSupported = enableExtensionFunction(xPathFactory);
+        }
+
+        xPathFactory.setXPathFunctionResolver(new MyXPathFunctionResolver());
+        if (System.getSecurityManager() == null) {
+            xPathFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false);
+        }
+
+        XPath xPath = xPathFactory.newXPath();
+        xPath.setNamespaceContext(new MyNamespaceContext());
+
+        String xPathResult = xPath.evaluate(XPATH_EXPRESSION, document);
+        System.out.println(
+                "XPath result (enableExtensionFunction == " + enableExt + ") = \""
+                + xPathResult
+                + "\"");
+    }
+
+    public class MyXPathFunctionResolver
+            implements XPathFunctionResolver {
+
+        public XPathFunction resolveFunction(QName functionName, int arity) {
+
+            // not a real ewsolver, always return a default XPathFunction
+            return new MyXPathFunction();
+        }
+    }
+
+    public class MyXPathFunction
+            implements XPathFunction {
+
+        public Object evaluate(List list) throws XPathFunctionException {
+
+            return "Hello World";
+        }
+    }
+
+    public class MyNamespaceContext implements NamespaceContext {
+
+        public String getNamespaceURI(String prefix) {
+            if (prefix == null) {
+                throw new IllegalArgumentException("The prefix cannot be null.");
+            }
+
+            if (prefix.equals("ext")) {
+                return "http://ext.com";
+            } else {
+                return null;
+            }
+        }
+
+        public String getPrefix(String namespace) {
+
+            if (namespace == null) {
+                throw new IllegalArgumentException("The namespace uri cannot be null.");
+            }
+
+            if (namespace.equals("http://ext.com")) {
+                return "ext";
+            } else {
+                return null;
+            }
+        }
+
+        public Iterator getPrefixes(String namespace) {
+            return null;
+        }
+    }
+
+    boolean enableExtensionFunction(XPathFactory factory) {
+        boolean isSupported = true;
+        try {
+            factory.setFeature(ENABLE_EXTENSION_FUNCTIONS, true);
+        } catch (XPathFactoryConfigurationException ex) {
+            isSupported = false;
+        }
+        return isSupported;
+    }
+
+    class SimplePolicy extends Policy {
+
+        private final Permissions perms;
+
+        public SimplePolicy(Permission... permissions) {
+            perms = new Permissions();
+            for (Permission permission : permissions) {
+                perms.add(permission);
+            }
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource cs) {
+            return perms;
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain pd) {
+            return perms;
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain pd, Permission p) {
+            return perms.implies(p);
+        }
+
+        //for older jdk
+        @Override
+        public void refresh() {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,248 @@
+/*
+ * 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 8004476
+ * @summary test XSLT extension functions
+ * @run main/othervm XSLTExFuncTest
+ */
+
+import java.io.StringWriter;
+import java.security.AllPermission;
+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 javax.xml.transform.*;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+import org.xml.sax.InputSource;
+
+/**
+ * test XSLT extension functions
+ *
+ * @author huizhe.wang@oracle.com
+ */
+public class XSLTExFuncTest extends TestBase {
+
+    final static String ENABLE_EXTENSION_FUNCTIONS = "http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions";
+    final static String CLASSNAME = "DocumentBuilderFactoryImpl";
+
+    /**
+     * Creates a new instance of StreamReader
+     */
+    public XSLTExFuncTest(String name) {
+        super(name);
+    }
+    boolean hasSM;
+    String xslFile, xslFileId;
+    String xmlFile, xmlFileId;
+
+    protected void setUp() {
+        super.setUp();
+        xmlFile = filepath + "/tokenize.xml";
+        xslFile = filepath + "/tokenize.xsl";
+
+        /**
+         * if (isWindows) { xslFile = "/" + xslFile; }
+         *
+         */
+        xslFileId = "file://" + xslFile;
+    }
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String[] args) {
+        XSLTExFuncTest test = new XSLTExFuncTest("OneTest");
+        test.setUp();
+
+        test.testExtFunc();
+        test.testExtFuncNotAllowed();
+        test.testEnableExtFunc();
+        test.testTemplatesEnableExtFunc();
+        test.tearDown();
+
+    }
+
+    /**
+     * by default, extension function is enabled
+     */
+    public void testExtFunc() {
+        TransformerFactory factory = TransformerFactory.newInstance();
+
+        try {
+            transform(factory);
+            System.out.println("testExtFunc: OK");
+        } catch (TransformerConfigurationException e) {
+            fail(e.getMessage());
+        } catch (TransformerException ex) {
+            fail(ex.getMessage());
+        }
+    }
+
+    /**
+     * Security is enabled, extension function not allowed
+     */
+    public void testExtFuncNotAllowed() {
+        Policy p = new SimplePolicy(new AllPermission());
+        Policy.setPolicy(p);
+        System.setSecurityManager(new SecurityManager());
+        TransformerFactory factory = TransformerFactory.newInstance();
+
+        try {
+            transform(factory);
+        } catch (TransformerConfigurationException e) {
+            fail(e.getMessage());
+        } catch (TransformerException ex) {
+            //expected since extension function is disallowed
+            System.out.println("testExtFuncNotAllowed: OK");
+        } finally {
+            System.setSecurityManager(null);
+        }
+    }
+
+    /**
+     * Security is enabled, use new feature: enableExtensionFunctions
+     */
+    public void testEnableExtFunc() {
+        Policy p = new SimplePolicy(new AllPermission());
+        Policy.setPolicy(p);
+        System.setSecurityManager(new SecurityManager());
+        TransformerFactory factory = TransformerFactory.newInstance();
+
+        /**
+         * Use of the extension function 'http://exslt.org/strings:tokenize' is
+         * not allowed when the secure processing feature is set to true.
+         * Attempt to use the new property to enable extension function
+         */
+        boolean isExtensionSupported = enableExtensionFunction(factory);
+
+        try {
+            transform(factory);
+            System.out.println("testEnableExt: OK");
+        } catch (TransformerConfigurationException e) {
+            fail(e.getMessage());
+        } catch (TransformerException e) {
+            fail(e.getMessage());
+        } finally {
+            System.setSecurityManager(null);
+        }
+    }
+
+    /**
+     * use Templates template = factory.newTemplates(new StreamSource( new
+     * FileInputStream(xslFilename))); // Use the template to create a
+     * transformer Transformer xformer = template.newTransformer();
+     *
+     * @param factory
+     * @return
+     */
+    /**
+     * Security is enabled, use new feature: enableExtensionFunctions Use the
+     * template to create a transformer
+     */
+    public void testTemplatesEnableExtFunc() {
+        Policy p = new SimplePolicy(new AllPermission());
+        Policy.setPolicy(p);
+        System.setSecurityManager(new SecurityManager());
+        TransformerFactory factory = TransformerFactory.newInstance();
+
+        /**
+         * Use of the extension function 'http://exslt.org/strings:tokenize' is
+         * not allowed when the secure processing feature is set to true.
+         * Attempt to use the new property to enable extension function
+         */
+        boolean isExtensionSupported = enableExtensionFunction(factory);
+
+        try {
+            SAXSource xslSource = new SAXSource(new InputSource(xslFile));
+            xslSource.setSystemId(xslFileId);
+            Templates template = factory.newTemplates(xslSource);
+            Transformer transformer = template.newTransformer();
+            StringWriter stringResult = new StringWriter();
+            Result result = new StreamResult(stringResult);
+            transformer.transform(new SAXSource(new InputSource(xmlFile)), result);
+            System.out.println("testTemplatesEnableExtFunc: OK");
+        } catch (TransformerConfigurationException e) {
+            fail(e.getMessage());
+        } catch (TransformerException e) {
+            fail(e.getMessage());
+        } finally {
+            System.setSecurityManager(null);
+        }
+    }
+
+    boolean enableExtensionFunction(TransformerFactory factory) {
+        boolean isSupported = true;
+        try {
+            factory.setFeature(ENABLE_EXTENSION_FUNCTIONS, true);
+        } catch (TransformerConfigurationException ex) {
+            isSupported = false;
+        }
+        return isSupported;
+    }
+
+    void transform(TransformerFactory factory) throws TransformerConfigurationException, TransformerException {
+        SAXSource xslSource = new SAXSource(new InputSource(xslFile));
+        xslSource.setSystemId(xslFileId);
+        Transformer transformer = factory.newTransformer(xslSource);
+        StringWriter stringResult = new StringWriter();
+        Result result = new StreamResult(stringResult);
+        transformer.transform(new SAXSource(new InputSource(xmlFile)), result);
+    }
+
+    class SimplePolicy extends Policy {
+
+        private final Permissions perms;
+
+        public SimplePolicy(Permission... permissions) {
+            perms = new Permissions();
+            for (Permission permission : permissions) {
+                perms.add(permission);
+            }
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource cs) {
+            return perms;
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain pd) {
+            return perms;
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain pd, Permission p) {
+            return perms.implies(p);
+        }
+
+        //for older jdk
+        @Override
+        public void refresh() {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/transform/jdk8004476/tokenize.xml	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<html>
+<a>
+   <b>Is this EXSLT? No. no</b>
+   <c>Is this EXSLT? No. no</c>
+</a>
+</html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/transform/jdk8004476/tokenize.xsl	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+                xmlns:str="http://exslt.org/strings"
+                xmlns:xalan="http://xml.apache.org/xalan"
+                version="1.0">
+<xsl:template match="a">
+   <xsl:apply-templates />
+</xsl:template>
+<xsl:template match="//a/c">
+   <xsl:value-of select="." />
+ -
+      <xsl:value-of select="str:tokenize(string(.), ' ')" />
+   <xsl:value-of select="str:tokenize(string(.), '')" />
+   <xsl:for-each select="str:tokenize(string(.), ' ')">
+      <xsl:value-of select="." />
+   </xsl:for-each>
+   <xsl:apply-templates select="*" />
+</xsl:template>
+<xsl:template match="//a/b">
+   <xsl:value-of select="." />
+ -
+      <xsl:value-of select="xalan:tokenize(string(.), ' ')" />
+   <xsl:value-of select="xalan:tokenize(string(.), '')" />
+   <xsl:for-each select="xalan:tokenize(string(.), ' ')">
+      <xsl:value-of select="." />
+   </xsl:for-each>
+   <xsl:apply-templates select="*" />
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/validation/8015092/XPathWhiteSpaceTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,60 @@
+/*
+ * 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 8015092
+ * @summary whitespace within patterns in Selector XPath expression is accepted
+ * @run main/othervm XPathWhiteSpaceTest
+ */
+
+import java.io.*;
+import javax.xml.XMLConstants;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import org.xml.sax.SAXException;
+
+/**
+ * http://www.w3.org/TR/xmlschema-1/#coss-identity-constraint
+ * For readability, whitespace may be used in selector XPath expressions even though
+ * not explicitly allowed by the grammar:
+ * whitespace may be freely added within patterns before or after any token.
+ *
+ * @author huizhe.wang@oracle.com
+ */
+public class XPathWhiteSpaceTest {
+    static final String XSDFILE = "idJ029.xsd";
+
+    public static void main(String[] args) throws Exception {
+        try{
+            SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+            Schema schema = schemaFactory.newSchema(new File(System.getProperty("test.src", "."), XSDFILE));
+        } catch (SAXException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/validation/8015092/idIxpns.xsd	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="xpns.org" xmlns:xpns="xpns.org">
+	<xsd:element name="xsid" type="xsd:string"/>
+	<xsd:element name="xiid">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="xiid2" type="xsd:string" maxOccurs="unbounded"/>
+			</xsd:sequence>
+			<xsd:attribute name="val" type="xsd:string"/>
+		</xsd:complexType>
+	</xsd:element>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/validation/8015092/idIxpns1.xsd	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="xpns1.org" xmlns:xpns="xpns1.org">
+	<xsd:element name="xsid" type="xsd:string"/>
+	<xsd:element name="xiid">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="xiid2" type="xsd:string" maxOccurs="unbounded"/>
+			</xsd:sequence>
+			<xsd:attribute name="val" type="xsd:string"/>
+		</xsd:complexType>
+	</xsd:element>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/validation/8015092/idJ029.xsd	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xpns="xpns.org" xmlns:xpns1="xpns1.org" xmlns:xpns2="xpns2.org" xmlns:imp="importNS">
+	<xsd:import namespace="importNS" schemaLocation="idJimp.xsd"/>
+	<xsd:import namespace="xpns.org" schemaLocation="idIxpns.xsd"/>
+	<xsd:import namespace="xpns1.org" schemaLocation="idIxpns1.xsd"/>
+	<xsd:element name="root">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="tid" maxOccurs="unbounded"/>
+				<xsd:element ref="imp:iid1" maxOccurs="unbounded"/>
+				<xsd:element ref="imp:sid" maxOccurs="unbounded"/>
+				<xsd:element ref="xpns:xiid" maxOccurs="unbounded"/>
+			</xsd:sequence>
+		</xsd:complexType>
+		<xsd:unique id="foo123" name="uid">
+			<xsd:selector xpath=".//tid"/>
+			<xsd:field xpath=". //."/>
+		</xsd:unique>
+	</xsd:element>
+	<xsd:element name="tid" type="xsd:string"/>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/validation/8015092/idJimp.xsd	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="importNS" xmlns:imp="importNS">
+	<xsd:element name="sid" type="xsd:string"/>
+	<xsd:element name="iid1">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="iid2" type="xsd:string" maxOccurs="unbounded"/>
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/validation/8015243/AnyURITest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,60 @@
+/*
+ * 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 8015243
+ * @summary verifies that illegal URI such as // is rejected
+ * @run main/othervm AnyURITest
+ */
+
+import java.io.*;
+import javax.xml.XMLConstants;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import org.xml.sax.SAXException;
+
+/**
+ * Similar to java.net.URI, allow empty authority prior to non-empty
+ * path, query component or fragment identifier
+ *
+ * @author huizhe.wang@oracle.com
+ */
+public class AnyURITest {
+    static final String XSDFILE = "anyURI_b006.xsd";
+
+    public static void main(String[] args) throws Exception {
+        try{
+            SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+            Schema schema = schemaFactory.newSchema(new File(System.getProperty("test.src", "."), XSDFILE));
+            throw new RuntimeException("Illegal URI // should be rejected.");
+        } catch (SAXException e) {
+            //expected:
+            //Enumeration value '//' is not in the value space of the base type, anyURI.
+        }
+
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/validation/8015243/anyURI_b006.xsd	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,32 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    	<xsd:element name="root">
+		<xsd:complexType>
+			<xsd:choice maxOccurs="unbounded">
+				<xsd:element ref="foo"/>
+				<xsd:element ref="bar"/>
+			</xsd:choice>
+		</xsd:complexType>
+	</xsd:element>
+
+    	<xsd:element type="xsd:anyURI" name="foo"></xsd:element>
+    	<xsd:element type="st" name="bar"></xsd:element>
+
+	<xsd:simpleType name="st">
+		<xsd:restriction base="xsd:anyURI">
+			<xsd:enumeration value="/"/>
+			<xsd:enumeration value="//"/>
+			<xsd:enumeration value="///"/>
+			<xsd:enumeration value="//a\\b"/>
+			<xsd:enumeration value="\"/>
+			<xsd:enumeration value="\\"/>
+			<xsd:enumeration value="\\\"/>
+			<xsd:enumeration value="\\/"/>
+			<xsd:enumeration value="\\a\b"/>
+			<xsd:enumeration value="\a\b"/>
+			<xsd:enumeration value="/a\b"/>
+			<xsd:enumeration value="..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\a"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+
+</xsd:schema>
--- a/test/javax/xml/ws/clientjar/TestWsImport.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/javax/xml/ws/clientjar/TestWsImport.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8016271
+ * @bug 8016271 8026405
  * @summary wsimport -clientjar does not create portable jar on windows due to hardcoded '\'
  * @run main/othervm TestWsImport
  */
@@ -77,14 +77,14 @@
             String address = "http://localhost:" + port + "/hello";
 
             Service service = Service.create(new URL(address + "?wsdl"),
-                new QName("http://test/jaxws/sample/",
-                "TestService"));
+                new QName("http://test/jaxws/sample/", "TestService"));
 
             String[] wsargs = {
                 wsimport,
                 "-p",
                 "wstest",
                 "-J-Djavax.xml.accessExternalSchema=all",
+                "-J-Dcom.sun.tools.internal.ws.Invoker.noSystemProxies=true",
                 address + "?wsdl",
                 "-clientjar",
                 "wsjar.jar"
--- a/test/jdk/lambda/vm/DefaultMethodsTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,637 +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.
- */
-
-package vm;
-
-import java.lang.reflect.*;
-import java.util.*;
-import java.io.File;
-import java.io.IOException;
-
-import org.testng.annotations.Test;
-import separate.*;
-import separate.Compiler;
-
-import static org.testng.Assert.*;
-import static separate.SourceModel.*;
-import static separate.SourceModel.Class;
-
-@Test(groups = "vm")
-public class DefaultMethodsTest extends TestHarness {
-    public DefaultMethodsTest() {
-        super(false, false);
-    }
-
-    /**
-     * class C { public int m() { return 22; } }
-     *
-     * TEST: C c = new C(); c.m() == 22
-     */
-    public void testHarnessInvokeVirtual() {
-        Class C = new Class("C", ConcreteMethod.std("22"));
-        assertInvokeVirtualEquals(22, C);
-    }
-
-    /**
-     * interface I { int m(); }
-     * class C implements I { public int m() { return 33; } }
-     *
-     * TEST: I i = new C(); i.m() == 33;
-     */
-    public void testHarnessInvokeInterface() {
-        Interface I = new Interface("I", AbstractMethod.std());
-        Class C = new Class("C", I, ConcreteMethod.std("33"));
-        assertInvokeInterfaceEquals(33, C, I);
-    }
-
-    /**
-     * class C {}
-     *
-     * TEST: C c = new C(); c.m() throws NoSuchMethod
-     */
-    public void testHarnessThrows() {
-        Class C = new Class("C");
-        assertThrows(NoSuchMethodError.class, C);
-    }
-
-    /**
-     * interface I { int m() default { return 44; } }
-     * class C implements I {}
-     *
-     * TEST: C c = new C(); c.m() == 44;
-     * TEST: I i = new C(); i.m() == 44;
-     */
-    public void testBasicDefault() {
-        Interface I = new Interface("I", DefaultMethod.std("44"));
-        Class C = new Class("C", I);
-
-        assertInvokeVirtualEquals(44, C);
-        assertInvokeInterfaceEquals(44, C, I);
-    }
-
-    /**
-     * interface I { default int m() { return 44; } }
-     * interface J extends I {}
-     * interface K extends J {}
-     * class C implements K {}
-     *
-     * TEST: C c = new C(); c.m() == 44;
-     * TEST: I i = new C(); i.m() == 44;
-     */
-    public void testFarDefault() {
-        Interface I = new Interface("I", DefaultMethod.std("44"));
-        Interface J = new Interface("J", I);
-        Interface K = new Interface("K", J);
-        Class C = new Class("C", K);
-
-        assertInvokeVirtualEquals(44, C);
-        assertInvokeInterfaceEquals(44, C, K);
-    }
-
-    /**
-     * interface I { int m(); }
-     * interface J extends I { default int m() { return 44; } }
-     * interface K extends J {}
-     * class C implements K {}
-     *
-     * TEST: C c = new C(); c.m() == 44;
-     * TEST: K k = new C(); k.m() == 44;
-     */
-    public void testOverrideAbstract() {
-        Interface I = new Interface("I", AbstractMethod.std());
-        Interface J = new Interface("J", I, DefaultMethod.std("44"));
-        Interface K = new Interface("K", J);
-        Class C = new Class("C", K);
-
-        assertInvokeVirtualEquals(44, C);
-        assertInvokeInterfaceEquals(44, C, K);
-    }
-
-    /**
-     * interface I { int m() default { return 44; } }
-     * class C implements I { public int m() { return 55; } }
-     *
-     * TEST: C c = new C(); c.m() == 55;
-     * TEST: I i = new C(); i.m() == 55;
-     */
-    public void testExisting() {
-        Interface I = new Interface("I", DefaultMethod.std("44"));
-        Class C = new Class("C", I, ConcreteMethod.std("55"));
-
-        assertInvokeVirtualEquals(55, C);
-        assertInvokeInterfaceEquals(55, C, I);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * class B implements I {}
-     * class C extends B {}
-     *
-     * TEST: C c = new C(); c.m() == 99;
-     * TEST: I i = new C(); i.m() == 99;
-     */
-    public void testInherited() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Class B = new Class("B", I);
-        Class C = new Class("C", B);
-
-        assertInvokeVirtualEquals(99, C);
-        assertInvokeInterfaceEquals(99, C, I);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * class C { public int m() { return 11; } }
-     * class D extends C implements I {}
-     *
-     * TEST: D d = new D(); d.m() == 11;
-     * TEST: I i = new D(); i.m() == 11;
-     */
-    public void testExistingInherited() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Class C = new Class("C", ConcreteMethod.std("11"));
-        Class D = new Class("D", C, I);
-
-        assertInvokeVirtualEquals(11, D);
-        assertInvokeInterfaceEquals(11, D, I);
-    }
-
-    /**
-     * interface I { default int m() { return 44; } }
-     * class C implements I { public int m() { return 11; } }
-     * class D extends C { public int m() { return 22; } }
-     *
-     * TEST: D d = new D(); d.m() == 22;
-     * TEST: I i = new D(); i.m() == 22;
-     */
-    void testExistingInheritedOverride() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Class C = new Class("C", I, ConcreteMethod.std("11"));
-        Class D = new Class("D", C, ConcreteMethod.std("22"));
-
-        assertInvokeVirtualEquals(22, D);
-        assertInvokeInterfaceEquals(22, D, I);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * interface J { defaultint m() { return 88; } }
-     * class C implements I { public int m() { return 11; } }
-     * class D extends C { public int m() { return 22; } }
-     * class E extends D implements J {}
-     *
-     * TEST: E e = new E(); e.m() == 22;
-     * TEST: J j = new E(); j.m() == 22;
-     */
-    public void testExistingInheritedPlusDefault() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Interface J = new Interface("J", DefaultMethod.std("88"));
-        Class C = new Class("C", I, ConcreteMethod.std("11"));
-        Class D = new Class("D", C, ConcreteMethod.std("22"));
-        Class E = new Class("E", D, J);
-
-        assertInvokeVirtualEquals(22, E);
-        assertInvokeInterfaceEquals(22, E, J);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * class B implements I {}
-     * class C extends B { public int m() { return 77; } }
-     *
-     * TEST: C c = new C(); c.m() == 77;
-     * TEST: I i = new C(); i.m() == 77;
-     */
-    public void testInheritedWithConcrete() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Class B = new Class("B", I);
-        Class C = new Class("C", B, ConcreteMethod.std("77"));
-
-        assertInvokeVirtualEquals(77, C);
-        assertInvokeInterfaceEquals(77, C, I);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * class B implements I {}
-     * class C extends B implements I { public int m() { return 66; } }
-     *
-     * TEST: C c = new C(); c.m() == 66;
-     * TEST: I i = new C(); i.m() == 66;
-     */
-    public void testInheritedWithConcreteAndImpl() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Class B = new Class("B", I);
-        Class C = new Class("C", B, I, ConcreteMethod.std("66"));
-
-        assertInvokeVirtualEquals(66, C);
-        assertInvokeInterfaceEquals(66, C, I);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * interface J { default int m() { return 88; } }
-     * class C implements I, J {}
-     *
-     * TEST: C c = new C(); c.m() throws AME
-     */
-    public void testConflict() {
-        // debugTest();
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Interface J = new Interface("J", DefaultMethod.std("88"));
-        Class C = new Class("C", I, J);
-
-        assertThrows(AbstractMethodError.class, C);
-    }
-
-    /**
-     * interface I { int m(); }
-     * interface J { default int m() { return 88; } }
-     * class C implements I, J {}
-     *
-     * TEST: C c = new C(); c.m() throws AME
-     */
-    public void testAmbiguousReabstract() {
-        Interface I = new Interface("I", AbstractMethod.std());
-        Interface J = new Interface("J", DefaultMethod.std("88"));
-        Class C = new Class("C", I, J);
-
-        assertThrows(AbstractMethodError.class, C);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * interface J extends I { }
-     * interface K extends I { }
-     * class C implements J, K {}
-     *
-     * TEST: C c = new C(); c.m() == 99
-     * TEST: J j = new C(); j.m() == 99
-     * TEST: K k = new C(); k.m() == 99
-     * TEST: I i = new C(); i.m() == 99
-     */
-    public void testDiamond() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Interface J = new Interface("J", I);
-        Interface K = new Interface("K", I);
-        Class C = new Class("C", J, K);
-
-        assertInvokeVirtualEquals(99, C);
-        assertInvokeInterfaceEquals(99, C, J);
-        assertInvokeInterfaceEquals(99, C, K);
-        assertInvokeInterfaceEquals(99, C, I);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * interface J extends I { }
-     * interface K extends I { }
-     * interface L extends I { }
-     * interface M extends I { }
-     * class C implements I, J, K, L, M {}
-     *
-     * TEST: C c = new C(); c.m() == 99
-     * TEST: J j = new C(); j.m() == 99
-     * TEST: K k = new C(); k.m() == 99
-     * TEST: I i = new C(); i.m() == 99
-     * TEST: L l = new C(); l.m() == 99
-     * TEST: M m = new C(); m.m() == 99
-     */
-    public void testExpandedDiamond() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Interface J = new Interface("J", I);
-        Interface K = new Interface("K", I);
-        Interface L = new Interface("L", I);
-        Interface M = new Interface("M", L);
-        Class C = new Class("C", I, J, K, L, M);
-
-        assertInvokeVirtualEquals(99, C);
-        assertInvokeInterfaceEquals(99, C, J);
-        assertInvokeInterfaceEquals(99, C, K);
-        assertInvokeInterfaceEquals(99, C, I);
-        assertInvokeInterfaceEquals(99, C, L);
-        assertInvokeInterfaceEquals(99, C, M);
-    }
-
-    /**
-     * interface I { int m() default { return 99; } }
-     * interface J extends I { int m(); }
-     * class C implements J {}
-     *
-     * TEST: C c = new C(); c.m() throws AME
-     */
-    public void testReabstract() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Interface J = new Interface("J", I, AbstractMethod.std());
-        Class C = new Class("C", J);
-
-        assertThrows(AbstractMethodError.class, C);
-    }
-
-    /**
-     * interface I { default int m() { return 88; } }
-     * interface J extends I { default int m() { return 99; } }
-     * class C implements J {}
-     *
-     * TEST: C c = new C(); c.m() == 99;
-     * TEST: J j = new C(); j.m() == 99;
-     * TEST: I i = new C(); i.m() == 99;
-     */
-    public void testShadow() {
-        Interface I = new Interface("I", DefaultMethod.std("88"));
-        Interface J = new Interface("J", I, DefaultMethod.std("99"));
-        Class C = new Class("C", J);
-
-        assertInvokeVirtualEquals(99, C);
-        assertInvokeInterfaceEquals(99, C, J);
-        assertInvokeInterfaceEquals(99, C, I);
-    }
-
-    /**
-     * interface I { default int m() { return 88; } }
-     * interface J extends I { default int m() { return 99; } }
-     * class C implements I, J {}
-     *
-     * TEST: C c = new C(); c.m() == 99;
-     * TEST: J j = new C(); j.m() == 99;
-     * TEST: I i = new C(); i.m() == 99;
-     */
-    public void testDisqualified() {
-        Interface I = new Interface("I", DefaultMethod.std("88"));
-        Interface J = new Interface("J", I, DefaultMethod.std("99"));
-        Class C = new Class("C", I, J);
-
-        assertInvokeVirtualEquals(99, C);
-        assertInvokeInterfaceEquals(99, C, J);
-        assertInvokeInterfaceEquals(99, C, I);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * class C implements I {}
-     *
-     * TEST: C.class.getMethod("m").invoke(new C()) == 99
-     */
-    public void testReflectCall() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        //workaround accessibility issue when loading C with DirectedClassLoader
-        I.addAccessFlag(AccessFlag.PUBLIC);
-        Class C = new Class("C", I);
-
-        Compiler.Flags[] flags = this.verbose ?
-            new Compiler.Flags[] { Compiler.Flags.VERBOSE } :
-            new Compiler.Flags[] {};
-        Compiler compiler = new Compiler(flags);
-        java.lang.Class<?> cls = null;
-        try {
-            cls = compiler.compileAndLoad(C);
-        } catch (ClassNotFoundException e) {
-            fail("Could not load class");
-        }
-
-        java.lang.reflect.Method method = null;
-        try {
-            method = cls.getMethod(stdMethodName);
-        } catch (NoSuchMethodException e) {
-            fail("Could not find method in class");
-        }
-        assertNotNull(method);
-
-        Object c = null;
-        try {
-            c = cls.newInstance();
-        } catch (InstantiationException | IllegalAccessException e) {
-            fail("Could not create instance of class");
-        }
-        assertNotNull(c);
-
-        Integer res = null;
-        try {
-            res = (Integer)method.invoke(c);
-        } catch (IllegalAccessException |
-                 java.lang.reflect.InvocationTargetException e) {
-            fail("Could not invoke default instance method");
-        }
-        assertNotNull(res);
-
-        assertEquals(res.intValue(), 99);
-
-        compiler.cleanup();
-    }
-
-
-    /**
-     * interface J { default int m() { return 88; } }
-     * interface I extends J { default int m() { return J.super.m(); } }
-     * class C implements I {}
-     *
-     * TEST: C c = new C(); c.m() == 88;
-     * TEST: I i = new C(); i.m() == 88;
-     */
-    public void testSuperBasic() {
-        // debugTest();
-
-        Interface J = new Interface("J", DefaultMethod.std("88"));
-        Interface I = new Interface("I", J, new DefaultMethod(
-            "int", stdMethodName, "return J.super.m();"));
-        I.addCompilationDependency(J.findMethod(stdMethodName));
-        Class C = new Class("C", I);
-
-        assertInvokeVirtualEquals(88, C);
-        assertInvokeInterfaceEquals(88, C, I);
-    }
-
-    /**
-     * interface K { int m() default { return 99; } }
-     * interface L { int m() default { return 101; } }
-     * interface J extends K, L {}
-     * interface I extends J, K { int m() default { J.super.m(); } }
-     * class C implements I {}
-     *
-     * TEST: C c = new C(); c.m() throws AME
-     * TODO: add case for K k = new C(); k.m() throws AME
-     */
-    public void testSuperConflict() {
-        // debugTest();
-
-        Interface K = new Interface("K", DefaultMethod.std("99"));
-        Interface L = new Interface("L", DefaultMethod.std("101"));
-        Interface J = new Interface("J", K, L);
-        Interface I = new Interface("I", J, K, new DefaultMethod(
-            "int", stdMethodName, "return J.super.m();"));
-        Interface Jstub = new Interface("J", DefaultMethod.std("-1"));
-        I.addCompilationDependency(Jstub);
-        I.addCompilationDependency(Jstub.findMethod(stdMethodName));
-        Class C = new Class("C", I);
-
-        assertThrows(AbstractMethodError.class, C);
-    }
-
-    /**
-     * interface I { default int m() { return 99; } }
-     * interface J extends I { default int m() { return 55; } }
-     * class C implements I, J { public int m() { return I.super.m(); } }
-     *
-     * TEST: C c = new C(); c.m() throws AME
-     * TODO: add case for J j = new C(); j.m() throws AME
-     */
-    public void testSuperDisqual() {
-        Interface I = new Interface("I", DefaultMethod.std("99"));
-        Interface J = new Interface("J", I, DefaultMethod.std("55"));
-        Class C = new Class("C", I, J,
-            new ConcreteMethod("int", stdMethodName, "return I.super.m();",
-                AccessFlag.PUBLIC));
-        C.addCompilationDependency(I.findMethod(stdMethodName));
-
-        assertThrows(AbstractMethodError.class, C);
-    }
-
-    /**
-     * interface J { int m(); }
-     * interface I extends J { default int m() { return J.super.m(); } }
-     * class C implements I {}
-     *
-     * TEST: C c = new C(); c.m() throws AME
-     * TODO: add case for I i = new C(); i.m() throws AME
-     */
-    public void testSuperNull() {
-        Interface J = new Interface("J", AbstractMethod.std());
-        Interface I = new Interface("I", J, new DefaultMethod(
-            "int", stdMethodName, "return J.super.m();"));
-        Interface Jstub = new Interface("J", DefaultMethod.std("99"));
-        I.addCompilationDependency(Jstub);
-        I.addCompilationDependency(Jstub.findMethod(stdMethodName));
-        Class C = new Class("C", I);
-
-        assertThrows(AbstractMethodError.class, C);
-    }
-
-    /**
-     * interface J<T> { default int m(T t) { return 88; } }
-     * interface I extends J<String> {
-     *     int m(String s) default { return J.super.m(); }
-     * }
-     * class C implements I {}
-     *
-     * TEST: I i = new C(); i.m("") == 88;
-     */
-    public void testSuperGeneric() {
-        Interface J = new Interface("J", new TypeParameter("T"),
-            new DefaultMethod("int", stdMethodName, "return 88;",
-                new MethodParameter("T", "t")));
-        Interface I = new Interface("I", J.with("String"),
-            new DefaultMethod("int", stdMethodName, "return J.super.m(s);",
-                new MethodParameter("String", "s")));
-        I.addCompilationDependency(J.findMethod(stdMethodName));
-        Class C = new Class("C", I);
-
-        AbstractMethod pm = new AbstractMethod("int", stdMethodName,
-            new MethodParameter("String", "s"));
-
-        assertInvokeInterfaceEquals(
-            new Integer(88), C, new Extends(I), pm, "\"\"");
-    }
-
-    /**
-     * interface I<T> { int m(T t) default { return 44; } }
-     * interface J extends I<String> { int m(String s) default { return 55; } }
-     * class C implements I<String>, J {
-     *     public int m(String s) { return I.super.m(s); }
-     * }
-     *
-     * TEST: C c = new C(); c.m("string") throws AME
-     */
-    public void testSuperGenericDisqual() {
-        MethodParameter t = new MethodParameter("T", "t");
-        MethodParameter s = new MethodParameter("String", "s");
-
-        Interface I = new Interface("I", new TypeParameter("T"),
-            new DefaultMethod("int", stdMethodName, "return 44;", t));
-        Interface J = new Interface("J", I.with("String"),
-            new DefaultMethod("int", stdMethodName, "return 55;", s));
-        Class C = new Class("C", I.with("String"), J,
-            new ConcreteMethod("int", stdMethodName,
-                "return I.super.m(s);", AccessFlag.PUBLIC, s));
-        C.addCompilationDependency(I.findMethod(stdMethodName));
-
-        assertThrows(AbstractMethodError.class, C,
-            new ConcreteMethod(
-                "int", stdMethodName, "return -1;", AccessFlag.PUBLIC, s),
-            "-1", "\"string\"");
-    }
-
-    /**
-     * interface I { default Integer m() { return new Integer(88); } }
-     * class C { int m() { return 99; } }
-     * class D extends C implements I {}
-     * class S { Object foo() { return (new D()).m(); } // link sig: ()LInteger;
-     * TEST: S s = new S(); s.foo() == new Integer(88)
-     */
-    public void testNoCovarNoBridge() {
-        Interface I = new Interface("I", new DefaultMethod(
-            "Integer", "m", "return new Integer(88);"));
-        Class C = new Class("C", new ConcreteMethod(
-            "int", "m", "return 99;", AccessFlag.PUBLIC));
-        Class D = new Class("D", I, C);
-
-        ConcreteMethod DstubMethod = new ConcreteMethod(
-            "Integer", "m", "return null;", AccessFlag.PUBLIC);
-        Class Dstub = new Class("D", DstubMethod);
-
-        ConcreteMethod toCall = new ConcreteMethod(
-            "Object", "foo", "return (new D()).m();", AccessFlag.PUBLIC);
-        Class S = new Class("S", D, toCall);
-        S.addCompilationDependency(Dstub);
-        S.addCompilationDependency(DstubMethod);
-
-        assertInvokeVirtualEquals(new Integer(88), S, toCall, "null");
-    }
-
-    /**
-     * interface J { int m(); }
-     * interface I extends J { default int m() { return 99; } }
-     * class B implements J {}
-     * class C extends B implements I {}
-     * TEST: C c = new C(); c.m() == 99
-     *
-     * The point of this test is that B does not get default method analysis,
-     * and C does not generate any new miranda methods in the vtable.
-     * It verifies that default method analysis occurs when mirandas have been
-     * inherited and the supertypes don't have any overpass methods.
-     */
-    public void testNoNewMiranda() {
-        Interface J = new Interface("J", AbstractMethod.std());
-        Interface I = new Interface("I", J, DefaultMethod.std("99"));
-        Class B = new Class("B", J);
-        Class C = new Class("C", B, I);
-        assertInvokeVirtualEquals(99, C);
-    }
-
-    public void testStrictfpDefault() {
-        try {
-            java.lang.Class.forName("vm.StrictfpDefault");
-        } catch (Exception e) {
-            fail("Could not load class", e);
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Asserts.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,395 @@
+/*
+ * 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 jdk.testlibrary;
+
+/**
+ * Asserts that can be used for verifying assumptions in tests.
+ *
+ * An assertion will throw a {@link RuntimeException} if the assertion isn't
+ * valid.  All the asserts can be imported into a test by using a static
+ * import:
+ *
+ * <pre>
+ * {@code
+ * import static com.oracle.java.testlibrary.Asserts.*;
+ * }
+ *
+ * Always provide a message describing the assumption if the line number of the
+ * failing assertion isn't enough to understand why the assumption failed. For
+ * example, if the assertion is in a loop or in a method that is called
+ * multiple times, then the line number won't provide enough context to
+ * understand the failure.
+ * </pre>
+ */
+public class Asserts {
+
+    /**
+     * Shorthand for {@link #assertLessThan(T, T)}.
+     *
+     * @see #assertLessThan(T, T)
+     */
+    public static <T extends Comparable<T>> void assertLT(T lhs, T rhs) {
+        assertLessThan(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThan(T, T, String)}.
+     *
+     * @see #assertLessThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLT(T lhs, T rhs, String msg) {
+        assertLessThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertLessThan(T, T, String)} with a default message.
+     *
+     * @see #assertLessThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLessThan(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " < " + format(rhs);
+        assertLessThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is less than {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>>void assertLessThan(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) < 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThanOrEqual(T, T)}.
+     *
+     * @see #assertLessThanOrEqual(T, T)
+     */
+    public static <T extends Comparable<T>> void assertLTE(T lhs, T rhs) {
+        assertLessThanOrEqual(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThanOrEqual(T, T, String)}.
+     *
+     * @see #assertLessThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLTE(T lhs, T rhs, String msg) {
+        assertLessThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertLessThanOrEqual(T, T, String)} with a default message.
+     *
+     * @see #assertLessThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLessThanOrEqual(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " <= " + format(rhs);
+        assertLessThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is less than or equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertLessThanOrEqual(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) <= 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertEquals(T, T)}.
+     *
+     * @see #assertEquals(T, T)
+     */
+    public static void assertEQ(Object lhs, Object rhs) {
+        assertEquals(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertEquals(T, T, String)}.
+     *
+     * @see #assertEquals(T, T, String)
+     */
+    public static void assertEQ(Object lhs, Object rhs, String msg) {
+        assertEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertEquals(T, T, String)} with a default message.
+     *
+     * @see #assertEquals(T, T, String)
+     */
+    public static void assertEquals(Object lhs, Object rhs) {
+        String msg = "Expected " + format(lhs) + " to equal " + format(rhs);
+        assertEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertEquals(Object lhs, Object rhs, String msg) {
+        if (lhs == null) {
+            if (rhs != null) {
+                error(msg);
+            }
+        } else {
+            assertTrue(lhs.equals(rhs), msg);
+        }
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThanOrEqual(T, T)}.
+     *
+     * @see #assertGreaterThanOrEqual(T, T)
+     */
+    public static <T extends Comparable<T>> void assertGTE(T lhs, T rhs) {
+        assertGreaterThanOrEqual(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThanOrEqual(T, T, String)}.
+     *
+     * @see #assertGreaterThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGTE(T lhs, T rhs, String msg) {
+        assertGreaterThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertGreaterThanOrEqual(T, T, String)} with a default message.
+     *
+     * @see #assertGreaterThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGreaterThanOrEqual(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " >= " + format(rhs);
+        assertGreaterThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is greater than or equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertGreaterThanOrEqual(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) >= 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThan(T, T)}.
+     *
+     * @see #assertGreaterThan(T, T)
+     */
+    public static <T extends Comparable<T>> void assertGT(T lhs, T rhs) {
+        assertGreaterThan(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThan(T, T, String)}.
+     *
+     * @see #assertGreaterThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGT(T lhs, T rhs, String msg) {
+        assertGreaterThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertGreaterThan(T, T, String)} with a default message.
+     *
+     * @see #assertGreaterThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGreaterThan(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " > " + format(rhs);
+        assertGreaterThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is greater than {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertGreaterThan(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) > 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertNotEquals(T, T)}.
+     *
+     * @see #assertNotEquals(T, T)
+     */
+    public static void assertNE(Object lhs, Object rhs) {
+        assertNotEquals(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertNotEquals(T, T, String)}.
+     *
+     * @see #assertNotEquals(T, T, String)
+     */
+    public static void assertNE(Object lhs, Object rhs, String msg) {
+        assertNotEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertNotEquals(T, T, String)} with a default message.
+     *
+     * @see #assertNotEquals(T, T, String)
+     */
+    public static void assertNotEquals(Object lhs, Object rhs) {
+        String msg = "Expected " + format(lhs) + " to not equal " + format(rhs);
+        assertNotEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is not equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNotEquals(Object lhs, Object rhs, String msg) {
+        if (lhs == null) {
+            if (rhs == null) {
+                error(msg);
+            }
+        } else {
+            assertFalse(lhs.equals(rhs), msg);
+        }
+    }
+
+    /**
+     * Calls {@link #assertNull(Object, String)} with a default message.
+     *
+     * @see #assertNull(Object, String)
+     */
+    public static void assertNull(Object o) {
+        assertNull(o, "Expected " + format(o) + " to be null");
+    }
+
+    /**
+     * Asserts that {@code o} is null.
+     *
+     * @param o The reference assumed to be null.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNull(Object o, String msg) {
+        assertEquals(o, null, msg);
+    }
+
+    /**
+     * Calls {@link #assertNotNull(Object, String)} with a default message.
+     *
+     * @see #assertNotNull(Object, String)
+     */
+    public static void assertNotNull(Object o) {
+        assertNotNull(o, "Expected non null reference");
+    }
+
+    /**
+     * Asserts that {@code o} is <i>not</i> null.
+     *
+     * @param o The reference assumed <i>not</i> to be null,
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNotNull(Object o, String msg) {
+        assertNotEquals(o, null, msg);
+    }
+
+    /**
+     * Calls {@link #assertFalse(boolean, String)} with a default message.
+     *
+     * @see #assertFalse(boolean, String)
+     */
+    public static void assertFalse(boolean value) {
+        assertFalse(value, "Expected value to be false");
+    }
+
+    /**
+     * Asserts that {@code value} is {@code false}.
+     *
+     * @param value The value assumed to be false.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertFalse(boolean value, String msg) {
+        assertTrue(!value, msg);
+    }
+
+    /**
+     * Calls {@link #assertTrue(boolean, String)} with a default message.
+     *
+     * @see #assertTrue(boolean, String)
+     */
+    public static void assertTrue(boolean value) {
+        assertTrue(value, "Expected value to be true");
+    }
+
+    /**
+     * Asserts that {@code value} is {@code true}.
+     *
+     * @param value The value assumed to be true.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertTrue(boolean value, String msg) {
+        if (!value) {
+            error(msg);
+        }
+    }
+
+    private static <T extends Comparable<T>> int compare(T lhs, T rhs, String msg) {
+        assertNotNull(lhs, msg);
+        assertNotNull(rhs, msg);
+        return lhs.compareTo(rhs);
+    }
+
+    private static String format(Object o) {
+        return o == null? "null" : o.toString();
+    }
+
+    private static void error(String msg) {
+        throw new RuntimeException(msg);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 jdk.testlibrary;
+
+import java.io.FileNotFoundException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+public final class JDKToolFinder {
+
+    private JDKToolFinder() {
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code test.jdk} or {@code compile.jdk} (both are set by the jtreg test suite)
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getJDKTool(String tool) {
+
+        // First try to find the executable in test.jdk
+        try {
+            return getTool(tool, "test.jdk");
+        } catch (FileNotFoundException e) {
+
+        }
+
+        // Now see if it's available in compile.jdk
+        try {
+            return getTool(tool, "compile.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException("Failed to find " + tool +
+                    ", looked in test.jdk (" + System.getProperty("test.jdk") +
+                    ") and compile.jdk (" + System.getProperty("compile.jdk") + ")");
+        }
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code compile.jdk}
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getCompileJDKTool(String tool) {
+        try {
+            return getTool(tool, "compile.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code test.jdk}
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getTestJDKTool(String tool) {
+        try {
+            return getTool(tool, "test.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static String getTool(String tool, String property) throws FileNotFoundException {
+        String jdkPath = System.getProperty(property);
+
+        if (jdkPath == null) {
+            throw new RuntimeException(
+                    "System property '" + property + "' not set. This property is normally set by jtreg. "
+                    + "When running test separately, set this property using '-D" + property + "=/path/to/jdk'.");
+        }
+
+        Path toolName = Paths.get("bin", tool + (Platform.isWindows() ? ".exe" : ""));
+
+        Path jdkTool = Paths.get(jdkPath, toolName.toString());
+        if (!jdkTool.toFile().exists()) {
+            throw new FileNotFoundException("Could not find file " + jdkTool.toAbsolutePath());
+        }
+
+        return jdkTool.toAbsolutePath().toString();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.testlibrary;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A utility for constructing command lines for starting JDK tool processes.
+ *
+ * The JDKToolLauncher can in particular be combined with a
+ * java.lang.ProcessBuilder to easily run a JDK tool. For example, the following
+ * code run {@code jmap -heap} against a process with GC logging turned on for
+ * the {@code jmap} process:
+ *
+ * <pre>
+ * {@code
+ * JDKToolLauncher jmap = JDKToolLauncher.create("jmap")
+ *                                       .addVMArg("-XX:+PrintGC");
+ *                                       .addVMArg("-XX:+PrintGCDetails")
+ *                                       .addToolArg("-heap")
+ *                                       .addToolArg(pid);
+ * ProcessBuilder pb = new ProcessBuilder(jmap.getCommand());
+ * Process p = pb.start();
+ * }
+ * </pre>
+ */
+public class JDKToolLauncher {
+    private final String executable;
+    private final List<String> vmArgs = new ArrayList<String>();
+    private final List<String> toolArgs = new ArrayList<String>();
+
+    private JDKToolLauncher(String tool, boolean useCompilerJDK) {
+        if (useCompilerJDK) {
+            executable = JDKToolFinder.getJDKTool(tool);
+        } else {
+            executable = JDKToolFinder.getTestJDKTool(tool);
+        }
+        vmArgs.addAll(Arrays.asList(ProcessTools.getPlatformSpecificVMArgs()));
+    }
+
+    /**
+     * Creates a new JDKToolLauncher for the specified tool. Using tools path
+     * from the compiler JDK.
+     *
+     * @param tool
+     *            The name of the tool
+     * @return A new JDKToolLauncher
+     */
+    public static JDKToolLauncher create(String tool) {
+        return new JDKToolLauncher(tool, true);
+    }
+
+    /**
+     * Creates a new JDKToolLauncher for the specified tool in the Tested JDK.
+     *
+     * @param tool
+     *            The name of the tool
+     *
+     * @return A new JDKToolLauncher
+     */
+    public static JDKToolLauncher createUsingTestJDK(String tool) {
+        return new JDKToolLauncher(tool, false);
+    }
+
+    /**
+     * Adds an argument to the JVM running the tool.
+     *
+     * The JVM arguments are passed to the underlying JVM running the tool.
+     * Arguments will automatically be prepended with "-J".
+     *
+     * Any platform specific arguments required for running the tool are
+     * automatically added.
+     *
+     *
+     * @param arg
+     *            The argument to VM running the tool
+     * @return The JDKToolLauncher instance
+     */
+    public JDKToolLauncher addVMArg(String arg) {
+        vmArgs.add(arg);
+        return this;
+    }
+
+    /**
+     * Adds an argument to the tool.
+     *
+     * @param arg
+     *            The argument to the tool
+     * @return The JDKToolLauncher instance
+     */
+    public JDKToolLauncher addToolArg(String arg) {
+        toolArgs.add(arg);
+        return this;
+    }
+
+    /**
+     * Returns the command that can be used for running the tool.
+     *
+     * @return An array whose elements are the arguments of the command.
+     */
+    public String[] getCommand() {
+        List<String> command = new ArrayList<String>();
+        command.add(executable);
+        // Add -J in front of all vmArgs
+        for (String arg : vmArgs) {
+            command.add("-J" + arg);
+        }
+        command.addAll(toolArgs);
+        return command.toArray(new String[command.size()]);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Platform.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,103 @@
+/*
+ * 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 jdk.testlibrary;
+
+public class Platform {
+    private static final String osName      = System.getProperty("os.name");
+    private static final String dataModel   = System.getProperty("sun.arch.data.model");
+    private static final String vmVersion   = System.getProperty("java.vm.version");
+    private static final String osArch      = System.getProperty("os.arch");
+
+    public static boolean is32bit() {
+        return dataModel.equals("32");
+    }
+
+    public static boolean is64bit() {
+        return dataModel.equals("64");
+    }
+
+    public static boolean isSolaris() {
+        return isOs("sunos");
+    }
+
+    public static boolean isWindows() {
+        return isOs("win");
+    }
+
+    public static boolean isOSX() {
+        return isOs("mac");
+    }
+
+    public static boolean isLinux() {
+        return isOs("linux");
+    }
+
+    private static boolean isOs(String osname) {
+        return osName.toLowerCase().startsWith(osname.toLowerCase());
+    }
+
+    public static String getOsName() {
+        return osName;
+    }
+
+    public static boolean isDebugBuild() {
+        return vmVersion.toLowerCase().contains("debug");
+    }
+
+    public static String getVMVersion() {
+        return vmVersion;
+    }
+
+    // Returns true for sparc and sparcv9.
+    public static boolean isSparc() {
+        return isArch("sparc");
+    }
+
+    public static boolean isARM() {
+        return isArch("arm");
+    }
+
+    public static boolean isPPC() {
+        return isArch("ppc");
+    }
+
+    public static boolean isX86() {
+        // On Linux it's 'i386', Windows 'x86'
+        return (isArch("i386") || isArch("x86"));
+    }
+
+    public static boolean isX64() {
+        // On OSX it's 'x86_64' and on other (Linux, Windows and Solaris) platforms it's 'amd64'
+        return (isArch("amd64") || isArch("x86_64"));
+    }
+
+    private static boolean isArch(String archname) {
+        return osArch.toLowerCase().startsWith(archname.toLowerCase());
+    }
+
+    public static String getOsArch() {
+        return osArch;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,151 @@
+/*
+ * 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 jdk.testlibrary;
+
+import static jdk.testlibrary.Asserts.assertNotEquals;
+import static jdk.testlibrary.Asserts.assertTrue;
+
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * The helper class for starting and stopping {@link Process} in a separate thread.
+ */
+public class ProcessThread extends TestThread {
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param cmd The list of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(List<String> cmd) {
+        super(new ProcessRunnable(cmd));
+    }
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param cmd The string array of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(String... cmd) {
+        super(new ProcessRunnable(cmd));
+    }
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param threadName The name of thread
+     * @param cmd The list of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(String threadName, List<String> cmd) {
+        super(new ProcessRunnable(cmd), threadName);
+    }
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param threadName The name of thread
+     * @param cmd The string array of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(String threadName, String... cmd) {
+        super(new ProcessRunnable(cmd), threadName);
+    }
+
+    /**
+     * Stops {@link Process} started by {@code ProcessRunnable}.
+     *
+     * @throws InterruptedException
+     */
+    public void stopProcess() throws InterruptedException {
+        ((ProcessRunnable) getRunnable()).stopProcess();
+    }
+
+    /**
+     * {@link Runnable} interface for starting and stopping {@link Process}.
+     */
+    static class ProcessRunnable extends XRun {
+
+        private final ProcessBuilder processBuilder;
+        private final CountDownLatch latch;
+        private volatile Process process;
+
+        /**
+         * Creates a new {@code ProcessRunnable} object.
+         *
+         * @param cmd The list of program and its arguments to to pass to {@link ProcessBuilder}
+         */
+        public ProcessRunnable(List<String> cmd) {
+            super();
+            this.processBuilder = new ProcessBuilder(cmd);
+            this.latch = new CountDownLatch(1);
+        }
+
+        /**
+         * Creates a new {@code ProcessRunnable} object.
+         *
+         * @param cmd The string array of program and its arguments to to pass to {@link ProcessBuilder}
+         */
+        public ProcessRunnable(String... cmd) {
+            super();
+            this.processBuilder = new ProcessBuilder(cmd);
+            this.latch = new CountDownLatch(1);
+        }
+
+        /**
+         * Starts the process in {@code ProcessThread}.
+         * All exceptions which occurs here will be caught and stored in {@code ProcessThread}.
+         *
+         * see {@link XRun}
+         */
+        @Override
+        public void xrun() throws Throwable {
+            this.process = processBuilder.start();
+            // Release when process is started
+            latch.countDown();
+
+            // Will block...
+            OutputAnalyzer output = new OutputAnalyzer(this.process);
+
+            assertTrue(output.getOutput().isEmpty(), "Should get an empty output, got: "
+                        + Utils.NEW_LINE + output.getOutput());
+            assertNotEquals(output.getExitValue(), 0,
+                    "Process exited with unexpected exit code");
+        }
+
+        /**
+         * Stops the process.
+         *
+         * @throws InterruptedException
+         */
+        public void stopProcess() throws InterruptedException {
+            // Wait until process is started
+            latch.await();
+            if (this.process != null) {
+                this.process.destroy();
+            }
+        }
+
+    }
+
+}
--- a/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Wed Oct 30 18:38:20 2013 +0000
@@ -25,24 +25,127 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintStream;
+import java.io.PrintWriter;
 import java.lang.management.ManagementFactory;
 import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.Phaser;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.function.Predicate;
 
 import sun.management.VMManagement;
 
 public final class ProcessTools {
+    private static final class LineForwarder extends StreamPumper.LinePump {
+        private final PrintStream ps;
+        private final String prefix;
+        LineForwarder(String prefix, PrintStream os) {
+            this.ps = os;
+            this.prefix = prefix;
+        }
+        @Override
+        protected void processLine(String line) {
+            ps.println("[" + prefix + "] " + line);
+        }
+    }
 
     private ProcessTools() {
     }
 
     /**
+     * <p>Starts a process from its builder.</p>
+     * <span>The default redirects of STDOUT and STDERR are started</span>
+     * @param name The process name
+     * @param processBuilder The process builder
+     * @return Returns the initialized process
+     * @throws IOException
+     */
+    public static Process startProcess(String name,
+                                       ProcessBuilder processBuilder)
+    throws IOException {
+        Process p = null;
+        try {
+            p = startProcess(name, processBuilder, null, -1, TimeUnit.NANOSECONDS);
+        } catch (InterruptedException | TimeoutException e) {
+            // can't ever happen
+        }
+        return p;
+    }
+
+    /**
+     * <p>Starts a process from its builder.</p>
+     * <span>The default redirects of STDOUT and STDERR are started</span>
+     * <p>
+     * It is possible to wait for the process to get to a warmed-up state
+     * via {@linkplain Predicate} condition on the STDOUT
+     * </p>
+     * @param name The process name
+     * @param processBuilder The process builder
+     * @param linePredicate The {@linkplain Predicate} to use on the STDOUT
+     *                      Used to determine the moment the target app is
+     *                      properly warmed-up.
+     *                      It can be null - in that case the warmup is skipped.
+     * @param timeout The timeout for the warmup waiting
+     * @param unit The timeout {@linkplain TimeUnit}
+     * @return Returns the initialized {@linkplain Process}
+     * @throws IOException
+     * @throws InterruptedException
+     * @throws TimeoutException
+     */
+    public static Process startProcess(String name,
+                                       ProcessBuilder processBuilder,
+                                       final Predicate<String> linePredicate,
+                                       long timeout,
+                                       TimeUnit unit)
+    throws IOException, InterruptedException, TimeoutException {
+        Process p = processBuilder.start();
+        StreamPumper stdout = new StreamPumper(p.getInputStream());
+        StreamPumper stderr = new StreamPumper(p.getErrorStream());
+
+        stdout.addPump(new LineForwarder(name, System.out));
+        stderr.addPump(new LineForwarder(name, System.err));
+        final Phaser phs = new Phaser(1);
+        if (linePredicate != null) {
+            stdout.addPump(new StreamPumper.LinePump() {
+                @Override
+                protected void processLine(String line) {
+                    if (linePredicate.test(line)) {
+                        if (phs.getRegisteredParties() > 0) {
+                            phs.arriveAndDeregister();
+                        }
+                    }
+                }
+            });
+        }
+        Future<Void> stdoutTask = stdout.process();
+        Future<Void> stderrTask = stderr.process();
+
+        try {
+            if (timeout > -1) {
+                phs.awaitAdvanceInterruptibly(0, timeout, unit);
+            }
+        } catch (TimeoutException | InterruptedException e) {
+            stdoutTask.cancel(true);
+            stderrTask.cancel(true);
+            throw e;
+        }
+
+        return p;
+    }
+
+    /**
      * Pumps stdout and stderr from running the process into a String.
      *
-     * @param processHandler
+     * @param processBuilder
      *            ProcessHandler to run.
      * @return Output from process.
      * @throws IOException
@@ -69,22 +172,19 @@
                 stdoutBuffer);
         StreamPumper errPumper = new StreamPumper(process.getErrorStream(),
                 stderrBuffer);
-        Thread outPumperThread = new Thread(outPumper);
-        Thread errPumperThread = new Thread(errPumper);
 
-        outPumperThread.setDaemon(true);
-        errPumperThread.setDaemon(true);
-
-        outPumperThread.start();
-        errPumperThread.start();
+        Future<Void> outTask = outPumper.process();
+        Future<Void> errTask = errPumper.process();
 
         try {
             process.waitFor();
-            outPumperThread.join();
-            errPumperThread.join();
+            outTask.get();
+            errTask.get();
         } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
             return null;
+        } catch (ExecutionException e) {
+            throw new IOException(e);
         }
 
         return new OutputBuffer(stdoutBuffer.toString(),
--- a/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,16 +23,65 @@
 
 package jdk.testlibrary;
 
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.OutputStream;
 import java.io.InputStream;
 import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 public final class StreamPumper implements Runnable {
 
     private static final int BUF_SIZE = 256;
 
-    private final OutputStream out;
+    /**
+     * Pump will be called by the StreamPumper to process the incoming data
+     */
+    abstract public static class Pump {
+        abstract void register(StreamPumper d);
+    }
+
+    /**
+     * OutputStream -> Pump adapter
+     */
+    final public static class StreamPump extends Pump {
+        private final OutputStream out;
+        public StreamPump(OutputStream out) {
+            this.out = out;
+        }
+
+        @Override
+        void register(StreamPumper sp) {
+            sp.addOutputStream(out);
+        }
+    }
+
+    /**
+     * Used to process the incoming data line-by-line
+     */
+    abstract public static class LinePump extends Pump {
+        @Override
+        final void register(StreamPumper sp) {
+            sp.addLineProcessor(this);
+        }
+
+        abstract protected void processLine(String line);
+    }
+
     private final InputStream in;
+    private final Set<OutputStream> outStreams = new HashSet<>();
+    private final Set<LinePump> linePumps = new HashSet<>();
+
+    private final AtomicBoolean processing = new AtomicBoolean(false);
+    private final FutureTask<Void> processingTask = new FutureTask(this, null);
+
+    public StreamPumper(InputStream in) {
+        this.in = in;
+    }
 
     /**
      * Create a StreamPumper that reads from in and writes to out.
@@ -43,8 +92,8 @@
      *            The stream to write to.
      */
     public StreamPumper(InputStream in, OutputStream out) {
-        this.in = in;
-        this.out = out;
+        this(in);
+        this.addOutputStream(out);
     }
 
     /**
@@ -54,25 +103,97 @@
      */
     @Override
     public void run() {
-        int length;
-        InputStream localIn = in;
-        OutputStream localOut = out;
-        byte[] buffer = new byte[BUF_SIZE];
+        try (BufferedInputStream is = new BufferedInputStream(in)) {
+            ByteArrayOutputStream lineBos = new ByteArrayOutputStream();
+            byte[] buf = new byte[BUF_SIZE];
+            int len = 0;
+            int linelen = 0;
+
+            while ((len = is.read(buf)) > 0 && !Thread.interrupted()) {
+                for(OutputStream out : outStreams) {
+                    out.write(buf, 0, len);
+                }
+                if (!linePumps.isEmpty()) {
+                    int i = 0;
+                    int lastcrlf = -1;
+                    while (i < len) {
+                        if (buf[i] == '\n' || buf[i] == '\r') {
+                            int bufLinelen = i - lastcrlf - 1;
+                            if (bufLinelen > 0) {
+                                lineBos.write(buf, lastcrlf + 1, bufLinelen);
+                            }
+                            linelen += bufLinelen;
 
-        try {
-            while ((length = localIn.read(buffer)) > 0 && !Thread.interrupted()) {
-                localOut.write(buffer, 0, length);
+                            if (linelen > 0) {
+                                lineBos.flush();
+                                final String line = lineBos.toString();
+                                linePumps.stream().forEach((lp) -> {
+                                    lp.processLine(line);
+                                });
+                                lineBos.reset();
+                                linelen = 0;
+                            }
+                            lastcrlf = i;
+                        }
+
+                        i++;
+                    }
+                    if (lastcrlf == -1) {
+                        lineBos.write(buf, 0, len);
+                        linelen += len;
+                    } else if (lastcrlf < len - 1) {
+                        lineBos.write(buf, lastcrlf + 1, len - lastcrlf - 1);
+                        linelen += len - lastcrlf - 1;
+                    }
+                }
             }
+
         } catch (IOException e) {
-            // Just abort if something like this happens.
             e.printStackTrace();
         } finally {
+            for(OutputStream out : outStreams) {
+                try {
+                    out.flush();
+                } catch (IOException e) {}
+            }
             try {
-                localOut.flush();
                 in.close();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
+            } catch (IOException e) {}
         }
     }
+
+    final void addOutputStream(OutputStream out) {
+        outStreams.add(out);
+    }
+
+    final void addLineProcessor(LinePump lp) {
+        linePumps.add(lp);
+    }
+
+    final public StreamPumper addPump(Pump ... pump) {
+        if (processing.get()) {
+            throw new IllegalStateException("Can not modify pumper while " +
+                                            "processing is in progress");
+        }
+        for(Pump p : pump) {
+            p.register(this);
+        }
+        return this;
+    }
+
+    final public Future<Void> process() {
+        if (!processing.compareAndSet(false, true)) {
+            throw new IllegalStateException("Can not re-run the processing");
+        }
+        Thread t = new Thread(new Runnable() {
+            @Override
+            public void run() {
+                processingTask.run();
+            }
+        });
+        t.setDaemon(true);
+        t.start();
+
+        return processingTask;
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/TestThread.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,249 @@
+/*
+ * 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 jdk.testlibrary;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+import java.util.concurrent.TimeoutException;
+
+/**
+ * Thread which catches exceptions thrown during the execution
+ * and stores them for later analysis.
+ *
+ * <pre>
+ * {@code
+ * TestThread thread = new TestThread(new XRun() {
+ *      public void run() {
+ *      // do something
+ *      }
+ * });
+ * thread.start();
+ * // do something
+ * Throwable uncaught = thread.getUncaught();
+ * }
+ * </pre>
+ */
+public class TestThread extends Thread {
+
+    private final Runnable runnable;
+    private volatile Throwable uncaught;
+
+    /**
+     * Returns {@link Runnable} the thread has been created with.
+     *
+     * @return The object whose {@code run} method is called
+     */
+    public Runnable getRunnable() {
+        return runnable;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     */
+    public TestThread(Runnable target, String name) {
+        super(target, name);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param target The object whose {@code run} method is called
+     */
+    public TestThread(Runnable target) {
+        super(target);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     * @param stackSize Stack size
+     */
+    public TestThread(ThreadGroup group, Runnable target, String name,
+            long stackSize) {
+        super(group, target, name, stackSize);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     */
+    public TestThread(ThreadGroup group, Runnable target, String name) {
+        super(group, target, name);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     */
+    public TestThread(ThreadGroup group, Runnable target) {
+        super(group, target);
+        this.runnable = target;
+    }
+
+    /**
+     * The thread executor.
+     */
+    @Override
+    public void run() {
+        try {
+            super.run();
+        } catch (Throwable t) {
+            uncaught = t;
+        }
+    }
+
+    /**
+     * Returns exception caught during the execution.
+     *
+     * @return {@link Throwable}
+     */
+    public Throwable getUncaught() {
+        return uncaught;
+    }
+
+    /**
+     * Waits for {@link TestThread} to die
+     * and throws exception caught during the execution.
+     *
+     * @throws InterruptedException
+     * @throws Throwable
+     */
+    public void joinAndThrow() throws InterruptedException, Throwable {
+        join();
+        if (uncaught != null) {
+            throw uncaught;
+        }
+    }
+
+    /**
+     * Waits during {@code timeout} for {@link TestThread} to die
+     * and throws exception caught during the execution.
+     *
+     * @param timeout The time to wait in milliseconds
+     * @throws InterruptedException
+     * @throws Throwable
+     */
+    public void joinAndThrow(long timeout) throws InterruptedException,
+            Throwable {
+        join(timeout);
+        if (isAlive()) {
+            throw new TimeoutException();
+        }
+        if (uncaught != null) {
+            throw uncaught;
+        }
+    }
+
+    /**
+     * Waits for {@link TestThread} to die
+     * and returns exception caught during the execution.
+     *
+     * @return Exception caught during the execution
+     * @throws InterruptedException
+     */
+    public Throwable joinAndReturn() throws InterruptedException {
+        join();
+        if (uncaught != null) {
+            return uncaught;
+        }
+        return null;
+    }
+
+    /**
+     * Waits during {@code timeout} for {@link TestThread} to die
+     * and returns exception caught during the execution.
+     *
+     * @param timeout The time to wait in milliseconds
+     * @return Exception caught during the execution
+     * @throws InterruptedException
+     */
+    public Throwable joinAndReturn(long timeout) throws InterruptedException {
+        join(timeout);
+        if (isAlive()) {
+            return new TimeoutException();
+        }
+        if (uncaught != null) {
+            return uncaught;
+        }
+        return null;
+    }
+
+    /**
+     * Waits until {@link TestThread} is in the certain {@link State}
+     * and blocking on {@code object}.
+     *
+     * @param state The thread state
+     * @param object The object to block on
+     */
+    public void waitUntilBlockingOnObject(Thread.State state, Object object) {
+        String want = object == null ? null : object.getClass().getName() + '@'
+                + Integer.toHexString(System.identityHashCode(object));
+        ThreadMXBean tmx = ManagementFactory.getThreadMXBean();
+        while (isAlive()) {
+            ThreadInfo ti = tmx.getThreadInfo(getId());
+            if (ti.getThreadState() == state
+                    && (want == null || want.equals(ti.getLockName()))) {
+                return;
+            }
+            try {
+                Thread.sleep(1);
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+
+    /**
+     * Waits until {@link TestThread} is in native.
+     */
+    public void waitUntilInNative() {
+        ThreadMXBean tmx = ManagementFactory.getThreadMXBean();
+        while (isAlive()) {
+            ThreadInfo ti = tmx.getThreadInfo(getId());
+            if (ti.isInNative()) {
+                return;
+            }
+            try {
+                Thread.sleep(1);
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Utils.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 jdk.testlibrary;
+
+import static jdk.testlibrary.Asserts.assertTrue;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Common library for various test helper functions.
+ */
+public final class Utils {
+
+    /**
+     * Returns the sequence used by operating system to separate lines.
+     */
+    public static final String NEW_LINE = System.getProperty("line.separator");
+
+    /**
+     * Returns the value of 'test.vm.opts'system property.
+     */
+    public static final String VM_OPTIONS = System.getProperty("test.vm.opts", "");
+
+
+    private Utils() {
+        // Private constructor to prevent class instantiation
+    }
+
+    /**
+     * Returns the list of VM options.
+     *
+     * @return List of VM options
+     */
+    public static List<String> getVmOptions() {
+        return getVmOptions(false);
+    }
+
+    /**
+     * Returns the list of VM options with -J prefix.
+     *
+     * @return The list of VM options with -J prefix
+     */
+    public static List<String> getForwardVmOptions() {
+        return getVmOptions(true);
+    }
+
+    private static List<String> getVmOptions(boolean forward) {
+        List<String> optionsList = new ArrayList<>();
+        String options = VM_OPTIONS.trim();
+        if (!options.isEmpty()) {
+            options = options.replaceAll("\\s+", " ");
+            for (String option : options.split(" ")) {
+                if (forward) {
+                    optionsList.add("-J" + option);
+                } else {
+                    optionsList.add(option);
+                }
+            }
+        }
+
+        return optionsList;
+    }
+
+    /**
+     * Returns the free port on the local host.
+     * The function will spin until a valid port number is found.
+     *
+     * @return The port number
+     * @throws InterruptedException if any thread has interrupted the current thread
+     * @throws IOException if an I/O error occurs when opening the socket
+     */
+    public static int getFreePort() throws InterruptedException, IOException {
+        int port = -1;
+
+        while (port <= 0) {
+            Thread.sleep(100);
+
+            ServerSocket serverSocket = null;
+            try {
+                serverSocket = new ServerSocket(0);
+                port = serverSocket.getLocalPort();
+            } finally {
+                serverSocket.close();
+            }
+        }
+
+        return port;
+    }
+
+    /**
+     * Returns the name of the local host.
+     *
+     * @return The host name
+     * @throws UnknownHostException if IP address of a host could not be determined
+     */
+    public static String getHostname() throws UnknownHostException {
+        InetAddress inetAddress = InetAddress.getLocalHost();
+        String hostName = inetAddress.getHostName();
+
+        assertTrue((hostName != null && !hostName.isEmpty()),
+                "Cannot get hostname");
+
+        return hostName;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/XRun.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,56 @@
+/*
+ * 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 jdk.testlibrary;
+
+/**
+ * This type serves no other purpose than to simply allow automatically running
+ * something in a thread, and have all exceptions propagated to
+ * RuntimeExceptions, which are thrown up to thread, which in turn should
+ * probably be a {@link TestThread} to they are stored.
+ */
+public abstract class XRun implements Runnable {
+
+    /**
+     * Invokes {@code xrun()} and throws all exceptions caught in it
+     * up to the thread.
+     */
+    public final void run() {
+        try {
+            xrun();
+        } catch (Error e) {
+            throw e;
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Throwable e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Override this method to implement what to run in the thread.
+     *
+     * @throws Throwable
+     */
+    protected abstract void xrun() throws Throwable;
+}
--- a/test/sun/management/jdp/JdpClient.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/management/jdp/JdpClient.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -35,8 +35,10 @@
 import java.nio.channels.Selector;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.Map;
 import sun.management.jdp.JdpException;
 import sun.management.jdp.JdpJmxPacket;
+import sun.management.jdp.JdpPacketReader;
 
 public class JdpClient {
 
@@ -47,6 +49,31 @@
         private static int maxPacketCount = 1;
         private static int maxEmptyPacketCount = 10;
 
+        private void get(Map<?,?> map, String key)
+            throws JdpException {
+
+            if (map.get(key) == null) {
+                  throw new JdpException("Test failed, packet field " + key + " missed");
+            }
+        }
+
+        private void checkFieldPresence(JdpJmxPacket p)
+            throws IOException, JdpException {
+
+            byte[] b = p.getPacketData();
+
+            JdpPacketReader reader = new JdpPacketReader(b);
+            Map<String,String> pMap = reader.getDiscoveryDataAsMap();
+
+            get(pMap, JdpJmxPacket.UUID_KEY);
+            get(pMap, JdpJmxPacket.MAIN_CLASS_KEY);
+            get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY);
+            // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY);
+            get(pMap, JdpJmxPacket.PROCESS_ID_KEY);
+            get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY);
+            get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY);
+        }
+
 
         PacketListener(DatagramChannel channel) {
             this.channel = channel;
@@ -67,6 +94,8 @@
                 try {
                     while (true) {
 
+                        // Use tcpdump -U -w - -s 1400 -c 2 -vv port 7095
+                        // to verify that correct packet being sent
                         sel.selectedKeys().clear();
                         buf.rewind();
 
@@ -87,10 +116,10 @@
                         buf.flip();
                         byte[] dgramData = new byte[buf.remaining()];
                         buf.get(dgramData);
-
                         try {
                             JdpJmxPacket packet = new JdpJmxPacket(dgramData);
                             JdpDoSomething.printJdpPacket(packet);
+                            checkFieldPresence(packet);
                             if(++count > maxPacketCount){
                                    break;
                             }
--- a/test/sun/management/jdp/JdpDoSomething.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/management/jdp/JdpDoSomething.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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
@@ -32,7 +32,7 @@
 public class JdpDoSomething {
 
     private static final String lockFileName = "JdpDoSomething.lck";
-    private static final boolean verbose=false;
+    private static final boolean verbose = false;
 
     public static boolean getVerbose(){
         return verbose;
@@ -52,6 +52,9 @@
             System.out.println("Jmx: " + p.getJmxServiceUrl());
             System.out.println("Main: " + p.getMainClass());
             System.out.println("InstanceName: " + p.getInstanceName());
+            System.out.println("ProccessId: " + p.getProcessId());
+            System.out.println("BroadcastInterval: " + p.getBroadcastInterval());
+            System.out.println("Rmi Hostname: " + p.getRmiHostname());
 
             System.out.flush();
         }
--- a/test/sun/management/jdp/JdpTest.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/management/jdp/JdpTest.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -x
 
-# 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
@@ -56,7 +56,7 @@
 
     if [ ! -d ${_testclasses} ]
     then
-	  mkdir -p ${_testclasses}
+       mkdir -p ${_testclasses}
     fi
 
     rm -f ${_testclasses}/*.class
@@ -64,7 +64,7 @@
     # Compile testcase
     ${COMPILEJAVA}/bin/javac -XDignore.symbol.file -d ${_testclasses} \
                                              JdpUnitTest.java \
-                                             JdpDoSomething.java  \
+                                             JdpDoSomething.java \
                                              JdpClient.java
 
 
@@ -84,10 +84,10 @@
   ${TESTJAVA}/bin/java -server $* -cp ${_testclasses} ${testappname}  >> ${_logname} 2>&1 &
  _last_pid=$!
 
-# wait until VM is actually starts. 
+# wait until VM is actually starts.
 # please note, if vm doesn't start for some reason
 # jtreg kills the test by timeout. Don't file a bug.
-  cnt=1 
+  cnt=1
   while true
   do
     npid=`_get_pid`
@@ -135,7 +135,6 @@
     -Dcom.sun.management.jdp.port=${_port} \
     -Dcom.sun.management.jdp.address=${_ip} \
   JdpClient
-
 }
 
 
@@ -156,18 +155,20 @@
     _echo "**** Test one ****"
 
     _app_start JdpUnitTest \
-    -Dcom.sun.management.jdp.port=${_port} \
-    -Dcom.sun.management.jdp.address=${_ip} \
-    -Dcom.sun.management.jdp.pause=5
+        -Dcom.sun.management.jdp.port=${_port} \
+        -Dcom.sun.management.jdp.address=${_ip} \
+        -Dcom.sun.management.jdp.name=testme \
+        -Djava.rmi.server.hostname=localhost \
+        -Dcom.sun.management.jdp.pause=5
 
     res=`_testme`
 
     case "${res}" in
      OK*)
-	_echo "Passed"
+        _echo "Passed"
      ;;
      *)
-	_echo "Failed!"
+        _echo "Failed!"
      ;;
     esac
 
@@ -179,21 +180,23 @@
     _echo "**** Test two ****"
 
     _app_start JdpDoSomething \
-     -Dcom.sun.management.jdp.port=${_port} \
-     -Dcom.sun.management.jdp.address=${_ip} \
-     -Dcom.sun.management.jdp.pause=5 \
-     -Dcom.sun.management.jmxremote.port=${_jmxport} \
-     -Dcom.sun.management.jmxremote.authenticate=false \
-     -Dcom.sun.management.jmxremote.ssl=false
+        -Dcom.sun.management.jdp.port=${_port} \
+        -Dcom.sun.management.jdp.address=${_ip} \
+        -Dcom.sun.management.jdp.pause=5 \
+        -Dcom.sun.management.jdp.name=testme \
+        -Djava.rmi.server.hostname=localhost \
+        -Dcom.sun.management.jmxremote.port=${_jmxport} \
+        -Dcom.sun.management.jmxremote.authenticate=false \
+        -Dcom.sun.management.jmxremote.ssl=false
 
     res=`_testme`
 
     case "${res}" in
      OK*)
-	_echo "Passed"
+        _echo "Passed"
      ;;
      *)
-	_echo "Failed!"
+        _echo "Failed!"
      ;;
     esac
 
@@ -210,6 +213,7 @@
                 jdp.port=${_port} \
                 jdp.address=${_ip} \
                 jdp.pause=5 \
+                jdp.name=jcmdtest \
                 jmxremote.port=${_jmxport} \
                 jmxremote.authenticate=false \
                 jmxremote.ssl=false
@@ -218,10 +222,10 @@
 
     case "${res}" in
      OK*)
-	_echo "Passed"
+        _echo "Passed"
      ;;
      *)
-	_echo "Failed!"
+        _echo "Failed!"
      ;;
     esac
 
@@ -233,19 +237,21 @@
     _echo "**** Test four ****"
 
     _app_start JdpDoSomething \
-     -Dcom.sun.management.jmxremote.autodiscovery=true \
-     -Dcom.sun.management.jmxremote.port=${_jmxport} \
-     -Dcom.sun.management.jmxremote.authenticate=false \
-     -Dcom.sun.management.jmxremote.ssl=false
+        -Dcom.sun.management.jmxremote.autodiscovery=true \
+        -Dcom.sun.management.jdp.name=testme \
+        -Djava.rmi.server.hostname=localhost \
+        -Dcom.sun.management.jmxremote.port=${_jmxport} \
+        -Dcom.sun.management.jmxremote.authenticate=false \
+        -Dcom.sun.management.jmxremote.ssl=false
 
     res=`_testme`
 
     case "${res}" in
      OK*)
-	_echo "Passed"
+        _echo "Passed"
      ;;
      *)
-	_echo "Failed!"
+        _echo "Failed!"
      ;;
     esac
 
@@ -269,10 +275,10 @@
 
     case "${res}" in
      OK*)
-	_echo "Passed"
+        _echo "Passed"
      ;;
      *)
-	_echo "Failed!"
+        _echo "Failed!"
      ;;
     esac
 
@@ -300,28 +306,28 @@
 
 for parm in "$@"
 do
-   case $parm in
-  --verbose)      _verbose=yes  ;;
-  --jtreg)        _jtreg=yes    ;;
-  --no-compile)   _compile=no   ;;
-  --testsuite=*)  _testsuite=`_echo $parm | sed "s,^--.*=\(.*\),\1,"`  ;;
-  *)
-     echo "Undefined parameter $parm. Try --help for help"
-     exit
-   ;;
- esac
+  case $parm in
+      --verbose)      _verbose=yes  ;;
+      --jtreg)        _jtreg=yes    ;;
+      --no-compile)   _compile=no   ;;
+      --testsuite=*)  _testsuite=`_echo $parm | sed "s,^--.*=\(.*\),\1,"`  ;;
+      *)
+        echo "Undefined parameter $parm. Try --help for help"
+        exit
+      ;;
+  esac
 done
 
 if [ "${_compile}" = "yes" ]
 then
- _do_compile
+  _do_compile
 fi
 
 if [ "${_jtreg}" = "yes" ]
 then
- _testclasses=${TESTCLASSES}
- _testsrc=${TESTSRC}
- _logname="output.txt"
+  _testclasses=${TESTCLASSES}
+  _testsrc=${TESTSRC}
+  _logname="output.txt"
 fi
 
 # Make sure _tesclasses is absolute path
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,221 @@
+/*
+ * 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.io.File;
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
+import jdk.testlibrary.JdkFinder;
+import jdk.testlibrary.ProcessTools;
+
+/**
+ * @test
+ * @bug 6434402 8004926
+ * @library /lib/testlibrary
+ * @build TestManager TestApplication CustomLauncherTest
+ * @run main CustomLauncherTest
+ * @author Jaroslav Bachorik
+ */
+public class CustomLauncherTest {
+    private static final  String TEST_CLASSES = System.getProperty("test.classes");
+    private static final  String TEST_JDK = System.getProperty("test.jdk");
+
+    private static final  String TEST_SRC = System.getProperty("test.src");
+    private static final  String OSNAME = System.getProperty("os.name");
+    private static final  String ARCH;
+    private static final  String LIBARCH;
+
+    static {
+        // magic with os.arch
+        String osarch = System.getProperty("os.arch");
+        switch (osarch) {
+            case "i386":
+            case "i486":
+            case "i586":
+            case "i686":
+            case "i786":
+            case "i886":
+            case "i986": {
+                ARCH = "i586";
+                break;
+            }
+            case "x86_64":
+            case "amd64": {
+                ARCH = "amd64";
+                break;
+            }
+            default: {
+                ARCH = osarch;
+            }
+        }
+        LIBARCH = ARCH.equals("i586") ? "i386" : ARCH;
+    }
+
+    public static void main(String[] args) throws Exception {
+        if (TEST_CLASSES == null || TEST_CLASSES.isEmpty()) {
+            System.out.println("Test is designed to be run from jtreg only");
+            return;
+        }
+
+        String PLATFORM = "";
+        switch (OSNAME.toLowerCase()) {
+            case "linux": {
+                PLATFORM = "linux";
+                break;
+            }
+            case "sunos": {
+                PLATFORM = "solaris";
+                break;
+            }
+            default: {
+                System.out.println("Test not designed to run on this operating " +
+                                   "system (" + OSNAME + "), skipping...");
+                return;
+            }
+        }
+
+        String LAUNCHER = TEST_SRC + File.separator + PLATFORM + "-" + ARCH +
+                          File.separator + "launcher";
+
+        final FileSystem FS = FileSystems.getDefault();
+        final boolean hasLauncher = Files.isExecutable(FS.getPath(LAUNCHER));
+        if (!hasLauncher) {
+            System.out.println("Launcher [" + LAUNCHER + "] does not exist. Skipping the test.");
+            return;
+        }
+
+        Path libjvmPath = findLibjvm(FS);
+        if (libjvmPath == null) {
+            throw new Error("Unable to locate 'libjvm.so' in " + TEST_JDK);
+        }
+
+        Process serverPrc = null, clientPrc = null;
+
+        try {
+            System.out.println("Starting custom launcher:");
+            System.out.println("=========================");
+            System.out.println("  launcher  : " + LAUNCHER);
+            System.out.println("  libjvm    : " + libjvmPath.toString());
+            System.out.println("  classpath : " + TEST_CLASSES);
+            ProcessBuilder server = new ProcessBuilder(LAUNCHER, libjvmPath.toString(), TEST_CLASSES, "TestApplication");
+
+            final AtomicReference<String> port = new AtomicReference<>();
+            final AtomicReference<String> pid = new AtomicReference<>();
+
+            serverPrc = ProcessTools.startProcess(
+                "Launcher",
+                server,
+                (String line) -> {
+                    if (line.startsWith("port:")) {
+                         port.set(line.split("\\:")[1]);
+                     } else  if (line.startsWith("pid:")) {
+                         pid.set(line.split("\\:")[1]);
+                     } else if (line.startsWith("waiting")) {
+                         return true;
+                     }
+                     return false;
+                },
+                5,
+                TimeUnit.SECONDS
+            );
+
+            System.out.println("Attaching test manager:");
+            System.out.println("=========================");
+            System.out.println("  PID           : " + pid.get());
+            System.out.println("  shutdown port : " + port.get());
+
+            ProcessBuilder client = ProcessTools.createJavaProcessBuilder(
+                "-cp",
+                TEST_CLASSES +
+                    File.pathSeparator +
+                    TEST_JDK +
+                    File.separator +
+                    "lib" +
+                    File.separator +
+                    "tools.jar",
+                "TestManager",
+                pid.get(),
+                port.get(),
+                "true"
+            );
+
+            clientPrc = ProcessTools.startProcess(
+                "TestManager",
+                client,
+                (String line) -> line.startsWith("Starting TestManager for PID"),
+                10,
+                TimeUnit.SECONDS
+            );
+
+            int clientExitCode = clientPrc.waitFor();
+            int serverExitCode = serverPrc.waitFor();
+
+            if (clientExitCode != 0 || serverExitCode != 0) {
+                throw new Error("Test failed");
+            }
+        } finally {
+            if (clientPrc != null) {
+                clientPrc.destroy();
+                clientPrc.waitFor();
+            }
+            if (serverPrc != null) {
+                serverPrc.destroy();
+                serverPrc.waitFor();
+            }
+        }
+    }
+
+    private static Path findLibjvm(FileSystem FS) {
+        Path libjvmPath = findLibjvm(FS.getPath(TEST_JDK, "jre", "lib", LIBARCH));
+        if (libjvmPath == null) {
+            libjvmPath = findLibjvm(FS.getPath(TEST_JDK, "lib", LIBARCH));
+        }
+        return libjvmPath;
+    }
+
+    private static Path findLibjvm(Path libPath) {
+        // ARCH/libjvm.so -> ARCH/server/libjvm.so -> ARCH/client/libjvm.so
+        Path libjvmPath = libPath.resolve("libjvm.so");
+        if (isFileOk(libjvmPath)) {
+            return libjvmPath;
+        }
+        libjvmPath = libPath.resolve("server/libjvm.so");
+        if (isFileOk(libjvmPath)) {
+            return libjvmPath;
+        }
+        libjvmPath = libPath.resolve("client/libjvm.so");
+        if (isFileOk(libPath)) {
+            return libjvmPath;
+        }
+
+        return null;
+    }
+
+    private static boolean isFileOk(Path path) {
+        return Files.isRegularFile(path) && Files.isReadable(path);
+    }
+}
--- a/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute 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 6434402
-# @summary Start an application using a custom launcher and check that
-#          a management tool can connect.
-#
-# @build TestManager TestApplication
-# @run shell CustomLauncherTest.sh
-
-#
-# Check we are run from jtreg
-#
-if [ -z "${TESTCLASSES}" ]; then
-    echo "Test is designed to be run from jtreg only"
-    exit 0
-fi
-
-#
-# For now this test passes silently on Windows - this means the test only
-# has to locate libjvm.so. Also $! is not reliable on some releases of MKS.
-#{
-OS=`uname -s`
-if [ "$OS" != "Linux" -a "$OS" != "SunOS" ]; then
-    echo "Test not designed to run on this operating system, skipping..."
-    exit 0
-fi
-
-#
-# Locate the custom launcher for this platform
-#
-PLATFORM=unknown
-ARCH=unknown
-if [ "$OS" = "SunOS" ]; then
-    PLATFORM=solaris
-    case "`uname -p`" in
-	i[3-9]86)
-	    ARCH=i586
-	    ;;
-	sparc)
-	    ARCH=sparc
-	    ;;
-    esac
-else
-    PLATFORM=linux
-    case "`uname -m`" in
-	i[3-6]86)
-	    ARCH=i586
-	    ;;
-	x86_64)
-	    ARCH=amd64
-	    ;;
-    esac
-fi
-
-
-#
-# On x86 the native libraries are in lib/i386 for
-# compatability reasons
-#
-if [ "$ARCH" = "i586" ]; then
-    LIBARCH="i386"
-else
-    LIBARCH=$ARCH
-fi
-
-
-#
-# Check that a custom launcher exists for this platform
-#
-LAUNCHER="${TESTSRC}/${PLATFORM}-${ARCH}/launcher"
-if [ ! -x "${LAUNCHER}" ]; then
-    echo "${LAUNCHER} not found"
-    exit 0
-fi
-
-# 
-# Locate the libjvm.so library 
-#
-JVMLIB="${TESTJAVA}/jre/lib/${LIBARCH}/client/libjvm.so"
-if [ ! -f "${JVMLIB}" ]; then
-    JVMLIB="${TESTJAVA}/jre/lib/${LIBARCH}/server/libjvm.so"
-    if [ ! -f "${JVMLIB}" ]; then
-	JVMLIB="${TESTJAVA}/lib/${LIBARCH}/client/libjvm.so"
-	if [ ! -f "${JVMLIB}" ]; then
-	    JVMLIB="${TESTJAVA}/lib/${LIBARCH}/serevr/libjvm.so"
-	    if [ ! -f "${JVMLIB}" ]; then
-		echo "Unable to locate libjvm.so in ${TESTJAVA}"
-		exit 1
-	    fi
-	fi
-    fi
-fi
-
-#
-# Start the VM
-#
-outputfile=${TESTCLASSES}/Test.out
-rm -f ${outputfile}
-
-echo ''
-echo "Starting custom launcher..."
-echo " launcher: ${LAUNCHER}"
-echo "   libjvm: ${JVMLIB}"
-echo "classpath: ${TESTCLASSES}"
-
-
-${LAUNCHER} ${JVMLIB} ${TESTCLASSES} TestApplication > ${outputfile} &
-pid=$!
-
-# Wait for managed VM to startup (although this looks like a potentially
-# infinate loop, the framework will eventually kill it)
-echo "Waiting for TestAppication to test..."
-attempts=0
-while true; do
-    sleep 1
-    port=`tail -1 ${outputfile}`
-    if [ ! -z "$port" ]; then
-	# In case of errors wait time for output to be flushed
-	sleep 1
-	cat ${outputfile}
-	break
-    fi
-    attempts=`expr $attempts + 1`
-    echo "Waiting $attempts second(s) ..."
-done
-
-# Start the manager - this should connect to VM
-${TESTJAVA}/bin/java ${TESTVMOPTS} -classpath ${TESTCLASSES}:${TESTJAVA}/lib/tools.jar \
-  TestManager $pid $port true
-if [ $? != 0 ]; then 
-    echo "Test failed"
-    exit 1
-fi
-exit 0
--- a/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -29,10 +29,10 @@
  * @author Luis-Miguel Alventosa
  * @run clean JvmstatCountersTest
  * @run build JvmstatCountersTest
- * @run main/othervm JvmstatCountersTest 1
- * @run main/othervm -Dcom.sun.management.jmxremote JvmstatCountersTest 2
- * @run main/othervm -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3
- * @run main/othervm JvmstatCountersTest 4
+ * @run main/othervm/timeout=600 JvmstatCountersTest 1
+ * @run main/othervm/timeout=600 -Dcom.sun.management.jmxremote JvmstatCountersTest 2
+ * @run main/othervm/timeout=600 -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3
+ * @run main/othervm/timeout=600 JvmstatCountersTest 4
  */
 
 import java.io.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,242 @@
+/*
+ * 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.io.File;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * @test
+ * @library /lib/testlibrary
+ * @bug 5016507 6173612 6319776 6342019 6484550 8004926
+ * @summary Start a managed VM and test that a management tool can connect
+ *          without connection or username/password details.
+ *          TestManager will attempt a connection to the address obtained from
+ *          both agent properties and jvmstat buffer.
+ * @build TestManager TestApplication
+ * @run main/timeout=300 LocalManagementTest
+ */
+
+import jdk.testlibrary.ProcessTools;
+
+public class LocalManagementTest {
+    private static final  String TEST_CLASSES = System.getProperty("test.classes");
+    private static final  String TEST_JDK = System.getProperty("test.jdk");
+
+    public static void main(String[] args) throws Exception {
+        int failures = 0;
+        for(Method m : LocalManagementTest.class.getDeclaredMethods()) {
+            if (Modifier.isStatic(m.getModifiers()) &&
+                m.getName().startsWith("test")) {
+                m.setAccessible(true);
+                try {
+                    System.out.println(m.getName());
+                    System.out.println("==========");
+                    Boolean rslt = (Boolean)m.invoke(null);
+                    if (!rslt) {
+                        System.err.println(m.getName() + " failed");
+                        failures++;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    failures++;
+                }
+            }
+        }
+        if (failures > 0) {
+            throw new Error("Test failed");
+        }
+    }
+
+    private static boolean test1() throws Exception {
+        return doTest("-Dcom.sun.management.jmxremote");
+    }
+
+    private static boolean test2() throws Exception {
+        Path agentPath = findAgent();
+        if (agentPath != null) {
+            String agent = agentPath.toString();
+            return doTest("-javaagent:" + agent);
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * no args (blank) - manager should attach and start agent
+     */
+    private static boolean test3() throws Exception {
+        return doTest(null);
+    }
+
+    /**
+     * sanity check arguments to management-agent.jar
+     */
+    private static boolean test4() throws Exception {
+        Path agentPath = findAgent();
+        if (agentPath != null) {
+            ProcessBuilder builder = ProcessTools.createJavaProcessBuilder(
+                "-javaagent:" + agentPath.toString() +
+                "=com.sun.management.jmxremote.port=7775," +
+                "com.sun.management.jmxremote.authenticate=false," +
+                "com.sun.management.jmxremote.ssl=false",
+                "-cp",
+                TEST_CLASSES,
+                "TestApplication",
+                "-exit"
+            );
+
+            Process prc = null;
+            try {
+                prc = ProcessTools.startProcess(
+                    "TestApplication",
+                    builder
+                );
+                int exitCode = prc.waitFor();
+                return exitCode == 0;
+            } finally {
+                if (prc != null) {
+                    prc.destroy();
+                    prc.waitFor();
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * use DNS-only name service
+     */
+    private static boolean test5() throws Exception {
+        return doTest("-Dsun.net.spi.namservice.provider.1=\"dns,sun\"");
+    }
+
+    private static Path findAgent() {
+        FileSystem FS = FileSystems.getDefault();
+        Path agentPath = FS.getPath(
+            TEST_JDK, "jre", "lib", "management-agent.jar"
+        );
+        if (!isFileOk(agentPath)) {
+            agentPath = FS.getPath(
+                TEST_JDK, "lib", "management-agent.jar"
+            );
+        }
+        if (!isFileOk(agentPath)) {
+            System.err.println("Can not locate management-agent.jar");
+            return null;
+        }
+        return agentPath;
+    }
+
+    private static boolean isFileOk(Path path) {
+        return Files.isRegularFile(path) && Files.isReadable(path);
+    }
+
+    private static boolean doTest(String arg) throws Exception {
+        List<String> args = new ArrayList<>();
+        args.add("-cp");
+        args.add(TEST_CLASSES);
+
+        if (arg != null) {
+            args.add(arg);
+        }
+        args.add("TestApplication");
+        ProcessBuilder server = ProcessTools.createJavaProcessBuilder(
+            args.toArray(new String[args.size()])
+        );
+
+        Process serverPrc = null, clientPrc = null;
+        try {
+            final AtomicReference<String> port = new AtomicReference<>();
+            final AtomicReference<String> pid = new AtomicReference<>();
+
+            serverPrc = ProcessTools.startProcess(
+                "TestApplication",
+                server,
+                (String line) -> {
+                    if (line.startsWith("port:")) {
+                         port.set(line.split("\\:")[1]);
+                     } else  if (line.startsWith("pid:")) {
+                         pid.set(line.split("\\:")[1]);
+                     } else if (line.startsWith("waiting")) {
+                         return true;
+                     }
+                     return false;
+                },
+                5,
+                TimeUnit.SECONDS
+            );
+
+            System.out.println("Attaching test manager:");
+            System.out.println("=========================");
+            System.out.println("  PID           : " + pid.get());
+            System.out.println("  shutdown port : " + port.get());
+
+            ProcessBuilder client = ProcessTools.createJavaProcessBuilder(
+                "-cp",
+                TEST_CLASSES +
+                    File.pathSeparator +
+                    TEST_JDK +
+                    File.separator +
+                    "lib" +
+                    File.separator +
+                    "tools.jar",
+                "TestManager",
+                pid.get(),
+                port.get(),
+                "true"
+            );
+
+            clientPrc = ProcessTools.startProcess(
+                "TestManager",
+                client,
+                (String line) -> line.startsWith("Starting TestManager for PID"),
+                10,
+                TimeUnit.SECONDS
+            );
+
+            int clientExitCode = clientPrc.waitFor();
+            int serverExitCode = serverPrc.waitFor();
+            return clientExitCode == 0 && serverExitCode == 0;
+        } finally {
+            if (clientPrc != null) {
+                System.out.println("Stopping process " + clientPrc);
+                clientPrc.destroy();
+                clientPrc.waitFor();
+            }
+            if (serverPrc != null) {
+                System.out.println("Stopping process " + serverPrc);
+                serverPrc.destroy();
+                serverPrc.waitFor();
+            }
+        }
+    }
+}
\ No newline at end of file
--- a/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute 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 5016507 6173612 6319776 6342019 6484550
-# @summary Start a managed VM and test that a management tool can connect
-#          without connection or username/password details.
-#          TestManager will attempt a connection to the address obtained from 
-#          both agent properties and jvmstat buffer.
-#
-# @build TestManager TestApplication
-# @run shell/timeout=300 LocalManagementTest.sh
-
-
-doTest()
-{
-    echo ''
-
-    outputfile=${TESTCLASSES}/Test.out
-    rm -f ${outputfile}
-
-    # Start VM with given options
-    echo "+ $JAVA ${TESTVMOPTS} $1 Test"
-    $JAVA ${TESTVMOPTS} $1 TestApplication > ${outputfile}&
-    pid=$!
- 
-    # Wait for managed VM to startup
-    echo "Waiting for VM to startup..."
-    attempts=0
-    while true; do
-        sleep 1
-  	port=`tail -1 ${outputfile}`
-  	if [ ! -z "$port" ]; then
-     	    # In case of errors wait time for output to be flushed
-     	    sleep 1
-     	    cat ${outputfile}
-     	    break
-	fi
-      attempts=`expr $attempts + 1`
-      echo "Waiting $attempts second(s) ..."
-    done
-
-    # Start the manager - this should connect to VM
-    sh -xc "$JAVA ${TESTVMOPTS} -classpath ${TESTCLASSES}:${TESTJAVA}/lib/tools.jar \
-        TestManager $pid $port"  2>&1
-    if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-}
-
-
-# Check we are run from jtreg
-if [ -z "${TESTCLASSES}" ]; then
-    echo "Test is designed to be run from jtreg only"
-    exit 0
-fi
-
-# For now this test passes silently on Windows - there are 2 reasons
-# to skip it :-
-#
-# 1. No jstat instrumentation buffers if FAT32 so need
-#    -XX:+PerfBypassFileSystemCheck 
-# 2. $! is used to get the pid of the created process but it's not
-#    reliable on older versions of MKS. Also negative pids are returned
-#    on Windows 98.
-
-os=`uname -s`
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
-    echo "Test not designed to run on this operating system, skipping..."
-    exit 0
-fi
-
-JAVA=${TESTJAVA}/bin/java
-CLASSPATH=${TESTCLASSES}
-export CLASSPATH
-
-failures=0
-
-# Test 1 
-doTest "-Dcom.sun.management.jmxremote" 
-
-# Test 2
-AGENT="${TESTJAVA}/jre/lib/management-agent.jar"
-if [ ! -f ${AGENT} ]; then
-  AGENT="${TESTJAVA}/lib/management-agent.jar"
-fi
-doTest "-javaagent:${AGENT}" 
-
-# Test 3 - no args (blank) - manager should attach and start agent
-doTest " " 
-
-# Test 4 - sanity check arguments to management-agent.jar
-echo ' '
-sh -xc "${JAVA} ${TESTVMOPTS} -javaagent:${AGENT}=com.sun.management.jmxremote.port=7775,\
-com.sun.management.jmxremote.authenticate=false,com.sun.management.jmxremote.ssl=false \
-  TestApplication -exit" 2>&1
-if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-
-# Test 5 - use DNS-only name service
-doTest "-Dsun.net.spi.namservice.provider.1=\"dns,sun\"" 
-
-#
-# Results
-#
-echo ''
-if [ $failures -gt 0 ];
-  then echo "$failures test(s) failed";
-  else echo "All test(s) passed"; fi
-exit $failures
-
--- a/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,15 @@
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.InputStream;
 import java.io.FilenameFilter;
 import java.io.IOException;
+import java.net.BindException;
+import java.net.ServerSocket;
+import java.rmi.server.ExportException;
 
 import java.util.Properties;
 import java.util.Iterator;
 import java.util.Set;
-import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
@@ -54,7 +55,7 @@
  * bootstrap & connection test will fail.</p>
  *
  * <p>The rmi port number can be specified with the "rmi.port" system property.
- * If not, this test will use 12424</p>
+ * If not, this test will use the first available port</p>
  *
  * <p>When called with some argument, the main() will interprete its args to
  * be Java M&M configuration file names. The filenames are expected to end
@@ -69,7 +70,8 @@
  * <p>Debug traces are logged in "sun.management.test"</p>
  **/
 public class RmiBootstrapTest {
-
+    // the number of consecutive ports to test for availability
+    private static final int PORT_TEST_LEN = 800;
     static TestLogger log =
         new TestLogger("RmiBootstrapTest");
 
@@ -78,6 +80,7 @@
      * to avoid falling into "port number already in use" problems.
      **/
     static int testPort = 0;
+    static int basePort = 0;
 
     /**
      * Default values for RMI configuration properties.
@@ -624,7 +627,7 @@
      * eventually cleans up by calling ConnectorBootstrap.terminate().
      * @return null if the test succeeds, an error message otherwise.
      **/
-    private String testConfiguration(File file,int port) {
+    private String testConfiguration(File file,int port) throws BindException {
 
         final String path;
         try {
@@ -644,7 +647,7 @@
         System.out.println("***");
 
         System.setProperty("com.sun.management.jmxremote.port",
-                           Integer.toString(port));
+                            Integer.toString(port));
         if (path != null)
             System.setProperty("com.sun.management.config.file", path);
         else
@@ -661,6 +664,11 @@
         try {
             cs = ConnectorBootstrap.initialize();
         } catch (AgentConfigurationError x) {
+            if (x.getCause() instanceof ExportException) {
+                if (x.getCause().getCause() instanceof BindException) {
+                    throw (BindException)x.getCause().getCause();
+                }
+            }
             final String err = "Failed to initialize connector:" +
                 "\n\tcom.sun.management.jmxremote.port=" + port +
                 ((path!=null)?"\n\tcom.sun.management.config.file="+path:
@@ -713,7 +721,15 @@
      * @return null if the test succeeds, an error message otherwise.
      **/
     private String testConfigurationKo(File conf,int port) {
-        final String errStr = testConfiguration(conf,port+testPort++);
+        String errStr = null;
+        for (int i = 0; i < PORT_TEST_LEN; i++) {
+            try {
+                errStr = testConfiguration(conf,port+testPort++);
+                break;
+            } catch (BindException e) {
+                // port conflict; try another port
+            }
+        }
         if (errStr == null) {
             return "Configuration " +
                 conf + " should have failed!";
@@ -733,11 +749,21 @@
      **/
     private String testConfigurationFile(String fileName) {
         File file = new File(fileName);
-        final String portStr = System.getProperty("rmi.port","12424");
-        final int port       = Integer.parseInt(portStr);
+        final String portStr = System.getProperty("rmi.port",null);
+        final int port       = portStr != null ?
+                                Integer.parseInt(portStr) : basePort;
 
         if (fileName.endsWith("ok.properties")) {
-            return testConfiguration(file,port+testPort++);
+            String errStr = null;
+            for (int i = 0; i < PORT_TEST_LEN; i++) {
+                try {
+                    errStr = testConfiguration(file,port+testPort++);
+                    return errStr;
+                } catch (BindException e) {
+                    // port conflict; try another port
+                }
+            }
+            return "Can not locate available port";
         }
         if (fileName.endsWith("ko.properties")) {
             return testConfigurationKo(file,port+testPort++);
@@ -752,8 +778,9 @@
      * @throws RuntimeException if the test fails.
      **/
     public void runko() {
-        final String portStr = System.getProperty("rmi.port","12424");
-        final int port       = Integer.parseInt(portStr);
+        final String portStr = System.getProperty("rmi.port",null);
+        final int port       = portStr != null ?
+                                Integer.parseInt(portStr) : basePort;
         final File[] conf = findConfigurationFilesKo();
         if ((conf == null)||(conf.length == 0))
             throw new RuntimeException("No configuration found");
@@ -774,15 +801,23 @@
      * @throws RuntimeException if the test fails.
      **/
     public void runok() {
-        final String portStr = System.getProperty("rmi.port","12424");
-        final int port       = Integer.parseInt(portStr);
+        final String portStr = System.getProperty("rmi.port",null);
+        final int port       = portStr != null ?
+                                Integer.parseInt(portStr) : basePort;
         final File[] conf = findConfigurationFilesOk();
         if ((conf == null)||(conf.length == 0))
             throw new RuntimeException("No configuration found");
 
-        String errStr;
+        String errStr = null;
         for (int i=0;i<conf.length;i++) {
-            errStr = testConfiguration(conf[i],port+testPort++);
+            for (int j = 0; j < PORT_TEST_LEN; i++) {
+                try {
+                    errStr = testConfiguration(conf[i],port+testPort++);
+                    break;
+                } catch (BindException e) {
+                    // port conflict; try another port
+                }
+            }
             if (errStr != null) {
                 throw new RuntimeException(errStr);
             }
@@ -835,7 +870,8 @@
      * Calls run(args[]).
      * exit(1) if the test fails.
      **/
-    public static void main(String args[]) {
+    public static void main(String args[]) throws Exception {
+        setupBasePort();
         RmiBootstrapTest manager = new RmiBootstrapTest();
         try {
             manager.run(args);
@@ -850,4 +886,9 @@
         System.out.println("**** Test  RmiBootstrap Passed ****");
     }
 
+    private static void setupBasePort() throws IOException {
+        try (ServerSocket s = new ServerSocket(0)) {
+            basePort = s.getLocalPort() + 1;
+        }
+    }
 }
--- a/test/sun/management/jmxremote/bootstrap/TestApplication.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/management/jmxremote/bootstrap/TestApplication.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 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
@@ -24,14 +24,18 @@
 /*
  *
  *
- * A test "application" used by unit test LocalManagementTest.sh. This
- * application binds to some random port, prints the port number to
- * standard output, waits for somebody to connect, and then shuts down.
+ * A test "application" used by unit tests -
+ *   LocalManagementTest.java, CustomLauncherTest.java.
+ * This application binds to some random port, prints its pid and
+ * the port number to standard output, waits for somebody to connect,
+ * and then shuts down.
  */
 import java.io.IOException;
 import java.net.ServerSocket;
 import java.net.Socket;
 
+import jdk.testlibrary.ProcessTools;
+
 public class TestApplication {
     public static void main(String[] args) throws IOException {
         // Some tests require the application to exit immediately
@@ -43,8 +47,17 @@
         ServerSocket ss = new ServerSocket(0);
         int port = ss.getLocalPort();
 
-        // signal test that we are started - do not remove this line!!
-        System.out.println(port);
+        int pid = -1;
+        try {
+            pid = ProcessTools.getProcessId();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        // signal test that we are started - do not remove these lines!!
+        System.out.println("port:" + port);
+        System.out.println("pid:" + pid);
+        System.out.println("waiting for the manager ...");
         System.out.flush();
 
         // wait for manager to connect
--- a/test/sun/management/jmxremote/bootstrap/TestManager.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/management/jmxremote/bootstrap/TestManager.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, 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
@@ -24,7 +24,8 @@
 /*
  *
  *
- * A test "management tool" used by unit test LocalManagementTest.sh.
+ * A test "management tool" used by unit tests -
+ *   LocalManagementTest.java, CustomLauncherTest.java
  *
  * Usage:    java TestManager <pid> <port>
  *
@@ -32,8 +33,6 @@
  * TCP port is used to shutdown the application.
  */
 import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
 import javax.management.remote.JMXServiceURL;
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXConnector;
@@ -43,7 +42,6 @@
 import java.net.InetSocketAddress;
 import java.io.File;
 import java.io.IOException;
-import java.util.Properties;
 
 // Sun specific
 import com.sun.tools.attach.VirtualMachine;
@@ -111,6 +109,8 @@
         "com.sun.management.jmxremote.localConnectorAddress";
     public static void main(String[] args) throws Exception {
         String pid = args[0]; // pid as a string
+        System.out.println("Starting TestManager for PID = " + pid);
+        System.out.flush();
         VirtualMachine vm = VirtualMachine.attach(pid);
 
         String agentPropLocalConnectorAddress = (String)
@@ -140,7 +140,6 @@
         System.out.println("Testing the connector address from jvmstat buffer");
         connect(pid, jvmstatLocalConnectorAddress);
 
-
         // Shutdown application
         int port = Integer.parseInt(args[1]);
         System.out.println("Shutdown process via TCP port: " + port);
Binary file test/sun/management/jmxremote/bootstrap/linux-amd64/launcher has changed
--- a/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -551,6 +551,11 @@
  esac 
 done
 
+if [ "${COMPILEJAVA}" = "" ]
+then 
+  COMPILEJAVA=${TESTJAVA}
+fi
+
 if [ ${_compile} = "yes" ]
 then
  _compile
--- a/test/sun/nio/cs/TestIBMBugs.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/nio/cs/TestIBMBugs.java	Wed Oct 30 18:38:20 2013 +0000
@@ -147,16 +147,17 @@
     }
 
     private static void bug6569191 () throws Exception {
-        byte[] bs = new byte[] { (byte)0x81, (byte)0xad,
-                                 (byte)0x81, (byte)0xae,
-                                 (byte)0x81, (byte)0xaf,
-                                 (byte)0x81, (byte)0xb0,
-                                 (byte)0x85, (byte)0x81,
-                                 (byte)0x85, (byte)0x87,
-                                 (byte)0x85, (byte)0xe0,
-                                 (byte)0x85, (byte)0xf0 };
+        byte[] bs = new byte[] { (byte)0x81, (byte)0xad,  // fffd ff6d
+                                 (byte)0x81, (byte)0xae,  // fffd ff6e
+                                 (byte)0x81, (byte)0xaf,  // fffd ff6f
+                                 (byte)0x81, (byte)0xb0,  // fffd ff70
+                                 (byte)0x85, (byte)0x81,  // fffd ->
+                                 (byte)0x85, (byte)0x87,  // 2266 ->
+                                 (byte)0x85, (byte)0xe0,  // 32a4 ->
+                                 (byte)0x85, (byte)0xf0 };// 7165 fffd
         String s = new String(bs, "Cp943");
-        if (!"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"
+        // see DoubleByte for how the unmappables are handled
+        if (!"\ufffd\uff6d\ufffd\uff6e\ufffd\uff6f\ufffd\uff70\ufffd\u2266\u32a4\u7165\ufffd"
             .equals(s))
             throw new Exception("Cp943 failed");
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/nio/cs/TestUnmappable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8008386
+ * @summary (cs) Unmappable leading should be decoded to replacement.
+ *          Tests for Shift_JIS and MS932 decoding
+ * @run main TestUnmappable
+ */
+
+import java.nio.*;
+import java.nio.charset.*;
+
+public class TestUnmappable {
+    public static void main(String args[]) throws Exception {
+
+        // illegal leading character test
+        byte[][] inputBytes = {
+                               // Shift_JIS
+                               {(byte)0xce, (byte)0xa0, (byte)0xce, (byte)0x7a},
+                               // MS932
+                               {(byte)0x3c, (byte)0x21, (byte)0x2d, (byte)0x2d,
+                                (byte)0xe5, (byte)0xaf, (byte)0xbe, (byte)0xe5,
+                                (byte)0xbf, (byte)0x9c, (byte)0x2d, (byte)0x2d,
+                                (byte)0x3e, (byte)0xd,  (byte)0xa },
+                               {(byte)0x81, (byte)0xad},
+                               // PCK
+                               {(byte)0xef, (byte)0x90},
+                               {(byte)0x91, (byte)0xfd}
+                              };
+
+        String[] charsets = { "Shift_JIS", "MS932", "PCK" };
+        String[] expectedStrings = {
+                                    // Shift_JIS
+                                    "0xce 0x3f 0xce 0x7a ",
+                                    // MS932
+                                    "0x3c 0x21 0x2d 0x2d 0xe5 0xaf 0xbe 0xe5 0xbf " +
+                                    "0x3f 0x2d 0x2d 0x3e 0xd 0xa ",
+                                    "0x3f 0xad ",
+                                    // PCK
+                                    "0x3f 0x3f ",
+                                    "0x3f "};
+
+        for (int i = 0; i < charsets.length; i++) {
+            String ret = new String(inputBytes[i], charsets[i]);
+            String bString = getByteString(ret.getBytes(Charset.forName(charsets[i])));
+            if (expectedStrings[i].length() != bString.length()
+               || ! expectedStrings[i].equals(bString)){
+                throw new Exception("ByteToChar for " + charsets[i]
+                    + " does not work correctly.\n" +
+                    "Expected: " + expectedStrings[i] + "\n" +
+                    "Received: " + bString);
+            }
+        }
+    }
+
+    private static String getByteString(byte[] bytes) {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < bytes.length; i++) {
+            sb.append("0x" + Integer.toHexString((int)(bytes[i] & 0xFF)) + " ");
+        }
+        return sb.toString();
+    }
+}
--- a/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java	Wed Oct 30 18:38:20 2013 +0000
@@ -128,7 +128,7 @@
     {
         ExecutorService pool = Executors.newFixedThreadPool(numThreads);
         for (Path path : classes) {
-            ClassFileReader reader = ClassFileReader.newInstance(path.toFile());
+            ClassFileReader reader = ClassFileReader.newInstance(path);
             for (ClassFile cf : reader.getClassFiles()) {
                 String classFileName = cf.getName();
                 // for each ClassFile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/Reflection/GetCallerClassWithDepth.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,92 @@
+/*
+ * 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 8025799
+ * @summary sun.reflect.Reflection.getCallerClass(int)
+ * @run main GetCallerClassWithDepth
+ */
+
+public class GetCallerClassWithDepth {
+    public static void main(String[] args) throws Exception {
+        Class<?> c = Test.test();
+        assertEquals(c, GetCallerClassWithDepth.class);
+        Class<?> caller = Test.caller();
+        assertEquals(caller, GetCallerClassWithDepth.class);
+        Test.selfTest();
+
+        try {
+            sun.reflect.Reflection.getCallerClass(-1);
+            throw new RuntimeException("getCallerClass(-1) should fail");
+        } catch (Error e) {
+            System.out.println("Expected: " + e.getMessage());
+        }
+    }
+
+    public Class<?> getCallerClass() {
+        // 0: Reflection 1: getCallerClass 2: Test.test 3: main
+        return sun.reflect.Reflection.getCallerClass(3);
+    }
+
+    static void assertEquals(Class<?> c, Class<?> expected) {
+        if (c != expected) {
+            throw new RuntimeException("Incorrect caller: " + c);
+        }
+    }
+
+    static class Test {
+        // Returns the caller of this method
+        public static Class<?> test() {
+            return new GetCallerClassWithDepth().getCallerClass();
+        }
+
+        // Returns the caller of this method
+        public static Class<?> caller() {
+            // 0: Reflection 1: Test.caller 2: main
+            return sun.reflect.Reflection.getCallerClass(2);
+        }
+        public static void selfTest() {
+            // 0: Reflection 1: Test.selfTest
+            Class<?> c = sun.reflect.Reflection.getCallerClass(1);
+            assertEquals(c, Test.class);
+            Inner1.deep();
+        }
+
+        static class Inner1 {
+            static void deep() {
+                 deeper();
+            }
+            static void deeper() {
+                 Inner2.deepest();
+            }
+            static class Inner2 {
+                static void deepest() {
+                    // 0: Reflection 1: deepest 2: deeper 3: deep 4: Test.selfTest
+                    Class<?> c = sun.reflect.Reflection.getCallerClass(4);
+                    assertEquals(c, Test.class);
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/rmi/transport/proxy/DisableHttpDefaultValue.java	Wed Oct 30 18:38:20 2013 +0000
@@ -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 8023862
+ * @summary Verify that the default value of the java.rmi.server.disableHttp
+ *          has been changed from false to true.
+ * @compile -XDignore.symbol.file DisableHttpDefaultValue.java
+ *
+ * @run main/othervm                                     DisableHttpDefaultValue true
+ * @run main/othervm -Djava.rmi.server.disableHttp       DisableHttpDefaultValue false
+ * @run main/othervm -Djava.rmi.server.disableHttp=false DisableHttpDefaultValue false
+ * @run main/othervm -Djava.rmi.server.disableHttp=xyzzy DisableHttpDefaultValue false
+ * @run main/othervm -Djava.rmi.server.disableHttp=true  DisableHttpDefaultValue true
+ */
+
+import sun.rmi.transport.proxy.RMIMasterSocketFactory;
+
+public class DisableHttpDefaultValue {
+    /**
+     * Subclass RMIMasterSocketFactory to get access to
+     * protected field altFactoryList. This list has a
+     * zero size if proxying is disabled.
+     */
+    static class SocketFactory extends RMIMasterSocketFactory {
+        boolean proxyDisabled() {
+            return altFactoryList.size() == 0;
+        }
+    }
+
+    /**
+     * Takes a single arg, which is the expected boolean value of
+     * java.rmi.server.disableHttp.
+     */
+    public static void main(String[] args) throws Exception {
+        // Force there to be a proxy host, so that we are able to
+        // tell whether proxying is enabled or disabled.
+        System.setProperty("http.proxyHost", "proxy.example.com");
+
+        String propval = System.getProperty("java.rmi.server.disableHttp");
+        String propdisp = (propval == null) ? "null" : ("\"" + propval + "\"");
+        boolean expected = Boolean.parseBoolean(args[0]);
+        boolean actual = new SocketFactory().proxyDisabled();
+        System.out.printf("### prop=%s exp=%s act=%s%n", propdisp, expected, actual);
+        if (expected != actual)
+            throw new AssertionError();
+    }
+}
--- a/test/sun/security/pkcs12/PKCS12SameKeyId.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/pkcs12/PKCS12SameKeyId.java	Wed Oct 30 18:38:20 2013 +0000
@@ -60,7 +60,7 @@
         for (int i=0; i<SIZE; i++) {
             System.err.print(".");
             String cmd = "-keystore " + JKSFILE
-                    + " -storepass changeit -keypass changeit "
+                    + " -storepass changeit -keypass changeit -keyalg rsa "
                     + "-genkeypair -alias p" + i + " -dname CN=" + i;
             sun.security.tools.keytool.Main.main(cmd.split(" "));
         }
--- a/test/sun/security/tools/jarsigner/TimestampCheck.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/TimestampCheck.java	Wed Oct 30 18:38:20 2013 +0000
@@ -185,7 +185,7 @@
             DerOutputStream tstInfo2 = new DerOutputStream();
             tstInfo2.putOctetString(tstInfo.toByteArray());
 
-            Signature sig = Signature.getInstance("SHA1withDSA");
+            Signature sig = Signature.getInstance("SHA1withRSA");
             sig.initSign((PrivateKey)(ks.getKey(
                     alias, "changeit".toCharArray())));
             sig.update(tstInfo.toByteArray());
--- a/test/sun/security/tools/jarsigner/checkusage.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/checkusage.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -45,7 +45,7 @@
     ;;
 esac
 
-KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit"
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keyalg rsa"
 JAR=$TESTJAVA${FS}bin${FS}jar
 JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner"
 
--- a/test/sun/security/tools/jarsigner/collator.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/collator.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -47,7 +47,7 @@
 JFILE=collator.jar
 
 KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \
-        -keystore $KS"
+        -keyalg rsa -keystore $KS"
 JAR=$TESTJAVA${FS}bin${FS}jar
 JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner -keystore $KS -storepass changeit"
 
--- a/test/sun/security/tools/jarsigner/crl.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/crl.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -45,7 +45,7 @@
 
 KS=crl.jks
 
-KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS"
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS -keyalg rsa"
 
 rm $KS 2> /dev/null
 
--- a/test/sun/security/tools/jarsigner/jvindex.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/jvindex.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -47,7 +47,7 @@
 JFILE=jvindex.jar
 
 KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \
-        -keystore $KS"
+        -keystore $KS -keyalg rsa"
 JAR=$TESTJAVA${FS}bin${FS}jar
 JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner -keystore $KS -storepass changeit"
 
--- a/test/sun/security/tools/jarsigner/newsize7.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/newsize7.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -51,7 +51,7 @@
 
 KSFILE=ns7.jks
 
-KT="${TESTJAVA}${FS}bin${FS}keytool -keystore ns7.jks -storepass changeit -keypass changeit"
+KT="${TESTJAVA}${FS}bin${FS}keytool -keystore ns7.jks -storepass changeit -keypass changeit -keyalg rsa"
 JAR="${TESTJAVA}${FS}bin${FS}jar"
 JS="${TESTJAVA}${FS}bin${FS}jarsigner -keystore ns7.jks -storepass changeit"
 
--- a/test/sun/security/tools/jarsigner/onlymanifest.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/onlymanifest.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -46,7 +46,7 @@
 JFILE=onlymanifest.jar
 
 KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \
-        -keystore $KS"
+        -keystore $KS -keyalg rsa"
 JAR=$TESTJAVA${FS}bin${FS}jar
 JARSIGNER=$TESTJAVA${FS}bin${FS}jarsigner
 
--- a/test/sun/security/tools/jarsigner/passtype.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/passtype.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -45,7 +45,7 @@
 KS=pt.jks
 JFILE=pt.jar
 
-KT="$TESTJAVA${FS}bin${FS}keytool -keystore $KS -validity 300"
+KT="$TESTJAVA${FS}bin${FS}keytool -keystore $KS -validity 300 -keyalg rsa"
 JAR=$TESTJAVA${FS}bin${FS}jar
 JARSIGNER=$TESTJAVA${FS}bin${FS}jarsigner
 
--- a/test/sun/security/tools/jarsigner/samename.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/samename.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -47,7 +47,7 @@
 KS=samename.jks
 JFILE=em.jar
 
-KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS"
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS -keyalg rsa"
 JAR=$TESTJAVA${FS}bin${FS}jar
 JARSIGNER=$TESTJAVA${FS}bin${FS}jarsigner
 
--- a/test/sun/security/tools/jarsigner/ts.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/jarsigner/ts.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -53,7 +53,7 @@
 JAR="${TESTJAVA}${FS}bin${FS}jar"
 JAVA="${TESTJAVA}${FS}bin${FS}java"
 JAVAC="${TESTJAVA}${FS}bin${FS}javac"
-KT="${TESTJAVA}${FS}bin${FS}keytool -keystore tsks -storepass changeit -keypass changeit"
+KT="${TESTJAVA}${FS}bin${FS}keytool -keystore tsks -storepass changeit -keypass changeit -keyalg rsa"
 
 rm tsks
 echo Nothing > A
--- a/test/sun/security/tools/keytool/CloseFile.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/CloseFile.java	Wed Oct 30 18:38:20 2013 +0000
@@ -59,7 +59,7 @@
     }
 
     static void run(String s) throws Exception {
-        sun.security.tools.keytool.Main.main((s+" -debug").split(" "));
+        sun.security.tools.keytool.Main.main((s+" -debug -keyalg rsa").split(" "));
     }
     static void remove(String filename, boolean check) {
         new File(filename).delete();
--- a/test/sun/security/tools/keytool/ListKeychainStore.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/ListKeychainStore.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -71,6 +71,7 @@
         -storetype PKCS12 \
         -keystore $TEMPORARY_P12 \
         -storepass $PWD \
+        -keyalg rsa \
         -dname "CN=$i,OU=$i,O=$i,ST=$i,C=US" \
         -alias 7133495-$i
 
--- a/test/sun/security/tools/keytool/StartDateTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/StartDateTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -49,7 +49,7 @@
         new File("jks").delete();
 
         run("-keystore jks -storetype jks -storepass changeit -keypass changeit -alias me " +
-                "-genkeypair -dname CN=Haha -startdate +1y");
+                "-keyalg rsa -genkeypair -dname CN=Haha -startdate +1y");
         cal.setTime(getIssueDate());
         System.out.println(cal);
         if (cal.get(Calendar.YEAR) != year + 1) {
--- a/test/sun/security/tools/keytool/StorePasswords.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/StorePasswords.java	Wed Oct 30 18:38:20 2013 +0000
@@ -77,6 +77,8 @@
         }
         System.out.println("\nStored " + storeCount + " user passwords, " +
             "recovered " + recoverCount + " user passwords");
+
+        new File(KEYSTORE).delete();
     }
 
     private static int store() throws Exception {
@@ -144,7 +146,9 @@
 
         // Store the PKCS#12 keystore
         System.out.println("Storing PKCS#12 keystore to: " + KEYSTORE);
-        keystore.store(new FileOutputStream(KEYSTORE), KEYSTORE_PWD);
+        try (FileOutputStream out = new FileOutputStream(KEYSTORE)) {
+            keystore.store(out, KEYSTORE_PWD);
+        }
 
         return count;
     }
@@ -154,7 +158,9 @@
         // Load the PKCS#12 keystore
         KeyStore keystore = KeyStore.getInstance("PKCS12");
         System.out.println("\nLoading PKCS#12 keystore from: " + KEYSTORE);
-        keystore.load(new FileInputStream(KEYSTORE), KEYSTORE_PWD);
+        try (FileInputStream in = new FileInputStream(KEYSTORE)) {
+            keystore.load(in, KEYSTORE_PWD);
+        }
 
         SecretKey key;
         SecretKeyFactory factory;
--- a/test/sun/security/tools/keytool/UnknownAndUnparseable.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/UnknownAndUnparseable.java	Wed Oct 30 18:38:20 2013 +0000
@@ -43,7 +43,7 @@
         // Create a cert with an unknown extension: 1.2.3.4, and an invalid
         // KeyUsage extension
         String genkey = s
-                + "-genkeypair -alias a -dname CN=A -ext 1.2.3.4=1234 "
+                + "-genkeypair -alias a -dname CN=A -ext 1.2.3.4=1234 -keyalg rsa "
                 + "-ext " + PKIXExtensions.KeyUsage_Id.toString() + "=5678";
         sun.security.tools.keytool.Main.main(genkey.split(" "));
 
--- a/test/sun/security/tools/keytool/autotest.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/autotest.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -73,11 +73,13 @@
     if [ $B32 = true ]; then
         LIBNAME=`find_one \
             "/usr/lib/libsoftokn3.so" \
-            "/usr/lib/i386-linux-gnu/nss/libsoftokn3.so"`
+            "/usr/lib/i386-linux-gnu/nss/libsoftokn3.so" \
+            "/usr/lib/nss/libsoftokn3.so"`
     else
         LIBNAME=`find_one \
             "/usr/lib64/libsoftokn3.so" \
-            "/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so"`
+            "/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so" \
+            "/usr/lib/nss/libsoftokn3.so"`
     fi
     ;;
   * )
--- a/test/sun/security/tools/keytool/emptysubject.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/emptysubject.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -45,7 +45,7 @@
 esac
 
 KS=emptysubject.jks
-KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS"
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS -keyalg rsa"
 
 rm $KS
 
--- a/test/sun/security/tools/keytool/importreadall.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/importreadall.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -49,7 +49,7 @@
     ;;
 esac
 
-KEYTOOL="${TESTJAVA}${FS}bin${FS}keytool -keystore importreadall.jks -storepass changeit -keypass changeit"
+KEYTOOL="${TESTJAVA}${FS}bin${FS}keytool -keystore importreadall.jks -storepass changeit -keypass changeit -keyalg rsa"
 
 # In case the test is run twice in the same directory
 
--- a/test/sun/security/tools/keytool/p12importks.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/p12importks.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -50,7 +50,7 @@
 
 rm jks 2> /dev/null
 $KT -genkeypair -keystore jks -storetype jks -alias me -dname CN=Me \
-	-storepass pass1111 -keypass pass1111 || exit 11
+	-keyalg rsa -storepass pass1111 -keypass pass1111 || exit 11
 
 # Cannot only change storepass
 rm p12 2> /dev/null
@@ -85,7 +85,7 @@
 
 rm jks 2> /dev/null
 $KT -genkeypair -keystore jks -storetype jks -alias me -dname CN=Me \
-	-storepass pass1111 -keypass pass2222 || exit 21
+	-keyalg rsa -storepass pass1111 -keypass pass2222 || exit 21
 
 # Can use old keypass as new storepass so new storepass and keypass are same
 rm p12 2> /dev/null
--- a/test/sun/security/tools/keytool/readjar.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/readjar.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -46,7 +46,7 @@
 KS=readjar.jks
 rm $KS
 $TESTJAVA${FS}bin${FS}keytool ${TESTTOOLVMOPTS}  -storepass changeit -keypass changeit -keystore $KS \
-        -alias x -dname CN=X -genkeypair
+        -keyalg rsa -alias x -dname CN=X -genkeypair
 $COMPILEJAVA${FS}bin${FS}jar ${TESTTOOLVMOPTS} cvf readjar.jar $KS
 $COMPILEJAVA${FS}bin${FS}jarsigner ${TESTTOOLVMOPTS} -storepass changeit -keystore $KS readjar.jar x
 
--- a/test/sun/security/tools/keytool/selfissued.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/selfissued.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -45,7 +45,7 @@
 esac
 
 KS=selfsigned.jks
-KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS"
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS -keyalg rsa"
 
 rm $KS
 
--- a/test/sun/security/tools/keytool/trystore.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/keytool/trystore.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -43,7 +43,7 @@
 
 rm trystore.jks 2> /dev/null
 
-KEYTOOL="${TESTJAVA}${FS}bin${FS}keytool -storetype jks -keystore trystore.jks"
+KEYTOOL="${TESTJAVA}${FS}bin${FS}keytool -storetype jks -keystore trystore.jks -keyalg rsa"
 $KEYTOOL -genkeypair -alias a -dname CN=A -storepass changeit -keypass changeit
 $KEYTOOL -genkeypair -alias b -dname CN=B -storepass changeit -keypass changeit
 
--- a/test/sun/security/tools/policytool/Alias.html	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/policytool/Alias.html	Wed Oct 30 18:38:20 2013 +0000
@@ -23,12 +23,10 @@
 	Warning: Principal name 'myalias' specified without a Principal class.
 <li> Click on "OK"
 <li> Open the "File" menu, and "Save As"
-<li> Enter "p1" as the file name
-<li> Click on "OK"
-<li> Click on "OK" in the message window
+<li> Save using the file name "p1"
+<li> Click on "OK" in the status message window
 <li> Open the "File" menu and "Open Policy"
-<li> Enter "p1" as the file name
-<li> Click on "OK"
+<li> Open the file named "p1"
 <li> If the file opens successfully, the test passed.
      Otherwise, the test failed.
 </ol>
--- a/test/sun/security/tools/policytool/OpenPolicy.html	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/policytool/OpenPolicy.html	Wed Oct 30 18:38:20 2013 +0000
@@ -9,8 +9,9 @@
 
 First, policytool will be invoked.<br><br>
 
-On Windows, if PolicyTool tries to open the default Policy File<br>
-and it has the File separator character pointing the wrong way, like:<br><br>
+Pull down 'File' menu and select 'View Warning Log', which shows that
+the default Policy File is not found. On Windows, if the file name
+has the File separator character pointing the wrong way, like:<br><br>
 
 C:\windows/java.policy<br><br>
 
--- a/test/sun/security/tools/policytool/UpdatePermissions.html	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/tools/policytool/UpdatePermissions.html	Wed Oct 30 18:38:20 2013 +0000
@@ -12,6 +12,7 @@
 Then, follow these steps:<br>
 0) Find (or create) a temporary directory that you have write access to.
 (Example: 'C:\foo\tmp' on Windows or '/tmp' on other systems)<br><br>
+
 1) Click on the "Add Policy Entry" button in the
 main policytool window.<br><br>
 
@@ -31,7 +32,7 @@
 select "Save As".<br><br>
 
 8) In the SaveAs window, enter "/tmp/ptool.test" as the file name
-and click "OK".<br>
+and save it. If the file already exists, just replace it.<br>
 (Or use the temporary directory mentioned in Step 0 if it's not '/tmp'.
 For example, "C:\foo\tmp\ptool.test" on Windows)<br><br>
 
--- a/test/sun/security/validator/certreplace.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/validator/certreplace.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -48,7 +48,7 @@
 esac
 
 KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit \
-    -keypass changeit -keystore certreplace.jks"
+    -keypass changeit -keystore certreplace.jks -keyalg rsa"
 JAVAC=$COMPILEJAVA${FS}bin${FS}javac
 JAVA=$TESTJAVA${FS}bin${FS}java
 
--- a/test/sun/security/validator/samedn.sh	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/security/validator/samedn.sh	Wed Oct 30 18:38:20 2013 +0000
@@ -48,7 +48,7 @@
 esac
 
 KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit \
-    -keypass changeit -keystore samedn.jks"
+    -keypass changeit -keystore samedn.jks -keyalg rsa"
 JAVAC=$COMPILEJAVA${FS}bin${FS}javac
 JAVA=$TESTJAVA${FS}bin${FS}java
 
--- a/test/sun/text/resources/LocaleData	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/text/resources/LocaleData	Wed Oct 30 18:38:20 2013 +0000
@@ -7681,3 +7681,9 @@
 
 # bug 8021121
 CurrencyNames/lv_LV/EUR=\u20AC
+
+# bug # 6192407
+LocaleNames/ko/PT=\ud3ec\ub974\ud22c\uce7c
+
+# bug 6931564
+LocaleNames/sv/ZA=Sydafrika
--- a/test/sun/text/resources/LocaleDataTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/text/resources/LocaleDataTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -35,7 +35,7 @@
  *      6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787
  *      6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
  *      7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
- *      7114053 7074882 7040556 8013836 8021121
+ *      7114053 7074882 7040556 8013836 8021121 6192407 6931564
  * @summary Verify locale data
  *
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/JstatGCUtilParser.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,156 @@
+/*
+ * 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.Arrays;
+
+import jdk.testlibrary.Utils;
+import static jdk.testlibrary.Asserts.*;
+
+/**
+ * The helper class for parsing following output from command 'jstat -gcutil':
+ *
+ *  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT
+ *  100.00   0.00  64.68  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *  100.00   0.00  76.54  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *  100.00   0.00  83.49  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *  100.00   0.00  84.53  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *  100.00   0.00  85.57  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *
+ *  It will be verified that numerical values have defined types and are reasonable,
+ *  for example percentage should fit within 0-100 interval.
+ */
+public class JstatGCUtilParser {
+
+    public enum GcStatisticsType {
+        INTEGER, DOUBLE, PERCENTAGE, PERCENTAGE_OR_DASH;
+    }
+
+    public enum GcStatistics {
+        S0(GcStatisticsType.PERCENTAGE),
+        S1(GcStatisticsType.PERCENTAGE),
+        E(GcStatisticsType.PERCENTAGE),
+        O(GcStatisticsType.PERCENTAGE),
+        M(GcStatisticsType.PERCENTAGE),
+        CCS(GcStatisticsType.PERCENTAGE_OR_DASH),
+        YGC(GcStatisticsType.INTEGER),
+        YGCT(GcStatisticsType.DOUBLE),
+        FGC(GcStatisticsType.INTEGER),
+        FGCT(GcStatisticsType.DOUBLE),
+        GCT(GcStatisticsType.DOUBLE);
+
+        private final GcStatisticsType type;
+
+        private GcStatistics(GcStatisticsType type) {
+            this.type = type;
+        }
+
+        private GcStatisticsType getType() {
+            return type;
+        }
+
+        public static boolean isHeadline(String... valueArray) {
+            if (valueArray.length != values().length) {
+                return false;
+            }
+            int headersCount = 0;
+            for (int i = 0; i < values().length; i++) {
+                if (valueArray[i].equals(values()[i].toString())) {
+                    headersCount++;
+                }
+            }
+            if (headersCount != values().length) {
+                return false;
+            }
+            return true;
+        }
+
+        private static void verifyLength(String... valueArray) throws Exception {
+            assertEquals(valueArray.length, values().length,
+                    "Invalid number of data columns: " + Arrays.toString(valueArray));
+        }
+
+        public static void verify(String... valueArray) throws Exception {
+            verifyLength(valueArray);
+            for (int i = 0; i < values().length; i++) {
+                GcStatisticsType type = values()[i].getType();
+                String value = valueArray[i].trim();
+                if (type.equals(GcStatisticsType.INTEGER)) {
+                    Integer.parseInt(value);
+                    break;
+                }
+                if (type.equals(GcStatisticsType.DOUBLE)) {
+                    Double.parseDouble(value);
+                    break;
+                }
+                if (type.equals(GcStatisticsType.PERCENTAGE_OR_DASH) &&
+                        value.equals("-")) {
+                    break;
+                }
+                double percentage = Double.parseDouble(value);
+                assertTrue(0 <= percentage && percentage <= 100,
+                        "Not a percentage: " + value);
+            }
+        }
+
+    }
+
+    private final String output;
+
+    public JstatGCUtilParser(String output) {
+        this.output = output;
+    }
+
+    public String getOutput() {
+        return output;
+    }
+
+    /**
+     * The function will discard any lines that come before the header line.
+     * This can happen if the JVM outputs a warning message for some reason
+     * before running jstat.
+     */
+    public void parse(int samples) throws Exception {
+        boolean headlineFound = false;
+        int datalineCount = 0;
+
+        String[] lines = output.split(Utils.NEW_LINE);
+        for (String line : lines) {
+            line = line.replaceAll("\\s+", " ").trim();
+            String[] valueArray = line.split(" ");
+
+            if (!headlineFound) {
+                headlineFound = GcStatistics.isHeadline(valueArray);
+                continue;
+            }
+
+            GcStatistics.verify(valueArray);
+            datalineCount++;
+        }
+
+        assertTrue(headlineFound, "No or invalid headline found, expected: " +
+                Utils.NEW_LINE + Arrays.toString(GcStatistics.values()).replaceAll(",", " "));
+        assertEquals(samples, datalineCount,
+                "Expected " + samples + " samples, got " + datalineCount);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/JstatdTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,356 @@
+/*
+ * 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.io.File;
+import java.net.UnknownHostException;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.Arrays;
+
+import static jdk.testlibrary.Asserts.*;
+import jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessThread;
+import jdk.testlibrary.TestThread;
+import jdk.testlibrary.Utils;
+
+/**
+ * The base class for tests of jstatd.
+ *
+ * The test sequence for TestJstatdDefaults for example is:
+ * <pre>
+ * {@code
+ * // start jstatd process
+ * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy
+ *
+ * // run jps and verify its output
+ * jps -J-XX:+UsePerfData hostname
+ *
+ * // run jstat and verify its output
+ * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname 250 5
+ *
+ * // stop jstatd process and verify that no unexpected exceptions have been thrown
+ * }
+ * </pre>
+ */
+public final class JstatdTest {
+
+    /**
+     * jstat gcutil option: takes JSTAT_GCUTIL_SAMPLES samples at
+     * JSTAT_GCUTIL_INTERVAL_MS millisecond intervals
+     */
+    private static final int JSTAT_GCUTIL_SAMPLES = 5;
+    private static final int JSTAT_GCUTIL_INTERVAL_MS = 250;
+    private static final String JPS_OUTPUT_REGEX = "^\\d+\\s*.*";
+
+    private boolean useDefaultPort = true;
+    private String port;
+    private String serverName;
+    private String jstatdPid;
+    private boolean withExternalRegistry = false;
+
+    public void setServerName(String serverName) {
+        this.serverName = serverName;
+    }
+
+    public void setUseDefaultPort(boolean useDefaultPort) {
+        this.useDefaultPort = useDefaultPort;
+    }
+
+    public void setWithExternalRegistry(boolean withExternalRegistry) {
+        this.withExternalRegistry = withExternalRegistry;
+    }
+
+    /**
+     * Parse pid from jps output
+     */
+    private String parsePid(String tool, OutputAnalyzer output) throws Exception {
+        String[] lines = output.getOutput().split(Utils.NEW_LINE);
+        String pid = null;
+        int count = 0;
+        String processName = tool;
+        if (tool == "rmiregistry") {
+            processName = "registryimpl";
+        }
+        for (String line : lines) {
+            if (line.toLowerCase().matches("^\\d+\\s{1}" + processName + "$")) {
+                pid = line.split(" ")[0];
+                count++;
+            }
+        }
+        if (count > 1) {
+            throw new Exception("Expected one " + tool
+                    + " process, got " + count + ". Test will be canceled.");
+        }
+
+        return pid;
+    }
+
+    private String getToolPid(String tool)
+            throws Exception {
+        OutputAnalyzer output = runJps();
+        return parsePid(tool, output);
+    }
+
+    private String waitOnTool(String tool, TestThread thread) throws Throwable {
+        while (true) {
+            String pid = getToolPid(tool);
+
+            if (pid != null) {
+                System.out.println(tool + " pid: " + pid);
+                return pid;
+            }
+
+            Throwable t = thread.getUncaught();
+            if (t != null) {
+                if (t.getMessage().contains(
+                        "java.rmi.server.ExportException: Port already in use")) {
+                    System.out.println("Port already in use. Trying to restart with a new one...");
+                    Thread.sleep(100);
+                    return null;
+                } else {
+                    // Something unexpected has happened
+                    throw new Throwable(t);
+                }
+            }
+
+            System.out.println("Waiting until " + tool + " is running...");
+            Thread.sleep(100);
+        }
+    }
+
+    private void log(String caption, String... cmd) {
+        System.out.println(Utils.NEW_LINE + caption + ":");
+        System.out.println(Arrays.toString(cmd).replace(",", ""));
+    }
+
+    private String getDestination() throws UnknownHostException {
+        String option = Utils.getHostname();
+        if (port != null) {
+            option += ":" + port;
+        }
+        if (serverName != null) {
+            option += "/" + serverName;
+        }
+        return option;
+    }
+
+    /**
+     * Depending on test settings command line can look like:
+     *
+     * jps -J-XX:+UsePerfData hostname
+     * jps -J-XX:+UsePerfData hostname:port
+     * jps -J-XX:+UsePerfData hostname/serverName
+     * jps -J-XX:+UsePerfData hostname:port/serverName
+     */
+    private OutputAnalyzer runJps() throws Exception {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jps");
+        launcher.addVMArg("-XX:+UsePerfData");
+        launcher.addToolArg(getDestination());
+
+        String[] cmd = launcher.getCommand();
+        log("Start jps", cmd);
+
+        ProcessBuilder processBuilder = new ProcessBuilder(cmd);
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        System.out.println(output.getOutput());
+
+        return output;
+    }
+
+    /**
+     * Verifies output form jps contains pids and programs' name information.
+     * The function will discard any lines that come before the first line with pid.
+     * This can happen if the JVM outputs a warning message for some reason
+     * before running jps.
+     *
+     * The output can look like:
+     * 35536 Jstatd
+     * 35417 Main
+     * 31103 org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
+     */
+    private void verifyJpsOutput(OutputAnalyzer output) throws Exception {
+        output.shouldHaveExitValue(0);
+        assertFalse(output.getOutput().isEmpty(), "Output should not be empty");
+
+        boolean foundFirstLineWithPid = false;
+        String[] lines = output.getOutput().split(Utils.NEW_LINE);
+        for (String line : lines) {
+            if (!foundFirstLineWithPid) {
+                foundFirstLineWithPid = line.matches(JPS_OUTPUT_REGEX);
+                continue;
+            }
+            assertTrue(line.matches(JPS_OUTPUT_REGEX),
+                    "Output does not match the pattern" + Utils.NEW_LINE + line);
+        }
+        assertTrue(foundFirstLineWithPid, "Invalid output");
+    }
+
+    /**
+     * Depending on test settings command line can look like:
+     *
+     * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname 250 5
+     * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname:port 250 5
+     * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname/serverName 250 5
+     * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname:port/serverName 250 5
+     */
+    private OutputAnalyzer runJstat() throws Exception {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstat");
+        launcher.addVMArg("-XX:+UsePerfData");
+        launcher.addVMArg("-Duser.language=en");
+        launcher.addToolArg("-gcutil");
+        launcher.addToolArg(jstatdPid + "@" + getDestination());
+        launcher.addToolArg(Integer.toString(JSTAT_GCUTIL_INTERVAL_MS));
+        launcher.addToolArg(Integer.toString(JSTAT_GCUTIL_SAMPLES));
+
+        String[] cmd = launcher.getCommand();
+        log("Start jstat", cmd);
+
+        ProcessBuilder processBuilder = new ProcessBuilder(cmd);
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        System.out.println(output.getOutput());
+
+        return output;
+    }
+
+    private void verifyJstatOutput(OutputAnalyzer output)
+            throws Exception {
+        output.shouldHaveExitValue(0);
+        assertFalse(output.getOutput().isEmpty(), "Output should not be empty");
+
+        JstatGCUtilParser gcUtilParser = new JstatGCUtilParser(
+                output.getOutput());
+        gcUtilParser.parse(JSTAT_GCUTIL_SAMPLES);
+    }
+
+    private void runToolsAndVerify() throws Exception {
+        OutputAnalyzer output = runJps();
+        verifyJpsOutput(output);
+
+        output = runJstat();
+        verifyJstatOutput(output);
+    }
+
+    private Registry startRegistry()
+            throws InterruptedException, RemoteException {
+        Registry registry = null;
+        try {
+            System.out.println("Start rmiregistry on port " + port);
+            registry = LocateRegistry
+                    .createRegistry(Integer.parseInt(port));
+        } catch (RemoteException e) {
+            if (e.getMessage().contains("Port already in use")) {
+                System.out.println("Port already in use. Trying to restart with a new one...");
+                Thread.sleep(100);
+                return null;
+            } else {
+                throw e;
+            }
+        }
+        return registry;
+    }
+
+    private void cleanUpThread(ProcessThread thread) throws Throwable {
+        if (thread != null) {
+            thread.stopProcess();
+            thread.joinAndThrow();
+        }
+    }
+
+    /**
+     * Depending on test settings command line can look like:
+     *
+     * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy
+     * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy -p port
+     * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy -n serverName
+     * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy -p port -n serverName
+     */
+    private String[] getJstatdCmd() throws UnknownHostException {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstatd");
+        launcher.addVMArg("-XX:+UsePerfData");
+        String testSrc = System.getProperty("test.src");
+        File policy = new File(testSrc, "all.policy");
+        launcher.addVMArg("-Djava.security.policy=" + policy.getAbsolutePath());
+        if (port != null) {
+            launcher.addToolArg("-p");
+            launcher.addToolArg(port);
+        }
+        if (serverName != null) {
+            launcher.addToolArg("-n");
+            launcher.addToolArg(serverName);
+        }
+
+        String[] cmd = launcher.getCommand();
+        log("Start jstatd", cmd);
+        return cmd;
+    }
+
+    private ProcessThread tryToSetupJstatdProcess() throws Throwable {
+        ProcessThread jstatdThread = new ProcessThread("Jstatd-Thread",
+                getJstatdCmd());
+        try {
+            jstatdThread.start();
+            // Make sure jstatd is up and running
+            jstatdPid = waitOnTool("jstatd", jstatdThread);
+            if (jstatdPid == null) {
+                // The port is already in use. Cancel and try with new one.
+                jstatdThread.stopProcess();
+                jstatdThread.join();
+                return null;
+            }
+        } catch (Throwable t) {
+            // Something went wrong in the product - clean up!
+            cleanUpThread(jstatdThread);
+            throw t;
+        }
+
+        return jstatdThread;
+    }
+
+    public void doTest() throws Throwable {
+        ProcessThread jstatdThread = null;
+        try {
+            while (jstatdThread == null) {
+                if (!useDefaultPort || withExternalRegistry) {
+                    port = Integer.toString(Utils.getFreePort());
+                }
+
+                if (withExternalRegistry) {
+                    Registry registry = startRegistry();
+                    if (registry == null) {
+                        // The port is already in use. Cancel and try with new one.
+                        continue;
+                    }
+                }
+
+                jstatdThread = tryToSetupJstatdProcess();
+            }
+
+            runToolsAndVerify();
+        } finally {
+            cleanUpThread(jstatdThread);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdDefaults.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4990825
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdDefaults
+ */
+public class TestJstatdDefaults {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdExternalRegistry.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,39 @@
+/*
+ * 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 4990825 7092186
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdExternalRegistry
+ */
+public class TestJstatdExternalRegistry {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.setWithExternalRegistry(true);
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdPort.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,39 @@
+/*
+ * 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 4990825
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdPort
+ */
+public class TestJstatdPort {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.setUseDefaultPort(false);
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdPortAndServer.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,40 @@
+/*
+ * 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 4990825
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdPortAndServer
+ */
+public class TestJstatdPortAndServer {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.setUseDefaultPort(false);
+        test.setServerName("TestJstatdServer");
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdServer.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,39 @@
+/*
+ * 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 4990825
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdServer
+ */
+public class TestJstatdServer {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.setServerName("TestJstatdServer");
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdUsage.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,51 @@
+/*
+ * 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 jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.OutputAnalyzer;
+
+/*
+ * @test
+ * @bug 4990825
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.JDKToolLauncher jdk.testlibrary.OutputAnalyzer
+ * @run main TestJstatdUsage
+ */
+public class TestJstatdUsage {
+
+    public static void main(String[] args) throws Exception {
+        testUsage("-help");
+        testUsage("-?");
+    }
+
+    private static void testUsage(String option) throws Exception {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstatd");
+        launcher.addToolArg(option);
+        ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand());
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+
+        output.shouldContain("usage: jstatd [-nr] [-p port] [-n rminame]");
+        output.shouldHaveExitValue(1);
+    }
+
+}
--- a/test/sun/tools/jstatd/jpsOutput1.awk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ [a-z|A-Z][a-z|A-Z|0-9|\$|\.]*$/	{
-	    matched++;
-	}
-
-/^[0-9]+ -- .*$/	{
-	    matched++;
-	}
-
-/^[0-9]+ $/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched == totallines)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jstatd/jstatGcutilOutput1.awk	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# matching the following output specified as a pattern that verifies
-# that the numerical values conform to a specific pattern, rather than
-# specific values.
-#
-#  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   
-#  0.00 100.00  56.99   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-#  0.00 100.00  63.64   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-#  0.00 100.00  64.68   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-#  0.00 100.00  65.73   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-#  0.00 100.00  67.22   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-
-BEGIN	{
-	    headerlines=0; datalines=0; totallines=0
-	}
-
-/^  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   $/	{
-	    headerlines++;
-	}
-
-/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/	{
-	    datalines++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((headerlines == 1) && (datalines == 5) && (totallines == 6)) {
-	        exit 0
-            }
-            else {
-	        exit 1
-            }
-	}
--- a/test/sun/tools/jstatd/jstatdDefaults.sh	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#
-# Copyright (c) 2004, 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 4990825
-# @run shell/timeout=60 jstatdDefaults.sh
-# @summary Test functionality of 'jstatd &'
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${JSTATD_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-JSTATD="${TESTJAVA}/bin/jstatd"
-JPS="${TESTJAVA}/bin/jps"
-JSTAT="${TESTJAVA}/bin/jstat"
-
-HOSTNAME=`uname -n`
-
-JSTATD_OUT="jstatd_$$.out"
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy 2>&1 > ${JSTATD_OUT} &
-JSTATD_PID=$!
-
-echo "jstatd started as pid ${JSTATD_PID}"
-sleep 3
-
-${JPS} -J-XX:+UsePerfData ${HOSTNAME} 2>&1 | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    cleanup
-    exit 1
-fi
-
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_PID}@${HOSTNAME} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-if [ -s ${JSTATD_OUT} ]
-then
-    echo "jstatd generated the following, unexpected output:"
-    RC=1
-fi
-
-cleanup
-
-exit ${RC}
--- a/test/sun/tools/jstatd/jstatdExternalRegistry.sh	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-#
-# Copyright (c) 2004, 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 4990825 7092186
-# @run shell/timeout=90 jstatdExternalRegistry.sh
-# @summary Test functionality of 'jstatd -p<port>&' with an external RMI registry
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${RMIREGISTRY_PID}
-  kill_proc ${JSTATD_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-RMIREGISTRY="${TESTJAVA}/bin/rmiregistry"
-JSTATD="${TESTJAVA}/bin/jstatd"
-JPS="${TESTJAVA}/bin/jps"
-JSTAT="${TESTJAVA}/bin/jstat"
-
-HOSTNAME=`uname -n`
-PORT=`freePort`
-if [ "${PORT}" = "0" ] ; then
-  echo "Cannot get free port"
-  exit 1
-fi
-
-RMIREGISTRY_OUT="rmiregistry_$$.out"
-JSTATD_OUT="jstatd_$$.out"
-
-${RMIREGISTRY} -J-XX:+UsePerfData ${PORT} > ${RMIREGISTRY_OUT} 2>&1 &
-RMIREGISTRY_PID=$!
-
-echo "rmiregistry started on port ${PORT} as pid ${RMIREGISTRY_PID}"
-sleep 3
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy -p ${PORT} > ${JSTATD_OUT} 2>&1 &
-JSTATD_PID=$!
-
-echo "jstatd started as pid ${JSTATD_PID}"
-sleep 3
-
-${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT} 2>&1 | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    exit 1
-fi
-
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_PID}@${HOSTNAME}:${PORT} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-if [ -s ${JSTATD_OUT} ]
-then
-    echo "jstatd generated unexpected output: see ${JSTATD_OUT}"
-    RC=1
-fi
-
-if [ -s ${RMIREGISTRY_OUT} ]
-then
-    echo "rmiregistry generated unexpected output: see ${RMIREGISTRY_OUT}"
-    RC=1
-fi
-
-exit ${RC}
--- a/test/sun/tools/jstatd/jstatdPort.sh	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-#
-# Copyright (c) 2004, 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 4990825
-# @run shell/timeout=60 jstatdPort.sh
-# @summary Test functionality of 'jstatd -p <port>&'
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${JSTATD_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-JSTATD="${TESTJAVA}/bin/jstatd"
-JPS="${TESTJAVA}/bin/jps"
-JSTAT="${TESTJAVA}/bin/jstat"
-
-HOSTNAME=`uname -n`
-PORT=`freePort`
-if [ "${PORT}" = "0" ] ; then
-  echo "Cannot get free port"
-  exit 1
-fi
-
-JSTATD_OUT="jstatd_$$.out"
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy -p ${PORT} 2>&1 > ${JSTATD_OUT} &
-JSTATD_PID=$!
-
-echo "jstatd started as pid ${JSTATD_PID} on port ${PORT}"
-sleep 3
-
-${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT} 2>&1 | tee jps.out | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    cleanup
-    exit 1
-fi
-
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_PID}@${HOSTNAME}:${PORT} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-if [ -s ${JSTATD_OUT} ]
-then
-    echo "jstatd generated the following, unexpected output:"
-    RC=1
-fi
-
-cleanup
-
-exit ${RC}
--- a/test/sun/tools/jstatd/jstatdServerName.sh	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-#
-# Copyright (c) 2004, 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 4990825
-# @run shell/timeout=90 jstatdServerName.sh
-# @summary Test functionality of 'jstatd -p <port> -n <servername>&'
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${JSTATD_1_PID}
-  kill_proc ${JSTATD_2_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-JSTATD="${TESTJAVA}/bin/jstatd"
-JPS="${TESTJAVA}/bin/jps"
-JSTAT="${TESTJAVA}/bin/jstat"
-
-HOSTNAME=`uname -n`
-PORT_1=`freePort`
-if [ "${PORT_1}" = "0" ] ; then
-  echo "ERROR: No free port"
-  exit 1
-fi
-PORT_2=`expr ${PORT_1} '+' 1`
-SERVERNAME="SecondJstatdServer"
-
-JSTATD_1_OUT="jstatd_$$_1.out"
-JSTATD_2_OUT="jstatd_$$_2.out"
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy -p ${PORT_1} 2>&1 > ${JSTATD_1_OUT} &
-JSTATD_1_PID=$!
-
-echo "first jstatd started as pid ${JSTATD_1_PID} on port ${PORT_1} with default server name"
-sleep 3
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy -p ${PORT_2} -n ${SERVERNAME} 2>&1 > ${JSTATD_2_OUT} &
-JSTATD_2_PID=$!
-
-echo "second jstatd started as pid ${JSTATD_2_PID} on port ${PORT_2} with name ${SERVERNAME}"
-sleep 3
-
-echo "running: ${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT_1}"
-${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT_1} 2>&1 | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    cleanup
-    exit 1
-fi
-
-echo "running: ${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT_2}/${SERVERNAME}"
-${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT_2}/${SERVERNAME} 2>&1 | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    cleanup
-    exit 1
-fi
-
-echo "running: ${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_1_PID}@${HOSTNAME}:${PORT_1} 250 5"
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_1_PID}@${HOSTNAME}:${PORT_1} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-echo "running: ${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_1_PID}@${HOSTNAME}:${PORT_2}/${SERVERNAME} 250 5"
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_1_PID}@${HOSTNAME}:${PORT_2}/${SERVERNAME} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-if [ -s ${JSTATD_1_OUT} ]
-then
-    echo "first jstatd generated the following, unexpected output:"
-    RC=1
-fi
-
-if [ -s ${JSTATD_2_OUT} ]
-then
-    echo "second jstatd generated the following, unexpected output:"
-    RC=1
-fi
-
-cleanup
-
-exit ${RC}
--- a/test/sun/tools/jstatd/jstatdUsage1.sh	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# @test
-# @bug 4990825
-# @run shell jstatdUsage1.sh
-# @summary Test that output of 'jstatd -help' matches the usage.out file
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-
-JSTATD="${TESTJAVA}/bin/jstatd"
-
-JSTATD_1_OUT="jstatd_$$_1.out"
-JSTATD_2_OUT="jstatd_$$_2.out"
-
-${JSTATD} -? > ${JSTATD_1_OUT} 2>&1
-
-diff -w ${JSTATD_1_OUT} ${TESTSRC}/usage.out
-if [ $? != 0 ]
-then
-  echo "Output of jstatd -? differs from expected output. Failed."
-  exit 1
-fi
-
-${JSTATD} -help > ${JSTATD_2_OUT} 2>&1
-
-diff -w ${JSTATD_2_OUT} ${TESTSRC}/usage.out
-if [ $? != 0 ]
-then
-  echo "Output of jstatd -help differs from expected output. Failed."
-  exit 1
-fi
-
-exit 0
--- a/test/sun/tools/jstatd/usage.out	Wed Oct 30 18:37:50 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-usage: jstatd [-nr] [-p port] [-n rminame]
--- a/test/sun/util/calendar/zi/tzdata/VERSION	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/VERSION	Wed Oct 30 18:38:20 2013 +0000
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2013d
+tzdata2013g
--- a/test/sun/util/calendar/zi/tzdata/africa	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/africa	Wed Oct 30 18:38:20 2013 +0000
@@ -881,13 +881,23 @@
 # transitions would be 2013-07-07 and 2013-08-10; see:
 # http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10
 
-# From Paul Eggert (2013-07-03):
+# From Steffen Thorsen (2013-09-28):
+# Morocco extends DST by one month, on very short notice, just 1 day
+# before it was going to end.  There is a new decree (2.13.781) for
+# this, where DST from now on goes from last Sunday of March at 02:00
+# to last Sunday of October at 03:00, similar to EU rules.  Official
+# source (French):
+# http://www.maroc.gov.ma/fr/actualites/lhoraire-dete-gmt1-maintenu-jusquau-27-octobre-2013
+# Another source (specifying the time for start and end in the decree):
+# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html
+
+# From Paul Eggert (2013-09-30):
 # To estimate what the Moroccan government will do in future years,
-# transition dates for 2014 through 2021 were determined by running
+# transition dates for 2014 through 2037 were determined by running
 # the following program under GNU Emacs 24.3:
 #
 # (let ((islamic-year 1435))
-#   (while (< islamic-year 1444)
+#   (while (< islamic-year 1460)
 #     (let ((a
 #	     (calendar-gregorian-from-absolute
 #	      (calendar-islamic-to-absolute (list 9 1 islamic-year))))
@@ -902,13 +912,14 @@
 #	  (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
 #     (setq islamic-year (+ 1 islamic-year))))
 #
-# with the results hand-edited for 2020-2022, when the normal spring-forward
-# date falls during the estimated Ramadan.
-#
-# From 2023 through 2038 Ramadan is not predicted to overlap with
-# daylight saving time.  Starting in 2039 there will be overlap again,
+# with spring-forward transitions removed for 2023-2025, when the
+# normal spring-forward date falls during the estimated Ramadan; with
+# all transitions removed for 2026-2035, where the estimated Ramadan
+# falls entirely outside daylight-saving time; and with fall-back
+# transitions removed for 2036-2037, where the normal fall-back
+# date falls during the estimated Ramadan.  Problems continue after that,
 # but 32-bit time_t values roll around in 2038 so for now do not worry
-# about dates after 2038.
+# about dates after 2037.
 
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 
@@ -935,12 +946,14 @@
 Rule	Morocco	2010	only	-	Aug	 8	 0:00	0	-
 Rule	Morocco	2011	only	-	Apr	 3	 0:00	1:00	S
 Rule	Morocco	2011	only	-	Jul	 31	 0	0	-
-Rule	Morocco	2012	2019	-	Apr	 lastSun 2:00	1:00	S
-Rule	Morocco	2012	max	-	Sep	 lastSun 3:00	0	-
+Rule	Morocco	2012	2013	-	Apr	 lastSun 2:00	1:00	S
+Rule	Morocco	2012	only	-	Sep	 30	 3:00	0	-
 Rule	Morocco	2012	only	-	Jul	 20	 3:00	0	-
 Rule	Morocco	2012	only	-	Aug	 20	 2:00	1:00	S
 Rule	Morocco	2013	only	-	Jul	  7	 3:00	0	-
 Rule	Morocco	2013	only	-	Aug	 10	 2:00	1:00	S
+Rule	Morocco	2013	2035	-	Oct	 lastSun 3:00	0	-
+Rule	Morocco	2014	2022	-	Mar	 lastSun 2:00	1:00	S
 Rule	Morocco	2014	only	-	Jun	 29	 3:00	0	-
 Rule	Morocco	2014	only	-	Jul	 29	 2:00	1:00	S
 Rule	Morocco	2015	only	-	Jun	 18	 3:00	0	-
@@ -953,10 +966,21 @@
 Rule	Morocco	2018	only	-	Jun	 15	 2:00	1:00	S
 Rule	Morocco	2019	only	-	May	  6	 3:00	0	-
 Rule	Morocco	2019	only	-	Jun	  5	 2:00	1:00	S
+Rule	Morocco	2020	only	-	Apr	 24	 3:00	0	-
 Rule	Morocco	2020	only	-	May	 24	 2:00	1:00	S
+Rule	Morocco	2021	only	-	Apr	 13	 3:00	0	-
 Rule	Morocco	2021	only	-	May	 13	 2:00	1:00	S
+Rule	Morocco	2022	only	-	Apr	  3	 3:00	0	-
 Rule	Morocco	2022	only	-	May	  3	 2:00	1:00	S
-Rule	Morocco	2023	max	-	Apr	 lastSun 2:00	1:00	S
+Rule	Morocco	2023	only	-	Apr	 22	 2:00	1:00	S
+Rule	Morocco	2024	only	-	Apr	 10	 2:00	1:00	S
+Rule	Morocco	2025	only	-	Mar	 31	 2:00	1:00	S
+Rule	Morocco	2026	max	-	Mar	 lastSun 2:00	1:00	S
+Rule	Morocco	2036	only	-	Oct	 21	 3:00	0	-
+Rule	Morocco	2037	only	-	Oct	 11	 3:00	0	-
+Rule	Morocco	2038	only	-	Sep	 30	 3:00	0	-
+Rule	Morocco	2038	only	-	Oct	 30	 2:00	1:00	S
+Rule	Morocco	2038	max	-	Oct	 lastSun 3:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
@@ -1123,9 +1147,7 @@
 			3:00	-	EAT
 
 # South Sudan
-Zone	Africa/Juba	2:06:24 -	LMT	1931
-			2:00	Sudan	CA%sT	2000 Jan 15 12:00
-			3:00	-	EAT
+Link Africa/Khartoum Africa/Juba
 
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--- a/test/sun/util/calendar/zi/tzdata/antarctica	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/antarctica	Wed Oct 30 18:38:20 2013 +0000
@@ -39,9 +39,9 @@
 #
 # Except for the French entries,
 # I made up all time zone abbreviations mentioned here; corrections welcome!
-# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
+# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited.
 
-# These rules are stolen from the `southamerica' file.
+# These rules are stolen from the 'southamerica' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	ArgAQ	1964	1966	-	Mar	 1	0:00	0	-
 Rule	ArgAQ	1964	1966	-	Oct	15	0:00	1:00	S
@@ -251,9 +251,10 @@
 # Scott Island (never inhabited)
 #
 # year-round base
-# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo.
+# Scott Base, Ross Island, since 1957-01.
+# See Pacific/Auckland.
 #
-# These rules for New Zealand are stolen from the `australasia' file.
+# These rules for New Zealand are stolen from the 'australasia' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NZAQ	1974	only	-	Nov	 3	2:00s	1:00	D
 Rule	NZAQ	1975	1988	-	Oct	lastSun	2:00s	1:00	D
@@ -291,11 +292,11 @@
 # From Lee Hotz (2001-03-08):
 # I queried the folks at Columbia who spent the summer at Vostok and this is
 # what they had to say about time there:
-# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo)
+# "in the US Camp (East Camp) we have been on New Zealand (McMurdo)
 # time, which is 12 hours ahead of GMT. The Russian Station Vostok was
 # 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead
 # of GMT). This is a time zone I think two hours east of Moscow. The
-# natural time zone is in between the two: 8 hours ahead of GMT.''
+# natural time zone is in between the two: 8 hours ahead of GMT."
 #
 # From Paul Eggert (2001-05-04):
 # This seems to be hopelessly confusing, so I asked Lee Hotz about it
@@ -360,16 +361,8 @@
 			-4:00	ChileAQ	CL%sT
 #
 #
-# McMurdo, Ross Island, since 1955-12
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Antarctica/McMurdo	0	-	zzz	1956
-			12:00	NZAQ	NZ%sT
-#
-# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20
-#
-# From Paul Eggert (1996-09-03):
-# Normally it wouldn't have a separate entry, since it's like the
-# larger Antarctica/McMurdo since 1970, but it's too famous to omit.
+# McMurdo Station, Ross Island, since 1955-12
+# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20
 #
 # From Chris Carrier (1996-06-27):
 # Siple, the first commander of the South Pole station,
@@ -391,4 +384,4 @@
 # we have to go around and set them back 5 minutes or so.
 # Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
 #
-Link	Antarctica/McMurdo	Antarctica/South_Pole
+# See 'australasia' for Antarctica/McMurdo.
--- a/test/sun/util/calendar/zi/tzdata/asia	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/asia	Wed Oct 30 18:38:20 2013 +0000
@@ -29,7 +29,7 @@
 # go ahead and edit the file (and please send any changes to
 # tz@iana.org for general use in the future).
 
-# From Paul Eggert (2013-02-21):
+# From Paul Eggert (2013-08-11):
 #
 # A good source for time zone historical data outside the U.S. is
 # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -67,11 +67,11 @@
 #	4:00 GST	Gulf*
 #	5:30 IST	India
 #	7:00 ICT	Indochina*
-#	7:00 WIT	west Indonesia
-#	8:00 CIT	central Indonesia
+#	7:00 WIB	west Indonesia (Waktu Indonesia Barat)
+#	8:00 WITA	central Indonesia (Waktu Indonesia Tengah)
 #	8:00 CST	China
 #	9:00 CJT	Central Japanese Time (1896/1937)*
-#	9:00 EIT	east Indonesia
+#	9:00 WIT	east Indonesia (Waktu Indonesia Timur)
 #	9:00 JST  JDT	Japan
 #	9:00 KST  KDT	Korea
 #	9:30 CST	(Australian) Central Standard Time
@@ -779,7 +779,7 @@
 			8:00	-	TLT	1942 Feb 21 23:00 # E Timor Time
 			9:00	-	JST	1945 Sep 23
 			9:00	-	TLT	1976 May  3
-			8:00	-	CIT	2000 Sep 17 00:00
+			8:00	-	WITA	2000 Sep 17 00:00
 			9:00	-	TLT
 
 # India
@@ -816,36 +816,53 @@
 # (Hollandia).  For now, assume all Indonesian locations other than Jayapura
 # switched on 1945-09-23.
 #
+# From Paul Eggert (2013-08-11):
+# Normally the tz database uses English-language abbreviations, but in
+# Indonesia it's typical to use Indonesian-language abbreviations even
+# when writing in English.  For example, see the English-language
+# summary published by the Time and Frequency Laboratory of the
+# Research Center for Calibration, Instrumentation and Metrology,
+# Indonesia, <http://time.kim.lipi.go.id/time-eng.php> (2006-09-29).
+# The abbreviations are:
+#
+# WIB  - UTC+7 - Waktu Indonesia Barat (Indonesia western time)
+# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time)
+# WIT  - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time)
+#
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+# Java, Sumatra
 Zone Asia/Jakarta	7:07:12 -	LMT	1867 Aug 10
 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13,
 # but this must be a typo.
-			7:07:12	-	JMT	1923 Dec 31 23:47:12 # Jakarta
+			7:07:12	-	BMT	1923 Dec 31 23:47:12 # Batavia
 			7:20	-	JAVT	1932 Nov	 # Java Time
-			7:30	-	WIT	1942 Mar 23
+			7:30	-	WIB	1942 Mar 23
 			9:00	-	JST	1945 Sep 23
-			7:30	-	WIT	1948 May
-			8:00	-	WIT	1950 May
-			7:30	-	WIT	1964
-			7:00	-	WIT
+			7:30	-	WIB	1948 May
+			8:00	-	WIB	1950 May
+			7:30	-	WIB	1964
+			7:00	-	WIB
+# west and central Borneo
 Zone Asia/Pontianak	7:17:20	-	LMT	1908 May
 			7:17:20	-	PMT	1932 Nov    # Pontianak MT
-			7:30	-	WIT	1942 Jan 29
+			7:30	-	WIB	1942 Jan 29
 			9:00	-	JST	1945 Sep 23
-			7:30	-	WIT	1948 May
-			8:00	-	WIT	1950 May
-			7:30	-	WIT	1964
-			8:00	-	CIT	1988 Jan  1
-			7:00	-	WIT
+			7:30	-	WIB	1948 May
+			8:00	-	WIB	1950 May
+			7:30	-	WIB	1964
+			8:00	-	WITA	1988 Jan  1
+			7:00	-	WIB
+# Sulawesi, Lesser Sundas, east and south Borneo
 Zone Asia/Makassar	7:57:36 -	LMT	1920
 			7:57:36	-	MMT	1932 Nov    # Macassar MT
-			8:00	-	CIT	1942 Feb  9
+			8:00	-	WITA	1942 Feb  9
 			9:00	-	JST	1945 Sep 23
-			8:00	-	CIT
+			8:00	-	WITA
+# Maluku Islands, West Papua, Papua
 Zone Asia/Jayapura	9:22:48 -	LMT	1932 Nov
-			9:00	-	EIT	1944 Sep  1
+			9:00	-	WIT	1944 Sep  1
 			9:30	-	CST	1964
-			9:00	-	EIT
+			9:00	-	WIT
 
 # Iran
 
@@ -1387,9 +1404,11 @@
 # until about the same time next year (at least).
 # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950
 #
-# From Paul Eggert (2012-10-25):
-# For now, assume this is just a one-year measure.  If it becomes
-# permanent, we should move Jordan from EET to AST effective tomorrow.
+# From Paul Eggert (2013-09-21):
+# It's looking like this change will be permanent; see
+# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20)
+# <http://www.albawaba.com/business/jordan-winter-electricity--472005>.
+# So move Jordan to UTC+3 as of the abovementioned date.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Jordan	1973	only	-	Jun	6	0:00	1:00	S
@@ -1415,15 +1434,15 @@
 Rule	Jordan	1999	only	-	Jul	 1	0:00s	1:00	S
 Rule	Jordan	1999	2002	-	Sep	lastFri	0:00s	0	-
 Rule	Jordan	2000	2001	-	Mar	lastThu	0:00s	1:00	S
-Rule	Jordan	2002	max	-	Mar	lastThu	24:00	1:00	S
+Rule	Jordan	2002	2012	-	Mar	lastThu	24:00	1:00	S
 Rule	Jordan	2003	only	-	Oct	24	0:00s	0	-
 Rule	Jordan	2004	only	-	Oct	15	0:00s	0	-
 Rule	Jordan	2005	only	-	Sep	lastFri	0:00s	0	-
-Rule	Jordan	2006	2011	-	Oct	lastFri	0:00s	0	-
-Rule	Jordan	2013	max	-	Oct	lastFri	0:00s	0	-
+Rule	Jordan	2006	2012	-	Oct	lastFri	0:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Amman	2:23:44 -	LMT	1931
-			2:00	Jordan	EE%sT
+			2:00	Jordan	EE%sT	2012 Oct 26 0:00s
+			3:00	-	AST
 
 
 # Kazakhstan
@@ -2303,9 +2322,18 @@
 # http://www.samanews.com/index.php?act=Show&id=154120
 # http://safa.ps/details/news/99844/%D8%B1%D8%A7%D9%85-%D8%A7%D9%84%D9%84%D9%87-%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-29-%D8%A7%D9%84%D8%AC%D8%A7%D8%B1%D9%8A.html
 
-# From Paul Eggert (2013-04-15):
+# From Steffen Thorsen (2013-09-24):
+# The Gaza and West Bank are ending DST Thursday at midnight
+# (2013-09-27 00:00:00) (one hour earlier than last year...).
+# This source in English, says "that winter time will go into effect
+# at midnight on Thursday in the West Bank and Gaza Strip":
+# http://english.wafa.ps/index.php?action=detail&id=23246
+# official source...:
+# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252
+
+# From Paul Eggert (2013-09-24):
 # For future dates, guess the last Thursday in March at 24:00 through
-# the first Friday on or after September 21 at 01:00.  This is consistent with
+# the first Friday on or after September 21 at 00:00.  This is consistent with
 # the predictions in today's editions of the following URLs,
 # which are for Gaza and Hebron respectively:
 # http://www.timeanddate.com/worldclock/timezone.html?n=702
@@ -2336,7 +2364,8 @@
 Rule Palestine	2011	only	-	Aug	30	0:00	1:00	S
 Rule Palestine	2011	only	-	Sep	30	0:00	0	-
 Rule Palestine	2012	max	-	Mar	lastThu	24:00	1:00	S
-Rule Palestine	2012	max	-	Sep	Fri>=21	1:00	0	-
+Rule Palestine	2012	only	-	Sep	21	1:00	0	-
+Rule Palestine	2013	max	-	Sep	Fri>=21	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
--- a/test/sun/util/calendar/zi/tzdata/australasia	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/australasia	Wed Oct 30 18:38:20 2013 +0000
@@ -375,16 +375,25 @@
 # today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st
 # October 2012 and end at 3 am on Sunday 20th January 2013.
 # http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
+
+# From the Fijian Government Media Center (2013-08-30) via David Wheeler:
+# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
+# on Sunday 19th January, 2014....  move clocks forward by one hour from 2am
+# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
 #
-# From Paul Eggert (2012-08-31):
-# For now, guess a pattern of the penultimate Sundays in October and January.
+# From Paul Eggert (2013-09-09):
+# For now, guess that Fiji springs forward the Sunday before the fourth
+# Monday in October.  This matches both recent practice and
+# timeanddate.com's current spring-forward prediction.
+# For the January 2014 transition we guessed right while timeanddate.com
+# guessed wrong, so leave the fall-back prediction alone.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
 Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
-Rule	Fiji	2010	max	-	Oct	Sun>=18	2:00	1:00	S
+Rule	Fiji	2010	max	-	Oct	Sun>=21	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
 Rule	Fiji	2012	max	-	Jan	Sun>=18	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -510,6 +519,7 @@
 Zone Pacific/Chatham	12:13:48 -	LMT	1957 Jan  1
 			12:45	Chatham	CHA%sT
 
+Link Pacific/Auckland Antarctica/McMurdo
 
 # Auckland Is
 # uninhabited; Maori and Moriori, colonial settlers, pastoralists, sealers,
@@ -759,7 +769,7 @@
 # 1886-1891; Baker was similar but exact dates are not known.
 # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944;
 # uninhabited thereafter.
-# Howland observed Hawaii Standard Time (UTC-10:30) in 1937;
+# Howland observed Hawaii Standard Time (UT-10:30) in 1937;
 # see page 206 of Elgen M. Long and Marie K. Long,
 # Amelia Earhart: the Mystery Solved, Simon & Schuster (2000).
 # So most likely Howland and Baker observed Hawaii Time from 1935
@@ -772,8 +782,17 @@
 # no information; was probably like Pacific/Kiritimati
 
 # Johnston
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Johnston	-10:00	-	HST
+#
+# From Paul Eggert (2013-09-03):
+# In his memoirs of June 6th to October 4, 1945
+# <http://www.315bw.org/Herb_Bach.htm> (2005), Herbert C. Bach writes,
+# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM
+# Johnston time, 1:30 AM Kwajalein time."  This was in June 1945, and
+# confirms that Johnston kept the same time as Honolulu in summer 1945.
+# We have no better information, so for now, assume this has been true
+# indefinitely into the past.
+#
+# See 'northamerica' for Pacific/Johnston.
 
 # Kingman
 # uninhabited
--- a/test/sun/util/calendar/zi/tzdata/backward	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/backward	Wed Oct 30 18:38:20 2013 +0000
@@ -45,15 +45,17 @@
 Link	America/Argentina/Mendoza	America/Mendoza
 Link	America/Rio_Branco	America/Porto_Acre
 Link	America/Argentina/Cordoba	America/Rosario
-Link	America/St_Thomas	America/Virgin
+Link	America/Denver		America/Shiprock
+Link	America/Port_of_Spain	America/Virgin
+Link	Pacific/Auckland	Antarctica/South_Pole
 Link	Asia/Ashgabat		Asia/Ashkhabad
+Link	Asia/Kolkata		Asia/Calcutta
 Link	Asia/Chongqing		Asia/Chungking
 Link	Asia/Dhaka		Asia/Dacca
 Link	Asia/Kathmandu		Asia/Katmandu
-Link	Asia/Kolkata		Asia/Calcutta
 Link	Asia/Macau		Asia/Macao
+Link	Asia/Ho_Chi_Minh	Asia/Saigon
 Link	Asia/Jerusalem		Asia/Tel_Aviv
-Link	Asia/Ho_Chi_Minh	Asia/Saigon
 Link	Asia/Thimphu		Asia/Thimbu
 Link	Asia/Makassar		Asia/Ujung_Pandang
 Link	Asia/Ulaanbaatar	Asia/Ulan_Bator
@@ -111,10 +113,10 @@
 Link	Pacific/Chatham		NZ-CHAT
 Link	America/Denver		Navajo
 Link	Asia/Shanghai		PRC
+Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Pacific/Pago_Pago	Pacific/Samoa
+Link	Pacific/Chuuk		Pacific/Truk
 Link	Pacific/Chuuk		Pacific/Yap
-Link	Pacific/Chuuk		Pacific/Truk
-Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Europe/Warsaw		Poland
 Link	Europe/Lisbon		Portugal
 Link	Asia/Taipei		ROC
--- a/test/sun/util/calendar/zi/tzdata/etcetera	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/etcetera	Wed Oct 30 18:38:20 2013 +0000
@@ -54,9 +54,9 @@
 # even though this is the opposite of what many people expect.
 # POSIX has positive signs west of Greenwich, but many people expect
 # positive signs east of Greenwich.  For example, TZ='Etc/GMT+4' uses
-# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC
+# the abbreviation "GMT+4" and corresponds to 4 hours behind UT
 # (i.e. west of Greenwich) even though many people would expect it to
-# mean 4 hours ahead of UTC (i.e. east of Greenwich).
+# mean 4 hours ahead of UT (i.e. east of Greenwich).
 #
 # In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
 # TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
--- a/test/sun/util/calendar/zi/tzdata/europe	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/europe	Wed Oct 30 18:38:20 2013 +0000
@@ -65,7 +65,7 @@
 #	</a> (1998-09-21, in Portuguese)
 
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #                   std dst  2dst
@@ -119,7 +119,7 @@
 # and a sketch map showing some of the sightlines involved. One paragraph
 # of the text said:
 #
-# `An old stone obelisk marking a forgotten terrestrial meridian stands
+# 'An old stone obelisk marking a forgotten terrestrial meridian stands
 # beside the river at Kew. In the 18th century, before time and longitude
 # was standardised by the Royal Observatory in Greenwich, scholars observed
 # this stone and the movement of stars from Kew Observatory nearby. They
@@ -163,7 +163,7 @@
 # From Paul Eggert (2003-09-27):
 # Summer Time was first seriously proposed by William Willett (1857-1915),
 # a London builder and member of the Royal Astronomical Society
-# who circulated a pamphlet ``The Waste of Daylight'' (1907)
+# who circulated a pamphlet "The Waste of Daylight" (1907)
 # that proposed advancing clocks 20 minutes on each of four Sundays in April,
 # and retarding them by the same amount on four Sundays in September.
 # A bill was drafted in 1909 and introduced in Parliament several times,
@@ -188,10 +188,10 @@
 #	</a>
 
 # From Paul Eggert (1996-09-03):
-# The OED Supplement says that the English originally said ``Daylight Saving''
+# The OED Supplement says that the English originally said "Daylight Saving"
 # when they were debating the adoption of DST in 1908; but by 1916 this
 # term appears only in quotes taken from DST's opponents, whereas the
-# proponents (who eventually won the argument) are quoted as using ``Summer''.
+# proponents (who eventually won the argument) are quoted as using "Summer".
 
 # From Arthur David Olson (1989-01-19):
 #
@@ -231,9 +231,9 @@
 # which could not be said to run counter to any official description.
 
 # From Paul Eggert (2000-10-02):
-# Howse writes (p 157) `DBST' too, but `BDST' seems to have been common
+# Howse writes (p 157) 'DBST' too, but 'BDST' seems to have been common
 # and follows the more usual convention of putting the location name first,
-# so we use `BDST'.
+# so we use 'BDST'.
 
 # Peter Ilieve (1998-04-19) described at length
 # the history of summer time legislation in the United Kingdom.
@@ -454,6 +454,8 @@
 Rule	GB-Eire 1990	1995	-	Oct	Sun>=22	1:00u	0	GMT
 # Summer Time Order 1997 (S.I. 1997/2982)
 # See EU for rules starting in 1996.
+#
+# Use Europe/London for Jersey, Guernsey, and the Isle of Man.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/London	-0:01:15 -	LMT	1847 Dec  1 0:00s
@@ -820,7 +822,7 @@
 			1:00	EU	CE%sT
 
 # Bosnia and Herzegovina
-# see Serbia
+# See Europe/Belgrade.
 
 # Bulgaria
 #
@@ -848,10 +850,10 @@
 			2:00	EU	EE%sT
 
 # Croatia
-# see Serbia
+# See Europe/Belgrade.
 
 # Cyprus
-# Please see the `asia' file for Asia/Nicosia.
+# Please see the 'asia' file for Asia/Nicosia.
 
 # Czech Republic
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -868,6 +870,7 @@
 			1:00	C-Eur	CE%sT	1944 Sep 17 2:00s
 			1:00	Czech	CE%sT	1979
 			1:00	EU	CE%sT
+# Use Europe/Prague also for Slovakia.
 
 # Denmark, Faroe Islands, and Greenland
 
@@ -1031,12 +1034,12 @@
 # From Peter Ilieve (1996-10-28):
 # [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s,
 # but a relative confirms that Estonia still switches at 02:00s, writing:]
-# ``I do not [know] exactly but there are some little different
+# "I do not [know] exactly but there are some little different
 # (confusing) rules for International Air and Railway Transport Schedules
 # conversion in Sunday connected with end of summer time in Estonia....
 # A discussion is running about the summer time efficiency and effect on
 # human physiology.  It seems that Estonia maybe will not change to
-# summer time next spring.''
+# summer time next spring."
 
 # From Peter Ilieve (1998-11-04), heavily edited:
 # <a href="http://trip.rk.ee/cgi-bin/thw?${BASE}=akt&${OOHTML}=rtd&TA=1998&TO=1&AN=1390">
@@ -1091,7 +1094,7 @@
 # Well, here in Helsinki we're just changing from summer time to regular one,
 # and it's supposed to change at 4am...
 
-# From Janne Snabb (2010-0715):
+# From Janne Snabb (2010-07-15):
 #
 # I noticed that the Finland data is not accurate for years 1981 and 1982.
 # During these two first trial years the DST adjustment was made one hour
@@ -1148,7 +1151,7 @@
 
 
 #
-# Shank & Pottenger seem to use `24:00' ambiguously; resolve it with Whitman.
+# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	France	1916	only	-	Jun	14	23:00s	1:00	S
 Rule	France	1916	1919	-	Oct	Sun>=1	23:00s	0	-
@@ -1438,7 +1441,7 @@
 # <a href="http://toi.iriti.cnr.it/uk/ienitlt.html">
 # Day-light Saving Time in Italy (2006-02-03)
 # </a>
-# (`FP' below), taken from an Italian National Electrotechnical Institute
+# ('FP' below), taken from an Italian National Electrotechnical Institute
 # publication. When the three sources disagree, guess who's right, as follows:
 #
 # year	FP	Shanks&P. (S)	Whitman (W)	Go with:
@@ -1584,10 +1587,22 @@
 			2:00	EU	EE%sT
 
 # Liechtenstein
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Europe/Vaduz	0:38:04 -	LMT	1894 Jun
-			1:00	-	CET	1981
-			1:00	EU	CE%sT
+
+# From Paul Eggert (2013-09-09):
+# Shanks & Pottenger say Vaduz is like Zurich.
+
+# From Alois Treindl (2013-09-18):
+# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf
+# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942.
+# I ... translate only the last two paragraphs:
+#    ... during second world war, in the years 1941 and 1942, Liechtenstein
+#    introduced daylight saving time, adapting to Switzerland.  From 1943 on
+#    central European time was in force throughout the year.
+#    From a report of the duke's government to the high council,
+#    regarding the introduction of a time law, of 31 May 1977.
+
+Link Europe/Zurich Europe/Vaduz
+
 
 # Lithuania
 
@@ -1675,7 +1690,7 @@
 			1:00	EU	CE%sT
 
 # Macedonia
-# see Serbia
+# See Europe/Belgrade.
 
 # Malta
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -1768,7 +1783,7 @@
 			1:00	EU	CE%sT
 
 # Montenegro
-# see Serbia
+# See Europe/Belgrade.
 
 # Netherlands
 
@@ -1883,7 +1898,7 @@
 # before 1895, and therefore probably changed the local time somewhere
 # between 1895 and 1925 (inclusive).
 
-# From Paul Eggert (2001-05-01):
+# From Paul Eggert (2013-09-04):
 #
 # Actually, Jan Mayen was never occupied by Germany during World War II,
 # so it must have diverged from Oslo time during the war, as Oslo was
@@ -1894,7 +1909,7 @@
 # 1941 with a small Norwegian garrison and continued operations despite
 # frequent air ttacks from Germans.  In 1943 the Americans established a
 # radiolocating station on the island, called "Atlantic City".  Possibly
-# the UTC offset changed during the war, but I think it unlikely that
+# the UT offset changed during the war, but I think it unlikely that
 # Jan Mayen used German daylight-saving rules.
 #
 # Svalbard is more complicated, as it was raided in August 1941 by an
@@ -1907,9 +1922,8 @@
 # the German armed forces at the Svalbard weather station code-named
 # Haudegen did not surrender to the Allies until September 1945.
 #
-# All these events predate our cutoff date of 1970.  Unless we can
-# come up with more definitive info about the timekeeping during the
-# war years it's probably best just do...the following for now:
+# All these events predate our cutoff date of 1970, so use Europe/Oslo
+# for these regions.
 Link	Europe/Oslo	Arctic/Longyearbyen
 
 # Poland
@@ -2167,7 +2181,7 @@
 # so we (Novosibirsk) simply did not switch.
 #
 # From Andrey A. Chernov (1996-10-04):
-# `MSK' and `MSD' were born and used initially on Moscow computers with
+# 'MSK' and 'MSD' were born and used initially on Moscow computers with
 # UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group)....
 # The next step was the UUCP network, the Relcom predecessor
 # (used mainly for mail), and MSK/MSD was actively used there.
@@ -2466,6 +2480,9 @@
 			11:00	Russia	ANA%sT	2011 Mar 27 2:00s
 			12:00	-	ANAT
 
+# San Marino
+# See Europe/Rome.
+
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Belgrade	1:22:00	-	LMT	1884
@@ -2488,7 +2505,7 @@
 Link Europe/Prague Europe/Bratislava
 
 # Slovenia
-# see Serbia
+# See Europe/Belgrade.
 
 # Spain
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -2622,7 +2639,7 @@
 # and their performance improved enormously.  Communities began to keep
 # mean time in preference to apparent time -- Geneva from 1780 ....
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# From Whitman (who writes ``Midnight?''):
+# From Whitman (who writes "Midnight?"):
 # Rule	Swiss	1940	only	-	Nov	 2	0:00	1:00	S
 # Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
 # From Shanks & Pottenger:
@@ -2667,23 +2684,53 @@
 # The 1940 rules must be deleted.
 #
 # One further detail for Switzerland, which is probably out of scope for
-# most users of tzdata:
-# The zone file
-# Zone    Europe/Zurich   0:34:08 -       LMT     1848 Sep 12
-#                          0:29:44 -       BMT     1894 Jun #Bern Mean Time
-#                          1:00    Swiss   CE%sT   1981
-#                          1:00    EU      CE%sT
+# most users of tzdata: The [Europe/Zurich zone] ...
 # describes all of Switzerland correctly, with the exception of
 # the Cantone Geneve (Geneva, Genf). Between 1848 and 1894 Geneve did not
 # follow Bern Mean Time but kept its own local mean time.
 # To represent this, an extra zone would be needed.
+#
+# From Alois Treindl (2013-09-11):
+# The Federal regulations say
+# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html
+# ... the meridian for Bern mean time ... is 7 degrees 26'22.50".
+# Expressed in time, it is 0h29m45.5s.
+
+# From Pierre-Yves Berger (2013-09-11):
+# the "Circulaire du conseil federal" (December 11 1893)
+# <http://www.amtsdruckschriften.bar.admin.ch/viewOrigDoc.do?id=10071353> ...
+# clearly states that the [1894-06-01] change should be done at midnight
+# but if no one is present after 11 at night, could be postponed until one
+# hour before the beginning of service.
+
+# From Paul Eggert (2013-09-11):
+# Round BMT to the nearest even second, 0:29:46.
+#
+# We can find no reliable source for Shanks's assertion that all of Switzerland
+# except Geneva switched to Bern Mean Time at 00:00 on 1848-09-12.  This book:
+#
+#	Jakob Messerli. Gleichmassig, punktlich, schnell: Zeiteinteilung und
+#	Zeitgebrauch in der Schweiz im 19. Jahrhundert. Chronos, Zurich 1995,
+#	ISBN 3-905311-68-2, OCLC 717570797.
+#
+# suggests that the transition was more gradual, and that the Swiss did not
+# agree about civil time during the transition.  The timekeeping it gives the
+# most detail for is postal and telegraph time: here, federal legislation (the
+# "Bundesgesetz uber die Erstellung von elektrischen Telegraphen") passed on
+# 1851-11-23, and an official implementation notice was published 1853-07-16
+# (Bundesblatt 1853, Bd. II, S. 859).  On p 72 Messerli writes that in
+# practice since July 1853 Bernese time was used in "all postal and telegraph
+# offices in Switzerland from Geneva to St. Gallen and Basel to Chiasso"
+# (Google translation).  For now, model this transition as occurring on
+# 1853-07-16, though it probably occurred at some other date in Zurich, and
+# legal civil time probably changed at still some other transition date.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Swiss	1941	1942	-	May	Mon>=1	1:00	1:00	S
 Rule	Swiss	1941	1942	-	Oct	Mon>=1	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Europe/Zurich	0:34:08 -	LMT	1848 Sep 12
-			0:29:44	-	BMT	1894 Jun # Bern Mean Time
+Zone	Europe/Zurich	0:34:08 -	LMT	1853 Jul 16 # See above comment.
+			0:29:46	-	BMT	1894 Jun # Bern Mean Time
 			1:00	Swiss	CE%sT	1981
 			1:00	EU	CE%sT
 
@@ -2907,7 +2954,7 @@
 # From Paul Eggert (2006-03-22):
 # The _Economist_ (1994-05-28, p 45) reports that central Crimea switched
 # from Kiev to Moscow time sometime after the January 1994 elections.
-# Shanks (1999) says ``date of change uncertain'', but implies that it happened
+# Shanks (1999) says "date of change uncertain", but implies that it happened
 # sometime between the 1994 DST switches.  Shanks & Pottenger simply say
 # 1994-09-25 03:00, but that can't be right.  For now, guess it
 # changed in May.
@@ -2921,6 +2968,9 @@
 			3:00	-	MSK	1997 Mar lastSun 1:00u
 			2:00	EU	EE%sT
 
+# Vatican City
+# See Europe/Rome.
+
 ###############################################################################
 
 # One source shows that Bulgaria, Cyprus, Finland, and Greece observe DST from
--- a/test/sun/util/calendar/zi/tzdata/iso3166.tab	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/iso3166.tab	Wed Oct 30 18:38:20 2013 +0000
@@ -32,7 +32,7 @@
 # 1.  ISO 3166-1 alpha-2 country code, current as of
 #     ISO 3166-1 Newsletter VI-15 (2013-05-10).  See: Updates on ISO 3166
 #   http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
-# 2.  The usual English name for the country,
+# 2.  The usual English name for the coded region,
 #     chosen so that alphabetic sorting of subsets produces helpful lists.
 #     This is not the same as the English name in the ISO 3166 tables.
 #
@@ -46,7 +46,7 @@
 # to take or endorse any position on legal or territorial claims.
 #
 #country-
-#code	country name
+#code	name of country, territory, area, or subdivision
 AD	Andorra
 AE	United Arab Emirates
 AF	Afghanistan
@@ -76,7 +76,7 @@
 BM	Bermuda
 BN	Brunei
 BO	Bolivia
-BQ	Bonaire, St Eustatius & Saba
+BQ	Caribbean Netherlands
 BR	Brazil
 BS	Bahamas
 BT	Bhutan
--- a/test/sun/util/calendar/zi/tzdata/leapseconds	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/leapseconds	Wed Oct 30 18:38:20 2013 +0000
@@ -20,18 +20,24 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#
-# <pre>
-# This file is in the public domain, so clarified as of
-# 2009-05-17 by Arthur David Olson.
 
 # Allowance for leapseconds added to each timezone file.
 
+# This file is in the public domain.
+
+# This file is generated automatically from the data in the public-domain
+# leap-seconds.list file available from most NIST time servers.
+# If the URL <ftp://time.nist.gov/pub/leap-seconds.list> does not work,
+# you should be able to pick up leap-seconds.list from a secondary NIST server.
+# For more about leap-seconds.list, please see
+# The NTP Timescale and Leap Seconds
+# <http://www.eecis.udel.edu/~mills/leap.html>.
+
 # The International Earth Rotation Service periodically uses leap seconds
 # to keep UTC to within 0.9 s of UT1
 # (which measures the true angular orientation of the earth in space); see
 # Terry J Quinn, The BIPM and the accurate measure of time,
-# Proc IEEE 79, 7 (July 1991), 894-905.
+# Proc IEEE 79, 7 (July 1991), 894-905 <http://dx.doi.org/10.1109/5.84965>.
 # There were no leap seconds before 1972, because the official mechanism
 # accounting for the discrepancy between atomic time and the earth's rotation
 # did not exist until the early 1970s.
@@ -42,8 +48,8 @@
 # or
 #	Leap	YEAR	MON	DAY	23:59:59	-	R/S
 
-# If the leapsecond is Rolling (R) the given time is local time
-# If the leapsecond is Stationary (S) the given time is UTC
+# If the leapsecond is Rolling (R) the given time is local time.
+# If the leapsecond is Stationary (S) the given time is UTC.
 
 # Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
 Leap	1972	Jun	30	23:59:60	+	S
@@ -71,53 +77,3 @@
 Leap	2005	Dec	31	23:59:60	+	S
 Leap	2008	Dec	31	23:59:60	+	S
 Leap	2012	Jun	30	23:59:60	+	S
-
-# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
-#
-# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
-#
-#
-# SERVICE DE LA ROTATION TERRESTRE
-# OBSERVATOIRE DE PARIS
-# 61, Av. de l'Observatoire 75014 PARIS (France)
-# Tel.      : 33 (0) 1 40 51 22 26
-# FAX       : 33 (0) 1 40 51 22 91
-# e-mail    : (E-Mail Removed)
-# http://hpiers.obspm.fr/eop-pc
-#
-# Paris, 5 January 2012
-#
-#
-# Bulletin C 43
-#
-# To authorities responsible
-# for the measurement and
-# distribution of time
-#
-#
-# UTC TIME STEP
-# on the 1st of July 2012
-#
-#
-# A positive leap second will be introduced at the end of June 2012.
-# The sequence of dates of the UTC second markers will be:
-#
-#                          2012 June 30,     23h 59m 59s
-#                          2012 June 30,     23h 59m 60s
-#                          2012 July  1,      0h  0m  0s
-#
-# The difference between UTC and the International Atomic Time TAI is:
-#
-# from 2009 January 1, 0h UTC, to 2012 July 1  0h UTC  : UTC-TAI = - 34s
-# from 2012 July 1,    0h UTC, until further notice    : UTC-TAI = - 35s
-#
-# Leap seconds can be introduced in UTC at the end of the months of December
-# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
-# six months, either to announce a time step in UTC or to confirm that there
-# will be no time step at the next possible date.
-#
-#
-# Daniel GAMBIS
-# Head
-# Earth Orientation Center of IERS
-# Observatoire de Paris, France
--- a/test/sun/util/calendar/zi/tzdata/northamerica	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/northamerica	Wed Oct 30 18:38:20 2013 +0000
@@ -43,7 +43,7 @@
 # Howse writes (pp 121-125) that time zones were invented by
 # Professor Charles Ferdinand Dowd (1825-1904),
 # Principal of Temple Grove Ladies' Seminary (Saratoga Springs, NY).
-# His pamphlet ``A System of National Time for Railroads'' (1870)
+# His pamphlet "A System of National Time for Railroads" (1870)
 # was the result of his proposals at the Convention of Railroad Trunk Lines
 # in New York City (1869-10).  His 1870 proposal was based on Washington, DC,
 # but in 1872-05 he moved the proposed origin to Greenwich.
@@ -63,8 +63,8 @@
 
 # From Paul Eggert (2001-03-06):
 # Daylight Saving Time was first suggested as a joke by Benjamin Franklin
-# in his whimsical essay ``An Economical Project for Diminishing the Cost
-# of Light'' published in the Journal de Paris (1784-04-26).
+# in his whimsical essay "An Economical Project for Diminishing the Cost
+# of Light" published in the Journal de Paris (1784-04-26).
 # Not everyone is happy with the results:
 #
 #	I don't really care how time is reckoned so long as there is some
@@ -190,8 +190,8 @@
 #    of the Aleutian islands.   No DST.
 
 # From Paul Eggert (1995-12-19):
-# The tables below use `NST', not `NT', for Nome Standard Time.
-# I invented `CAWT' for Central Alaska War Time.
+# The tables below use 'NST', not 'NT', for Nome Standard Time.
+# I invented 'CAWT' for Central Alaska War Time.
 
 # From U. S. Naval Observatory (1989-01-19):
 # USA  EASTERN       5 H  BEHIND UTC    NEW YORK, WASHINGTON
@@ -260,9 +260,9 @@
 # H.R. 6, Energy Policy Act of 2005, SEC. 110. DAYLIGHT SAVINGS.
 #   (a) Amendment- Section 3(a) of the Uniform Time Act of 1966 (15
 #   U.S.C. 260a(a)) is amended--
-#     (1) by striking `first Sunday of April' and inserting `second
+#     (1) by striking 'first Sunday of April' and inserting 'second
 #     Sunday of March'; and
-#     (2) by striking `last Sunday of October' and inserting `first
+#     (2) by striking 'last Sunday of October' and inserting 'first
 #     Sunday of November'.
 #   (b) Effective Date- Subsection (a) shall take effect 1 year after the
 #   date of enactment of this Act or March 1, 2007, whichever is later.
@@ -623,6 +623,8 @@
 			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
+Link Pacific/Honolulu Pacific/Johnston
+
 # Now we turn to US areas that have diverged from the consensus since 1970.
 
 # Arizona mostly uses MST.
@@ -659,8 +661,9 @@
 # Navajo Nation participates in the Daylight Saving Time policy, due to its
 # large size and location in three states."  (The "only" means that other
 # tribal nations don't use DST.)
-
-Link America/Denver America/Shiprock
+#
+# From Paul Eggert (2013-08-26):
+# See America/Denver for a zone appropriate for the Navajo Nation.
 
 # Southern Idaho (Ada, Adams, Bannock, Bear Lake, Bingham, Blaine,
 # Boise, Bonneville, Butte, Camas, Canyon, Caribou, Cassia, Clark,
@@ -700,13 +703,13 @@
 #   and Switzerland counties have their own time zone histories as noted below.
 #
 # Shanks partitioned Indiana into 345 regions, each with its own time history,
-# and wrote ``Even newspaper reports present contradictory information.''
+# and wrote "Even newspaper reports present contradictory information."
 # Those Hoosiers!  Such a flighty and changeable people!
 # Fortunately, most of the complexity occurred before our cutoff date of 1970.
 #
 # Other than Indianapolis, the Indiana place names are so nondescript
-# that they would be ambiguous if we left them at the `America' level.
-# So we reluctantly put them all in a subdirectory `America/Indiana'.
+# that they would be ambiguous if we left them at the 'America' level.
+# So we reluctantly put them all in a subdirectory 'America/Indiana'.
 
 # From Paul Eggert (2005-08-16):
 # http://www.mccsc.edu/time.html says that Indiana will use DST starting 2006.
@@ -970,8 +973,8 @@
 # This story is too entertaining to be false, so go with Howse over Shanks.
 #
 # From Paul Eggert (2001-03-06):
-# Garland (1927) writes ``Cleveland and Detroit advanced their clocks
-# one hour in 1914.''  This change is not in Shanks.  We have no more
+# Garland (1927) writes "Cleveland and Detroit advanced their clocks
+# one hour in 1914."  This change is not in Shanks.  We have no more
 # info, so omit this for now.
 #
 # Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
@@ -1011,7 +1014,7 @@
 # occupied 1857/1900 by the Navassa Phosphate Co
 # US lighthouse 1917/1996-09
 # currently uninhabited
-# see Mark Fineman, ``An Isle Rich in Guano and Discord'',
+# see Mark Fineman, "An Isle Rich in Guano and Discord",
 # _Los Angeles Times_ (1998-11-10), A1, A10; it cites
 # Jimmy Skaggs, _The Great Guano Rush_ (1994).
 
@@ -1045,7 +1048,7 @@
 #	Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
 #	<http://www.jstor.org/stable/1774359>.
 #
-# See the `europe' file for Greenland.
+# See the 'europe' file for Greenland.
 
 # Canada
 
@@ -1246,7 +1249,7 @@
 
 # most of east Labrador
 
-# The name `Happy Valley-Goose Bay' is too long; use `Goose Bay'.
+# The name 'Happy Valley-Goose Bay' is too long; use 'Goose Bay'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Goose_Bay	-4:01:40 -	LMT	1884 # Happy Valley-Goose Bay
 			-3:30:52 -	NST	1918
@@ -1363,25 +1366,27 @@
 
 # Quebec
 
-# From Paul Eggert (2006-07-09):
-# Shanks & Pottenger write that since 1970 most of Quebec has been
-# like Montreal.
+# From Paul Eggert (2013-08-30):
+# Since 1970 most of Quebec has been like Toronto.
+# However, because earlier versions of the tz database mistakenly relied on data
+# from Shanks & Pottenger saying that Quebec differed from Ontario after 1970,
+# a separate entry was created for most of Quebec.  We're loath to lose
+# its pre-1970 info, even though the tz database is normally limited to
+# zones that differ after 1970, so keep this otherwise out-of-scope entry.
 
-# From Paul Eggert (2006-06-27):
 # Matthews and Vincent (1998) also write that Quebec east of the -63
 # meridian is supposed to observe AST, but residents as far east as
 # Natashquan use EST/EDT, and residents east of Natashquan use AST.
-# In "Official time in Quebec" the Quebec department of justice writes in
-# http://www.justice.gouv.qc.ca/english/publications/generale/temps-regl-1-a.htm
-# that "The residents of the Municipality of the
-# Cote-Nord-du-Golfe-Saint-Laurent and the municipalities of Saint-Augustin,
-# Bonne-Esperance and Blanc-Sablon apply the Official Time Act as it is
-# written and use Atlantic standard time all year round. The same applies to
-# the residents of the Native facilities along the lower North Shore."
-# <http://www.assnat.qc.ca/eng/37legislature2/Projets-loi/Publics/06-a002.htm>
+# The Quebec department of justice writes in
+# "The situation in Minganie and Basse-Cote-Nord"
+# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm
+# that the coastal strip from just east of Natashquan to Blanc-Sablon
+# observes Atlantic standard time all year round.
+# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
 # says this common practice was codified into law as of 2007.
 # For lack of better info, guess this practice began around 1970, contra to
 # Shanks & Pottenger who have this region observing AST/ADT.
+# for post-1970 data America/Puerto_Rico.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mont	1917	only	-	Mar	25	2:00	1:00	D
@@ -1425,7 +1430,6 @@
 			-5:00	Mont	E%sT	1974
 			-5:00	Canada	E%sT
 
-
 # Ontario
 
 # From Paul Eggert (2006-07-09):
@@ -1644,7 +1648,7 @@
 			-6:00	-	CST	1910
 			-5:00	-	EST	1942
 			-5:00	Canada	E%sT	1970
-			-5:00	Mont	E%sT	1973
+			-5:00	Toronto	E%sT	1973
 			-5:00	-	EST	1974
 			-5:00	Canada	E%sT
 Zone America/Nipigon	-5:53:04 -	LMT	1895
@@ -2231,7 +2235,7 @@
 # From Paul Eggert (1996-06-12):
 # For an English translation of the decree, see
 # <a href="http://mexico-travel.com/extra/timezone_eng.html">
-# ``Diario Oficial: Time Zone Changeover'' (1996-01-04).
+# "Diario Oficial: Time Zone Changeover" (1996-01-04).
 # </a>
 
 # From Rives McDow (1998-10-08):
@@ -2568,9 +2572,7 @@
 ###############################################################################
 
 # Anguilla
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Anguilla	-4:12:16 -	LMT	1912 Mar 2
-			-4:00	-	AST
+# See 'southamerica'.
 
 # Antigua and Barbuda
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -2639,13 +2641,13 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Atlantic/Bermuda	-4:19:18 -	LMT	1930 Jan  1 2:00    # Hamilton
 			-4:00	-	AST	1974 Apr 28 2:00
-			-4:00	Bahamas	A%sT	1976
+			-4:00	Canada	A%sT	1976
 			-4:00	US	A%sT
 
 # Cayman Is
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Cayman	-5:25:32 -	LMT	1890		# Georgetown
-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
 			-5:00	-	EST
 
 # Costa Rica
@@ -2660,7 +2662,7 @@
 # go with Shanks & Pottenger.
 Rule	CR	1991	only	-	Jul	 1	0:00	0	S
 Rule	CR	1992	only	-	Mar	15	0:00	0	S
-# There are too many San Joses elsewhere, so we'll use `Costa Rica'.
+# There are too many San Joses elsewhere, so we'll use 'Costa Rica'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Costa_Rica	-5:36:13 -	LMT	1890		# San Jose
 			-5:36:13 -	SJMT	1921 Jan 15 # San Jose Mean Time
@@ -2892,9 +2894,7 @@
 			-5:00	Cuba	C%sT
 
 # Dominica
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Dominica	-4:05:36 -	LMT	1911 Jul 1 0:01		# Roseau
-			-4:00	-	AST
+# See 'southamerica'.
 
 # Dominican Republic
 
@@ -2943,18 +2943,10 @@
 			-6:00	Salv	C%sT
 
 # Grenada
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	America/Grenada	-4:07:00 -	LMT	1911 Jul	# St George's
-			-4:00	-	AST
-
 # Guadeloupe
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Guadeloupe	-4:06:08 -	LMT	1911 Jun 8	# Pointe a Pitre
-			-4:00	-	AST
 # St Barthelemy
-Link America/Guadeloupe	America/St_Barthelemy
 # St Martin (French part)
-Link America/Guadeloupe	America/Marigot
+# See 'southamerica'.
 
 # Guatemala
 #
@@ -3097,17 +3089,12 @@
 # Great Swan I ceded by US to Honduras in 1972
 
 # Jamaica
-
-# From Bob Devine (1988-01-28):
-# Follows US rules.
-
-# From U. S. Naval Observatory (1989-01-19):
-# JAMAICA             5 H  BEHIND UTC
-
-# From Shanks & Pottenger:
+# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
+# unspecified official document, and says "This time is used throughout the
+# island".  Go with Milne.  Round to the nearest second as required by zic.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	America/Jamaica	-5:07:12 -	LMT	1890		# Kingston
-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
+Zone	America/Jamaica	-5:07:11 -	LMT	1890		# Kingston
+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
 			-5:00	-	EST	1974 Apr 28 2:00
 			-5:00	US	E%sT	1984
 			-5:00	-	EST
@@ -3121,12 +3108,7 @@
 			-4:00	-	AST
 
 # Montserrat
-# From Paul Eggert (2006-03-22):
-# In 1995 volcanic eruptions forced evacuation of Plymouth, the capital.
-# world.gazetteer.com says Cork Hill is the most populous location now.
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Montserrat	-4:08:52 -	LMT	1911 Jul 1 0:01   # Cork Hill
-			-4:00	-	AST
+# See 'southamerica'.
 
 # Nicaragua
 #
@@ -3200,7 +3182,7 @@
 			-5:00	-	EST
 
 # Puerto Rico
-# There are too many San Juans elsewhere, so we'll use `Puerto_Rico'.
+# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Puerto_Rico -4:24:25 -	LMT	1899 Mar 28 12:00    # San Juan
 			-4:00	-	AST	1942 May  3
@@ -3208,18 +3190,11 @@
 			-4:00	-	AST
 
 # St Kitts-Nevis
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/St_Kitts	-4:10:52 -	LMT	1912 Mar 2	# Basseterre
-			-4:00	-	AST
-
 # St Lucia
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/St_Lucia	-4:04:00 -	LMT	1890		# Castries
-			-4:04:00 -	CMT	1912	    # Castries Mean Time
-			-4:00	-	AST
+# See 'southamerica'.
 
 # St Pierre and Miquelon
-# There are too many St Pierres elsewhere, so we'll use `Miquelon'.
+# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Miquelon	-3:44:40 -	LMT	1911 May 15	# St Pierre
 			-4:00	-	AST	1980 May
@@ -3227,10 +3202,7 @@
 			-3:00	Canada	PM%sT
 
 # St Vincent and the Grenadines
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/St_Vincent	-4:04:56 -	LMT	1890		# Kingstown
-			-4:04:56 -	KMT	1912	   # Kingstown Mean Time
-			-4:00	-	AST
+# See 'southamerica'.
 
 # Turks and Caicos
 #
@@ -3260,15 +3232,9 @@
 Rule	TC	2007	max	-	Nov	Sun>=1	2:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Grand_Turk	-4:44:32 -	LMT	1890
-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
 			-5:00	TC	E%sT
 
 # British Virgin Is
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/Tortola	-4:18:28 -	LMT	1911 Jul    # Road Town
-			-4:00	-	AST
-
 # Virgin Is
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone America/St_Thomas	-4:19:44 -	LMT	1911 Jul    # Charlotte Amalie
-			-4:00	-	AST
+# See 'southamerica'.
--- a/test/sun/util/calendar/zi/tzdata/southamerica	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/southamerica	Wed Oct 30 18:38:20 2013 +0000
@@ -474,6 +474,17 @@
 # rules...San Luis is still using "Western ARgentina Time" and it got
 # stuck on Summer daylight savings time even though the summer is over.
 
+# From Paul Eggert (2013-09-05):
+# Perhaps San Luis operates on the legal fiction that it is at UTC-4
+# with perpetual summer time, but ordinary usage typically seems to
+# just say it's at UTC-3; see, for example,
+# <http://es.wikipedia.org/wiki/Hora_oficial_argentina>.
+# We've documented similar situations as being plain changes to
+# standard time, so let's do that here too.  This does not change UTC
+# offsets, only tm_isdst and the time zone abbreviations.  One minor
+# plus is that this silences a zic complaint that there's no POSIX TZ
+# setting for time stamps past 2038.
+
 # From Paul Eggert (2013-02-21):
 # Milne says Cordoba time was -4:16:48.2.  Round to the nearest second.
 
@@ -611,7 +622,7 @@
 # San Luis (SL)
 
 Rule	SanLuis	2008	2009	-	Mar	Sun>=8	0:00	0	-
-Rule	SanLuis	2007	2009	-	Oct	Sun>=8	0:00	1:00	S
+Rule	SanLuis	2007	2008	-	Oct	Sun>=8	0:00	1:00	S
 
 Zone America/Argentina/San_Luis -4:25:24 - LMT	1894 Oct 31
 			-4:16:48 -	CMT	1920 May
@@ -627,7 +638,8 @@
 			-3:00	-	ART	2004 May 31
 			-4:00	-	WART	2004 Jul 25
 			-3:00	Arg	AR%sT	2008 Jan 21
-			-4:00	SanLuis	WAR%sT
+			-4:00	SanLuis	WAR%sT	2009 Oct 11
+			-3:00	-	ART
 #
 # Santa Cruz (SC)
 Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
@@ -654,10 +666,7 @@
 			-3:00	-	ART
 
 # Aruba
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	America/Aruba	-4:40:24 -	LMT	1912 Feb 12	# Oranjestad
-			-4:30	-	ANT	1965 # Netherlands Antilles Time
-			-4:00	-	AST
+Link America/Curacao America/Aruba
 
 # Bolivia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -859,6 +868,12 @@
 # Tocantins state will have DST.
 # http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
 
+# From Steffen Thorsen (2013-09-20):
+# Tocantins in Brazil is very likely not to observe DST from October....
+# http://conexaoto.com.br/2013/09/18/ministerio-confirma-que-tocantins-esta-fora-do-horario-de-verao-em-2013-mas-falta-publicacao-de-decreto
+# We will keep this article updated when this is confirmed:
+# http://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01)
 # Decree <a href="http://pcdsh01.on.br/HV21896.htm">21,896</a> (1932-01-10)
@@ -1078,7 +1093,8 @@
 			-3:00	-	BRT	1995 Sep 14
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT	2012 Oct 21
-			-3:00	Brazil	BR%sT
+			-3:00	Brazil	BR%sT	2013 Sep
+			-3:00	-	BRT
 #
 # Alagoas (AL), Sergipe (SE)
 Zone America/Maceio	-2:22:52 -	LMT	1914
@@ -1373,12 +1389,12 @@
 			-4:00	-	AST
 
 # From Arthur David Olson (2011-06-15):
-# At least for now, use links for places with new iso3166 codes.
+# use links for places with new iso3166 codes.
 # The name "Lower Prince's Quarter" is both longer than fourteen charaters
 # and contains an apostrophe; use "Lower_Princes" below.
 
-Link	America/Curacao	America/Lower_Princes # Sint Maarten
-Link	America/Curacao	America/Kralendijk # Bonaire, Sint Estatius and Saba
+Link	America/Curacao	America/Lower_Princes	# Sint Maarten
+Link	America/Curacao	America/Kralendijk	# Caribbean Netherlands
 
 # Ecuador
 #
@@ -1519,10 +1535,16 @@
 			-4:00	-	GYT
 
 # Paraguay
+#
 # From Paul Eggert (2006-03-22):
 # Shanks & Pottenger say that spring transitions are from 01:00 -> 02:00,
 # and autumn transitions are from 00:00 -> 23:00.  Go with pre-1999
 # editions of Shanks, and with the IATA, who say transitions occur at 00:00.
+#
+# From Waldemar Villamayor-Venialbo (2013-09-20):
+# No time of the day is established for the adjustment, so people normally
+# adjust their clocks at 0 hour of the given dates.
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Para	1975	1988	-	Oct	 1	0:00	1:00	S
 Rule	Para	1975	1978	-	Mar	 1	0:00	0	-
@@ -1656,6 +1678,19 @@
 Zone America/Port_of_Spain -4:06:04 -	LMT	1912 Mar 2
 			-4:00	-	AST
 
+Link America/Port_of_Spain America/Anguilla
+Link America/Port_of_Spain America/Dominica
+Link America/Port_of_Spain America/Grenada
+Link America/Port_of_Spain America/Guadeloupe
+Link America/Port_of_Spain America/Marigot
+Link America/Port_of_Spain America/Montserrat
+Link America/Port_of_Spain America/St_Barthelemy
+Link America/Port_of_Spain America/St_Kitts
+Link America/Port_of_Spain America/St_Lucia
+Link America/Port_of_Spain America/St_Thomas
+Link America/Port_of_Spain America/St_Vincent
+Link America/Port_of_Spain America/Tortola
+
 # Uruguay
 # From Paul Eggert (1993-11-18):
 # Uruguay wins the prize for the strangest peacetime manipulation of the rules.
@@ -1673,7 +1708,7 @@
 # Whitman gives 1937 Oct 3; go with Shanks & Pottenger.
 Rule	Uruguay	1937	1940	-	Oct	lastSun	 0:00	0:30	HS
 # Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13,
-# and 1943 Apr 13 ``to present time''; go with Shanks & Pottenger.
+# and 1943 Apr 13 "to present time"; go with Shanks & Pottenger.
 Rule	Uruguay	1941	only	-	Aug	 1	 0:00	0:30	HS
 Rule	Uruguay	1942	only	-	Jan	 1	 0:00	0	-
 Rule	Uruguay	1942	only	-	Dec	14	 0:00	1:00	S
--- a/test/sun/util/calendar/zi/tzdata/zone.tab	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/calendar/zi/tzdata/zone.tab	Wed Oct 30 18:38:20 2013 +0000
@@ -26,27 +26,30 @@
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
-# From Paul Eggert (2013-05-27):
+# From Paul Eggert (2013-08-14):
 #
-# This file contains a table with the following columns:
-# 1.  ISO 3166 2-character country code.  See the file `iso3166.tab'.
-#     This identifies a country that overlaps the zone.  The country may
-#     overlap other zones and the zone may overlap other countries.
-# 2.  Latitude and longitude of the zone's principal location
+# This file contains a table where each row stands for an area that is
+# the intersection of a region identified by a country code and of a
+# zone where civil clocks have agreed since 1970.  The columns of the
+# table are as follows:
+#
+# 1.  ISO 3166 2-character country code.  See the file 'iso3166.tab'.
+# 2.  Latitude and longitude of the area's principal location
 #     in ISO 6709 sign-degrees-minutes-seconds format,
 #     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
 #     first latitude (+ is north), then longitude (+ is east).
-#     This location need not lie within the column-1 country.
 # 3.  Zone name used in value of TZ environment variable.
 #     Please see the 'Theory' file for how zone names are chosen.
+#     If multiple zones overlap a country, each has a row in the
+#     table, with column 1 being duplicated.
 # 4.  Comments; present if and only if the country has multiple rows.
 #
 # Columns are separated by a single tab.
 # The table is sorted first by country, then an order within the country that
 # (1) makes some geographical sense, and
-# (2) puts the most populous zones first, where that does not contradict (1).
+# (2) puts the most populous areas first, where that does not contradict (1).
 #
-# Lines beginning with `#' are comments.
+# Lines beginning with '#' are comments.
 #
 # This table is intended as an aid for users, to help them select time
 # zone data appropriate for their practical needs.  It is not intended
@@ -62,8 +65,7 @@
 AL	+4120+01950	Europe/Tirane
 AM	+4011+04430	Asia/Yerevan
 AO	-0848+01314	Africa/Luanda
-AQ	-7750+16636	Antarctica/McMurdo	McMurdo Station, Ross Island
-AQ	-9000+00000	Antarctica/South_Pole	Amundsen-Scott Station, South Pole
+AQ	-7750+16636	Antarctica/McMurdo	McMurdo, South Pole, Scott (New Zealand time)
 AQ	-6734-06808	Antarctica/Rothera	Rothera Station, Adelaide Island
 AQ	-6448-06406	Antarctica/Palmer	Palmer Station, Anvers Island
 AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
@@ -143,8 +145,7 @@
 CA	+4606-06447	America/Moncton	Atlantic Time - New Brunswick
 CA	+5320-06025	America/Goose_Bay	Atlantic Time - Labrador - most locations
 CA	+5125-05707	America/Blanc-Sablon	Atlantic Standard Time - Quebec - Lower North Shore
-CA	+4531-07334	America/Montreal	Eastern Time - Quebec - most locations
-CA	+4339-07923	America/Toronto	Eastern Time - Ontario - most locations
+CA	+4339-07923	America/Toronto	Eastern Time - Ontario & Quebec - most locations
 CA	+4901-08816	America/Nipigon	Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
@@ -255,7 +256,7 @@
 IS	+6409-02151	Atlantic/Reykjavik
 IT	+4154+01229	Europe/Rome
 JE	+4912-00207	Europe/Jersey
-JM	+1800-07648	America/Jamaica
+JM	+175805-0764736	America/Jamaica
 JO	+3157+03556	Asia/Amman
 JP	+353916+1394441	Asia/Tokyo
 KE	-0117+03649	Africa/Nairobi
@@ -444,8 +445,7 @@
 US	+471551-1014640	America/North_Dakota/Beulah	Central Time - North Dakota - Mercer County
 US	+394421-1045903	America/Denver	Mountain Time
 US	+433649-1161209	America/Boise	Mountain Time - south Idaho & east Oregon
-US	+364708-1084111	America/Shiprock	Mountain Time - Navajo
-US	+332654-1120424	America/Phoenix	Mountain Standard Time - Arizona
+US	+332654-1120424	America/Phoenix	Mountain Standard Time - Arizona (except Navajo)
 US	+340308-1181434	America/Los_Angeles	Pacific Time
 US	+611305-1495401	America/Anchorage	Alaska Time
 US	+581807-1342511	America/Juneau	Alaska Time - Alaska panhandle
--- a/test/sun/util/logging/PlatformLoggerTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/logging/PlatformLoggerTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     6882376 6985460 8010309
+ * @bug     6882376 6985460 8010309 8011638
  * @summary Test if java.util.logging.Logger is created before and after
  *          logging is enabled.  Also validate some basic PlatformLogger
  *          operations.  othervm mode to make sure java.util.logging
@@ -34,8 +34,10 @@
  */
 
 import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
 import java.util.logging.*;
 import sun.util.logging.PlatformLogger;
+import sun.util.logging.LoggingSupport;
 import static sun.util.logging.PlatformLogger.Level.*;
 
 public class PlatformLoggerTest {
@@ -104,17 +106,6 @@
             throw new RuntimeException("logger " + logger.getName() + ": " + level +
                 (expected ? " not loggable" : " loggable"));
         }
-
-        if (logger.isLoggable(level.intValue()) != expected) {
-            throw new RuntimeException("logger " + logger.getName() + ": " + level.intValue() +
-                (expected ? " not loggable" : " loggable"));
-        }
-
-        int value = level.intValue() + 5; // custom level value
-        if (expected && !logger.isLoggable(value)) {
-            throw new RuntimeException("logger " + logger.getName() + ": " + value +
-                " not loggable");
-        }
     }
 
     private static void checkLevel(PlatformLogger logger, PlatformLogger.Level level) {
@@ -122,11 +113,6 @@
             throw new RuntimeException("Invalid level for logger " +
                 logger.getName() + ": " + logger.level() + " != " + level);
         }
-
-        if (logger.getLevel() != level.intValue()) {
-            throw new RuntimeException("Invalid level for logger " +
-                logger.getName() + ": " + logger.getLevel() + " != " + level.intValue());
-        }
     }
 
     private static void checkLogger(String name, Level level) {
@@ -177,6 +163,11 @@
                 checkLoggerLevel(logger, Level.ALL);
             }
         }
+
+        Logger javaLogger = Logger.getLogger("foo.bar.baz");
+        for (Level level : levels) {
+            checkJavaLoggerLevel(javaLogger, level);
+        }
     }
 
     private static void checkLoggerLevel(PlatformLogger logger, Level level) {
@@ -196,6 +187,50 @@
         }
     }
 
+    private static void checkJavaLoggerLevel(Logger logger, Level level) {
+        // This method exercise the mapping of java level to platform level
+        // when the java level is not one of the standard levels...
+
+        System.out.println("Testing Java Level with: " + level.getName());
+
+        // create a brand new java logger
+        Logger javaLogger = (Logger) LoggingSupport.getLogger(logger.getName()+"."+level.getName());
+
+        // Set a non standard java.util.logging.Level on the java logger
+        // (except for OFF & ALL - which will remain unchanged)
+        int intValue = level.intValue();
+        if (level != Level.ALL && level != Level.OFF) {
+            intValue -= 7;
+        }
+        javaLogger.setLevel(Level.parse(String.valueOf(intValue)));
+
+        // check the level set in java.util.logging.Logger
+        Level effectiveLevel = javaLogger.getLevel();
+        System.out.println("Effective Java Level used is: " + effectiveLevel);
+
+        if (effectiveLevel.intValue() != intValue) {
+            throw new RuntimeException("Retrieved backing java.util.logging.Logger level.intValue() "
+                    + effectiveLevel.intValue() + " is not the expected " + intValue);
+        }
+        if (intValue != level.intValue() && javaLogger.getLevel() == level) {
+            throw new RuntimeException("Retrieved backing java.util.logging.Logger level "
+                    + effectiveLevel + " is " + level);
+        }
+        if (intValue == level.intValue() && javaLogger.getLevel() != level) {
+            throw new RuntimeException("Retrieved backing java.util.logging.Logger level "
+                    + effectiveLevel + " is not " + level);
+        }
+
+        // check the level set in the PlatformLogger
+        PlatformLogger plogger = PlatformLogger.getLogger(javaLogger.getName());
+        PlatformLogger.Level expected = PlatformLogger.Level.valueOf(level.getName());
+        if (plogger.level() != expected) {
+            throw new RuntimeException("Retrieved backing PlatformLogger level "
+                    + plogger.level() + " is not the expected " + expected);
+
+        }
+    }
+
     private static void checkPlatformLoggerLevelMapping(Level level) {
         // map the given level to PlatformLogger.Level of the same name and value
         PlatformLogger.Level platformLevel = PlatformLogger.Level.valueOf(level.getName());
@@ -203,26 +238,10 @@
             throw new RuntimeException("Mismatched level: " + level
                     + " PlatformLogger.Level" + platformLevel);
         }
-
-        try {
-            // validate if there is a public static final field in PlatformLogger
-            Field constantField = PlatformLogger.class.getField(level.getName());
-            int l = (int) constantField.get(null);
-            if (l != platformLevel.intValue()) {
-                throw new RuntimeException("static final " + level.getName() + " (" +
-                    l + ") != " + platformLevel.intValue());
-            }
-        } catch (Exception e) {
-            throw new RuntimeException("No public static PlatformLogger." + level.getName() +
-                                       " field", e);
-        }
-        if (!platformLevel.name().equals(level.getName()))
+        if (!platformLevel.name().equals(level.getName())) {
             throw new RuntimeException("The value of PlatformLogger." + level.getName() + ".name() is "
                                        + platformLevel.name() + " but expected " + level.getName());
-
-        if (platformLevel.intValue() != level.intValue())
-            throw new RuntimeException("The value of PlatformLogger." + level.intValue() + ".intValue() is "
-                                       + platformLevel.intValue() + " but expected " + level.intValue());
+        }
     }
 
     static Point[] getPoints() {
--- a/test/sun/util/resources/TimeZone/Bug6317929.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/sun/util/resources/TimeZone/Bug6317929.java	Wed Oct 30 18:38:20 2013 +0000
@@ -130,12 +130,12 @@
                                        "(New South Wales)\"");
         tzLocale = locales2Test[1];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\u00d6stliche Normalzeit (New South Wales)"))
+           ("Eastern Normalzeit (Neus\u00fcdwales)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\u00d6stliche Normalzeit " +
-                                       "(New South Wales)\"");
+                                       "\"Eastern Normalzeit " +
+                                       "(Neus\u00fcdwales)\"");
         tzLocale = locales2Test[2];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
            ("Hora est\u00e1ndar Oriental (Nueva Gales del Sur)"))
@@ -154,53 +154,53 @@
                                        "(Nouvelle-Galles du Sud)\"");
         tzLocale = locales2Test[4];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("Ora solare dell'Australia orientale (Nuovo Galles del Sud)"))
+           ("Ora standard dell'Australia orientale (Nuovo Galles del Sud)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"Ora solare dell'Australia orientale " +
+                                       "\"Ora standard dell'Australia orientale " +
                                        "(Nuovo Galles del Sud)\"");
         tzLocale = locales2Test[5];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\u6771\u90e8\u6a19\u6e96\u6642 " +
-            "(\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)"))
+           ("\u6771\u90E8\u6A19\u6E96\u6642" +
+            "(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\u6771\u90e8\u6a19\u6e96\u6642 " +
-                                       "(\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9" +
-                                       "\u30a6\u30a7\u30fc\u30eb\u30ba)\"");
+                                       "\"\u6771\u90E8\u6A19\u6E96\u6642" +
+                                       "(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9" +
+                                       "\u30A6\u30A7\u30FC\u30EB\u30BA)\"");
         tzLocale = locales2Test[6];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)"))
+           ("\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\ub3d9\ubd80 \ud45c\uc900\uc2dc" +
-                                       "(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)\"");
+                                       "\"\uB3D9\uBD80 \uD45C\uC900\uC2DC" +
+                                       "(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)\"");
         tzLocale = locales2Test[7];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("Eastern, normaltid (Nya Sydwales)"))
+           ("\u00D6stlig standardtid (New South Wales)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"Eastern, normaltid " +
-                                       "(Nya Sydwales)\"");
+                                       "\"\u00D6stlig standardtid " +
+                                       "(New South Wales)\"");
         tzLocale = locales2Test[8];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09"))
+           ("\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u65B0\u5357\u5A01\u5C14\u65AF)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4 " +
-                                       "\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09\"");
+                                       "\"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 " +
+                                       "(\u65B0\u5357\u5A01\u5C14\u65AF)\"");
         tzLocale = locales2Test[9];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\u6771\u65b9\u6a19\u6e96\u6642\u9593 (\u65b0\u5357\u5a01\u723e\u65af)"))
+           ("\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\u6771\u65b9\u6a19\u6e96\u6642\u9593 " +
-                                       "(\u65b0\u5357\u5a01\u723e\u65af)\"");
+                                       "\"\u6771\u90E8\u6A19\u6E96\u6642\u9593 " +
+                                       "(\u65B0\u5357\u5A01\u723E\u65AF)\"");
    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jar/normalize/TestNormal.java	Wed Oct 30 18:38:20 2013 +0000
@@ -0,0 +1,147 @@
+/*
+ * 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
+ * @run main/timeout=600 TestNormal
+ * @bug 8020802
+ * @summary Need an ability to create jar files that are invariant to the pack200 packing/unpacking
+ * @author Alexander Zuev
+ */
+
+import java.io.*;
+import java.util.Collections;
+import java.util.Properties;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+public class TestNormal {
+    private static String FS = File.separator;
+
+    public static void main(String args[]) throws Exception {
+        Properties p = System.getProperties();
+        String java_home = p.getProperty("test.jdk");
+        String dtjar = java_home + File.separator + "lib"
+                + File.separator + "dt.jar";
+
+        File folder = new File("dt");
+        if (folder.exists()) {
+            delete(folder);
+        }
+        folder.mkdir();
+
+        try {
+            extractJar(new JarFile(dtjar), folder);
+            execJavaCommand(java_home, "jar cnf normalized.jar -C dt .");
+            execJavaCommand(java_home, "jar cf original.jar -C dt .");
+            execJavaCommand(java_home, "pack200 -r repacked.jar original.jar");
+            compareJars(new JarFile("normalized.jar"), new JarFile("repacked.jar"));
+        } finally {
+            String[] cleanupList = {"dt", "normalized.jar", "original.jar", "repacked.jar"};
+            for (String s : cleanupList) {
+                delete(new File(s));
+            }
+        }
+    }
+
+    public static void execJavaCommand(String java_home, String cmd) throws Exception {
+        Process proc = Runtime.getRuntime().exec(java_home + FS + "bin" + FS + cmd);
+        String s;
+        BufferedReader stdInput =
+                new BufferedReader(new InputStreamReader(proc.getInputStream()));
+        BufferedReader stdError =
+                new BufferedReader(new InputStreamReader(proc.getErrorStream()));
+        while ((s = stdInput.readLine()) != null) {
+            System.out.println(s);
+        }
+        while ((s = stdError.readLine()) != null) {
+            System.err.println(s);
+        }
+    }
+
+    public static void compareJars(JarFile jf1, JarFile jf2) throws Exception {
+        try {
+            if (jf1.size() != jf2.size()) {
+                throw new Exception("Jars " + jf1.getName() + " and " + jf2.getName()
+                        + " have different number of entries");
+            }
+            for (JarEntry elem1 : Collections.list(jf1.entries())) {
+                JarEntry elem2 = jf2.getJarEntry(elem1.getName());
+                if (elem2 == null) {
+                    throw new Exception("Element " + elem1.getName() + " is missing from " + jf2.getName());
+                }
+                if (!elem1.isDirectory() && elem1.getCrc() != elem2.getCrc()) {
+                    throw new Exception("The crc of " + elem1.getName() + " is different.");
+                }
+            }
+        } finally {
+            jf1.close();
+            jf2.close();
+        }
+    }
+
+    public static void extractJar(JarFile jf, File where) throws Exception {
+        for (JarEntry file : Collections.list(jf.entries())) {
+            File out = new File(where, file.getName());
+            if (file.isDirectory()) {
+                out.mkdirs();
+                continue;
+            }
+            File parent = out.getParentFile();
+            if (parent != null && !parent.exists()) {
+                parent.mkdirs();
+            }
+            InputStream is = null;
+            OutputStream os = null;
+            try {
+                is = jf.getInputStream(file);
+                os = new FileOutputStream(out);
+                while (is.available() > 0) {
+                    os.write(is.read());
+                }
+            } finally {
+                if (is != null) {
+                    is.close();
+                }
+                if (os != null) {
+                    os.close();
+                }
+            }
+        }
+    }
+
+    static void delete(File f) throws IOException {
+        if (!f.exists()) {
+            return;
+        }
+        if (f.isDirectory()) {
+            for (File c : f.listFiles()) {
+                delete(c);
+            }
+        }
+        if (!f.delete()) {
+            throw new FileNotFoundException("Failed to delete file: " + f);
+        }
+    }
+}
--- a/test/tools/launcher/RunpathTest.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/tools/launcher/RunpathTest.java	Wed Oct 30 18:38:20 2013 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7190813
+ * @bug 7190813 8022719
  * @summary Check for extended  RPATHs on *nixes
  * @compile -XDignore.symbol.file RunpathTest.java
  * @run main RunpathTest
@@ -64,8 +64,7 @@
     }
 
     void testRpath() {
-        String expectedRpath = ".*RPATH.*\\$ORIGIN/../lib/" + getJreArch()
-                + ":\\$ORIGIN/../jre/lib/" + getJreArch() + ".*";
+        String expectedRpath = ".*RPATH.*\\$ORIGIN/../lib/" + getJreArch() + ".*";
         elfCheck(javaCmd, expectedRpath);
     }
 
--- a/test/tools/launcher/VersionCheck.java	Wed Oct 30 18:37:50 2013 +0000
+++ b/test/tools/launcher/VersionCheck.java	Wed Oct 30 18:38:20 2013 +0000
@@ -50,6 +50,7 @@
         "javaws",
         "jcontrol",
         "jmc",
+        "jmc.ini",
         "jvisualvm",
         "packager",
         "unpack200",
@@ -74,6 +75,7 @@
         "jinfo",
         "jmap",
         "jmc",
+        "jmc.ini",
         "jps",
         "jrunscript",
         "jjs",