changeset 10485:162c57b874d4

Merge
author lana
date Fri, 25 Oct 2013 10:39:13 -0700
parents dab1d3798016 (current diff) b88aa723a5fa (diff)
children 55cab2211ae9
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/com/sun/jdi/connect/package.html src/share/classes/com/sun/jdi/connect/spi/package.html src/share/classes/com/sun/jdi/event/package.html src/share/classes/com/sun/jdi/package.html src/share/classes/com/sun/jdi/request/package.html src/share/classes/com/sun/management/package.html src/share/classes/com/sun/tools/attach/package.html src/share/classes/com/sun/tools/attach/spi/package.html src/share/classes/com/sun/tools/jconsole/package.html src/share/classes/java/awt/datatransfer/DataFlavor.java src/share/classes/java/net/HttpURLPermission.java src/share/classes/sun/awt/AppContext.java src/solaris/doc/sun/man/man1/ja/javaws.1 src/solaris/doc/sun/man/man1/javaws.1 test/com/oracle/security/ucrypto/TestAES.java test/com/oracle/security/ucrypto/TestDigest.java test/com/oracle/security/ucrypto/TestRSA.java test/com/oracle/security/ucrypto/UcryptoTest.java test/java/net/HttpURLPermission/HttpURLPermissionTest.java test/java/net/HttpURLPermission/URLTest.java test/java/net/HttpURLPermission/policy.1 test/java/net/HttpURLPermission/policy.2 test/java/net/HttpURLPermission/policy.3
diffstat 782 files changed, 26002 insertions(+), 19396 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Oct 25 19:51:54 2013 +0400
+++ b/.hgtags	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/com/sun/jmx/Makefile	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/common/Defs-macosx.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/common/Defs.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/common/shared/Compiler-msvc.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/common/shared/Defs-versions.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/common/shared/Sanity.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/java/management/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/java/redist/Makefile	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -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/java/security/Makefile	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/java/security/Makefile	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -79,6 +79,9 @@
   BLACKLISTED_CERTS_SRC +=	$(wildcard $(CLOSED_SHARE_SRC)/lib/security/blacklisted.certs)
   TRUSTEDLIBS_SRC = $(CLOSED_SHARE_SRC)/lib/security/trusted.libraries
   TRUSTEDLIBS_BUILD = $(LIBDIR)/security/trusted.libraries
+  RESTRICTED_PKGS_SRC = $(CLOSED_SHARE_SRC)/lib/security/restricted.pkgs
+  RESTRICTED_PKGS := $(shell $(CAT) $(RESTRICTED_PKGS_SRC) | $(TR) "\n" " ")
+  ADDTORESTRICTEDPKGS_JARFILE = $(BUILDTOOLJARDIR)/addtorestrictedpkgs.jar
 endif
 
 FILES_class = $(FILES_java:%.java=$(CLASSBINDIR)/%.class)
@@ -108,8 +111,15 @@
 
 trustedlibs: classes $(TRUSTEDLIBS_BUILD)
 
+ifdef OPENJDK
 $(PROPS_BUILD): $(PROPS_SRC)
 	$(install-file)
+else
+$(PROPS_BUILD): $(PROPS_SRC)
+	$(MKDIR) -p $(@D)
+	$(BOOT_JAVA_CMD) -jar $(ADDTORESTRICTEDPKGS_JARFILE) $^ $@.tmp $(RESTRICTED_PKGS)
+	$(MV) $@.tmp $@
+endif
 
 $(POLICY_BUILD): $(POLICY_SRC)
 	$(install-file)
--- a/make/jprt.properties	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/jprt.properties	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/awt/Makefile	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/VERSION	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/africa	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/antarctica	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/asia	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/australasia	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/backward	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/etcetera	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/europe	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/iso3166.tab	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/leapseconds	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/northamerica	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/southamerica	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/sun/javazic/tzdata/zone.tab	Fri Oct 25 10:39:13 2013 -0700
@@ -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/Makefile	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/tools/Makefile	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,7 @@
 # Note: freetypecheck is built by Sanity.gmk if needed
 SUBDIRS =                   \
   addjsum                   \
+  addtorestrictedpkgs       \
   buildmetaindex            \
   cldrconverter             \
   commentchecker            \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/addtorestrictedpkgs/Makefile	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,43 @@
+#
+# 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.
+#
+
+#
+# Makefile for building the addtorestrictedpkgs tool
+#
+
+BUILDDIR = ../..
+PACKAGE = build.tools.addtorestrictedpkgs
+PRODUCT = tools
+PROGRAM = addtorestrictedpkgs
+include $(BUILDDIR)/common/Defs.gmk
+
+BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
+BUILDTOOL_MAIN        = $(PKGDIR)/AddToRestrictedPkgs.java
+
+#
+# Build tool jar rules.
+#
+include $(BUILDDIR)/common/BuildToolJar.gmk
+
--- a/make/tools/manifest.mf	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/tools/manifest.mf	Fri Oct 25 10:39:13 2013 -0700
@@ -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@@
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/addtorestrictedpkgs/AddToRestrictedPkgs.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.addtorestrictedpkgs;
+
+import java.io.*;
+
+/**
+ * Adds additional packages to the package.access and package.definition
+ * security properties.
+ */
+public class AddToRestrictedPkgs {
+
+    private static final String PKG_ACC = "package.access";
+    private static final String PKG_DEF = "package.definition";
+    private static final int PKG_ACC_INDENT = 15;
+    private static final int PKG_DEF_INDENT = 19;
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length < 3) {
+            System.err.println("Usage: java AddToRestrictedPkgs " +
+                               "[input java.security file name] " +
+                               "[output java.security file name] " +
+                               "[packages ...]");
+            System.exit(1);
+        }
+
+        try (FileReader fr = new FileReader(args[0]);
+             BufferedReader br = new BufferedReader(fr);
+             FileWriter fw = new FileWriter(args[1]);
+             BufferedWriter bw = new BufferedWriter(fw))
+        {
+            // parse the file line-by-line, looking for pkg access properties
+            String line = br.readLine();
+            while (line != null) {
+                if (line.startsWith(PKG_ACC)) {
+                    writePackages(br, bw, line, PKG_ACC_INDENT, args);
+                } else if (line.startsWith(PKG_DEF)) {
+                    writePackages(br, bw, line, PKG_DEF_INDENT, args);
+                } else {
+                    writeLine(bw, line);
+                }
+                line = br.readLine();
+            }
+            bw.flush();
+        }
+    }
+
+    private static void writePackages(BufferedReader br, BufferedWriter bw,
+                                      String line, int numSpaces,
+                                      String[] args) throws IOException {
+        // parse property until EOL, not including line breaks
+        while (line.endsWith("\\")) {
+            writeLine(bw, line);
+            line = br.readLine();
+        }
+        // append comma and line-break to last package
+        writeLine(bw, line + ",\\");
+        // add new packages, one per line
+        for (int i = 2; i < args.length - 1; i++) {
+            indent(bw, numSpaces);
+            writeLine(bw, args[i] + ",\\");
+        }
+        indent(bw, numSpaces);
+        writeLine(bw, args[args.length - 1]);
+    }
+
+    private static void writeLine(BufferedWriter bw, String line)
+        throws IOException
+    {
+        bw.write(line);
+        bw.newLine();
+    }
+
+    private static void indent(BufferedWriter bw, int numSpaces)
+        throws IOException
+    {
+        for (int i = 0; i < numSpaces; i++) {
+            bw.append(' ');
+        }
+    }
+}
--- a/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/makefiles/BuildJdk.gmk	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/BuildJdk.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/Bundles.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/CompileDemos.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/CompileJavaClasses.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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,40 +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
+  # 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
@@ -288,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))
 
 ##########################################################################################
 
@@ -314,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/CompileLaunchers.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/CompileNativeLibraries.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/CopyFiles.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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)
@@ -355,9 +352,23 @@
 PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-$(OPENJDK_TARGET_OS)
 PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
 
+ifndef OPENJDK
+
+RESTRICTED_PKGS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/restricted.pkgs
+RESTRICTED_PKGS := $(shell $(CAT) $(RESTRICTED_PKGS_SRC) | $(TR) "\n" " ")
+
+$(PROPS_DST): $(PROPS_SRC)
+	$(MKDIR) -p $(@D)
+	$(TOOL_ADDTORESTRICTEDPKGS) $^ $@.tmp $(RESTRICTED_PKGS)
+	$(MV) $@.tmp $@
+
+else
+
 $(PROPS_DST): $(PROPS_SRC)
 	$(call install-file)
 
+endif
+
 COPY_FILES += $(PROPS_DST)
 
 ##########################################################################################
@@ -387,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
 
@@ -425,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
 
@@ -524,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/CopyIntoClasses.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/CopySamples.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/CreateJars.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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,128 +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
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-        RT_JAR_EXCLUDES += com/sun/nio/sctp \
-                           sun/nio/ch/sctp
-endif
+    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
@@ -231,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 $@
@@ -241,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)
@@ -252,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
@@ -286,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)
 
 
@@ -322,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
@@ -429,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 $@
@@ -450,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
 
@@ -477,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
 
@@ -501,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)
 
@@ -530,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
 
@@ -544,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
 
@@ -573,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
@@ -613,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
 
@@ -627,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
@@ -655,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))
 
 
 ##########################################################################################
@@ -821,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.
@@ -831,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
@@ -846,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
@@ -902,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)
@@ -916,80 +911,78 @@
 $(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
 # all jars can be found in one place when creating images in Images.gmk. It needs to be
 # done here so that clean targets can be simple and accurate.
@@ -1000,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
 
@@ -1026,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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/GenerateClasses.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/GenerateData.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/Images.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/Import.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/Makefile	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/PatchList.solaris	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/ProfileNames.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/Profiles.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/Setup.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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,classfile,dep-ann,divzero,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/SignJars.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/Tools.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -24,152 +24,156 @@
 #
 
 # 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 \
+    -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
+    build.tools.classfile.RemoveMethods
 
-TOOL_REMOVEMETHODS=$(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.classfile.RemoveMethods
+    build.tools.deps.CheckDeps
 
-TOOL_CHECKDEPS=$(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
-    -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
-        build.tools.deps.CheckDeps
+TOOL_ADDTORESTRICTEDPKGS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+ 	build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
 
 ##########################################################################################
 
 # 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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/jpda/jdwp/jdwp.spec	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/jprt.gmk	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/jprt.properties	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libawt/mapfile-mawt-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libawt/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libawt/mapfile-vers-linux	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libawt_headless/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libawt_xawt/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libfontmanager/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk	Fri Oct 25 10:39:13 2013 -0700
@@ -30,7 +30,7 @@
 SUNWprivate_1.1 {
 	global:
                 getSunFontIDs;
-                newLayoutTableCache; 
+                newLayoutTableCache;
                 freeLayoutTableCache;
                 isNullScalerContext;
                 Java_sun_font_NullFontScaler_getNullScalerContext;
--- a/makefiles/mapfiles/libj2pcsc/mapfile-vers	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libj2pcsc/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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/libjdga/mapfile-vers	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libjdga/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -27,7 +27,7 @@
 
 SUNWprivate_1.1 {
 	global:
-            JDgaLibInit;	
+            JDgaLibInit;
 	local:
 	    *;
 };
--- a/makefiles/mapfiles/libjli/mapfile-vers	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libjli/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -36,7 +36,7 @@
 		JLI_ReportExceptionDescription;
 		JLI_GetStdArgs;
 		JLI_GetStdArgc;
-		
+
 	local:
 		*;
 };
--- a/makefiles/mapfiles/libmanagement/mapfile-vers	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libmanagement/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/mapfiles/libverify/mapfile-vers	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/profile-includes.txt	Fri Oct 25 10:39:13 2013 -0700
@@ -33,8 +33,6 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX) \
-    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \
-    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify.diz \
@@ -130,6 +128,8 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management.diz \
+    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \
+    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) \
     jvm.hprof.txt \
     management-agent.jar \
@@ -253,4 +253,3 @@
     ext/nashorn.jar \
     ext/zipfs.jar \
     jfr.jar
-
--- a/makefiles/profile-rtjar-includes.txt	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/profile-rtjar-includes.txt	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/scripts/addNotices.sh	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/scripts/genCharsetProvider.sh	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/scripts/genExceptions.sh	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/scripts/localelist.sh	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/makefiles/sun/awt/ToBin.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/macosx/classes/com/apple/laf/AquaUtils.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/macosx/classes/com/apple/laf/ScreenMenu.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ /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);
-}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/nio/ch/sctp/SctpChannelImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2009, 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 sun.nio.ch.sctp;
+
+import java.net.SocketAddress;
+import java.net.InetAddress;
+import java.io.IOException;
+import java.util.Set;
+import java.nio.ByteBuffer;
+import java.nio.channels.spi.SelectorProvider;
+import com.sun.nio.sctp.Association;
+import com.sun.nio.sctp.MessageInfo;
+import com.sun.nio.sctp.NotificationHandler;
+import com.sun.nio.sctp.SctpChannel;
+import com.sun.nio.sctp.SctpSocketOption;
+
+/**
+ * Unimplemented.
+ */
+public class SctpChannelImpl extends SctpChannel
+{
+    private static final String message = "SCTP not supported on this platform";
+
+    public SctpChannelImpl(SelectorProvider provider) {
+        super(provider);
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Association association() {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpChannel bind(SocketAddress local)
+                            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpChannel bindAddress(InetAddress address)
+         throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpChannel unbindAddress(InetAddress address)
+         throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public boolean connect(SocketAddress remote) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public boolean connect(SocketAddress remote, int maxOutStreams,
+       int maxInStreams) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public boolean isConnectionPending() {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public boolean finishConnect() throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<SocketAddress> getAllLocalAddresses()
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<SocketAddress> getRemoteAddresses()
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpChannel shutdown() throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public <T> T getOption(SctpSocketOption<T> name)
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public <T> SctpChannel setOption(SctpSocketOption<T> name, T value)
+        throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<SctpSocketOption<?>> supportedOptions() {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public <T> MessageInfo receive(ByteBuffer dst, T attachment,
+            NotificationHandler<T> handler) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public int send(ByteBuffer src, MessageInfo messageInfo)
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    protected void implConfigureBlocking(boolean block) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public void implCloseSelectableChannel() throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2009, 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 sun.nio.ch.sctp;
+
+import java.net.SocketAddress;
+import java.net.InetAddress;
+import java.io.IOException;
+import java.util.Set;
+import java.nio.ByteBuffer;
+import java.nio.channels.spi.SelectorProvider;
+import com.sun.nio.sctp.Association;
+import com.sun.nio.sctp.SctpChannel;
+import com.sun.nio.sctp.MessageInfo;
+import com.sun.nio.sctp.NotificationHandler;
+import com.sun.nio.sctp.SctpMultiChannel;
+import com.sun.nio.sctp.SctpSocketOption;
+
+/**
+ * Unimplemented.
+ */
+public class SctpMultiChannelImpl extends SctpMultiChannel
+{
+    private static final String message = "SCTP not supported on this platform";
+
+    public SctpMultiChannelImpl(SelectorProvider provider) {
+        super(provider);
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<Association> associations() {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpMultiChannel bind(SocketAddress local,
+            int backlog) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpMultiChannel bindAddress(InetAddress address)
+         throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpMultiChannel unbindAddress(InetAddress address)
+         throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<SocketAddress> getAllLocalAddresses()
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<SocketAddress> getRemoteAddresses
+            (Association association) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpMultiChannel shutdown(Association association)
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public <T> T getOption(SctpSocketOption<T> name,
+            Association association) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public <T> SctpMultiChannel setOption(SctpSocketOption<T> name,
+            T value, Association association) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<SctpSocketOption<?>> supportedOptions() {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public <T> MessageInfo receive(ByteBuffer buffer, T attachment,
+            NotificationHandler<T> handler) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public int send(ByteBuffer buffer, MessageInfo messageInfo)
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpChannel branch(Association association)
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    protected void implConfigureBlocking(boolean block) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public void implCloseSelectableChannel() throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2009, 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 sun.nio.ch.sctp;
+
+import java.net.SocketAddress;
+import java.net.InetAddress;
+import java.io.IOException;
+import java.util.Set;
+import java.nio.channels.spi.SelectorProvider;
+import com.sun.nio.sctp.SctpChannel;
+import com.sun.nio.sctp.SctpServerChannel;
+import com.sun.nio.sctp.SctpSocketOption;
+
+/**
+ * Unimplemented.
+ */
+public class SctpServerChannelImpl extends SctpServerChannel
+{
+    private static final String message = "SCTP not supported on this platform";
+
+    public SctpServerChannelImpl(SelectorProvider provider) {
+        super(provider);
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpChannel accept() throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpServerChannel bind(SocketAddress local,
+            int backlog) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpServerChannel bindAddress(InetAddress address)
+         throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public SctpServerChannel unbindAddress(InetAddress address)
+         throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<SocketAddress> getAllLocalAddresses()
+            throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public <T> T getOption(SctpSocketOption<T> name) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public <T> SctpServerChannel setOption(SctpSocketOption<T> name,
+            T value) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public Set<SctpSocketOption<?>> supportedOptions() {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    protected void implConfigureBlocking(boolean block) throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+
+    @Override
+    public void implCloseSelectableChannel() throws IOException {
+        throw new UnsupportedOperationException(message);
+    }
+}
--- a/src/macosx/native/com/apple/resources/MacOSXResourceBundle.m	Fri Oct 25 19:51:54 2013 +0400
+++ /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/classes/com/sun/crypto/provider/CipherBlockChaining.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/CipherBlockChaining.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -135,9 +135,10 @@
      * @param plainLen the length of the input data
      * @param cipher the buffer for the result
      * @param cipherOffset the offset in <code>cipher</code>
+     * @return the length of the encrypted data
      */
-    void encrypt(byte[] plain, int plainOffset, int plainLen,
-                 byte[] cipher, int cipherOffset)
+    int encrypt(byte[] plain, int plainOffset, int plainLen,
+                byte[] cipher, int cipherOffset)
     {
         int i;
         int endIndex = plainOffset + plainLen;
@@ -150,6 +151,7 @@
             embeddedCipher.encryptBlock(k, 0, cipher, cipherOffset);
             System.arraycopy(cipher, cipherOffset, r, 0, blockSize);
         }
+        return plainLen;
     }
 
     /**
@@ -174,13 +176,14 @@
      * @param cipherLen the length of the input data
      * @param plain the buffer for the result
      * @param plainOffset the offset in <code>plain</code>
+     * @return the length of the decrypted data
      *
      * @exception IllegalBlockSizeException if input data whose length does
      * not correspond to the embedded cipher's block size is passed to the
      * embedded cipher
      */
-    void decrypt(byte[] cipher, int cipherOffset, int cipherLen,
-                 byte[] plain, int plainOffset)
+    int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
+                byte[] plain, int plainOffset)
     {
         int i;
         byte[] cipherOrig=null;
@@ -195,7 +198,6 @@
             // the plaintext result.
             cipherOrig = cipher.clone();
         }
-
         for (; cipherOffset < endIndex;
              cipherOffset += blockSize, plainOffset += blockSize) {
             embeddedCipher.decryptBlock(cipher, cipherOffset, k, 0);
@@ -208,5 +210,6 @@
                 System.arraycopy(cipherOrig, cipherOffset, r, 0, blockSize);
             }
         }
+        return cipherLen;
     }
 }
--- a/src/share/classes/com/sun/crypto/provider/CipherCore.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/CipherCore.java	Fri Oct 25 10:39:13 2013 -0700
@@ -310,49 +310,20 @@
      * @return the required output buffer size (in bytes)
      */
     int getOutputSize(int inputLen) {
-        int totalLen = buffered + inputLen;
-
-        // GCM: this call may be for either update() or doFinal(), so have to
-        // return the larger value of both
-        // Encryption: based on doFinal value: inputLen + tag
-        // Decryption: based on update value: inputLen
-        if (!decrypting && (cipherMode == GCM_MODE)) {
-            return (totalLen + ((GaloisCounterMode) cipher).getTagLen());
-        }
-
-        if (padding == null) {
-            return totalLen;
-        }
-
-        if (decrypting) {
-            return totalLen;
-        }
-
-        if (unitBytes != blockSize) {
-            if (totalLen < diffBlocksize) {
-                return diffBlocksize;
-            } else {
-                return (totalLen + blockSize -
-                        ((totalLen - diffBlocksize) % blockSize));
-            }
-        } else {
-            return totalLen + padding.padLength(totalLen);
-        }
+        // estimate based on the maximum
+        return getOutputSizeByOperation(inputLen, true);
     }
 
     private int getOutputSizeByOperation(int inputLen, boolean isDoFinal) {
-        int totalLen = 0;
+        int totalLen = buffered + inputLen + cipher.getBufferedLength();
         switch (cipherMode) {
         case GCM_MODE:
-            totalLen = buffered + inputLen;
             if (isDoFinal) {
                 int tagLen = ((GaloisCounterMode) cipher).getTagLen();
-                if (decrypting) {
-                    // need to get the actual value from cipher??
-                    // deduct tagLen
+                if (!decrypting) {
+                    totalLen += tagLen;
+                } else {
                     totalLen -= tagLen;
-                } else {
-                    totalLen += tagLen;
                 }
             }
             if (totalLen < 0) {
@@ -360,8 +331,19 @@
             }
             break;
         default:
-             totalLen  = getOutputSize(inputLen);
-             break;
+            if (padding != null && !decrypting) {
+                if (unitBytes != blockSize) {
+                    if (totalLen < diffBlocksize) {
+                        totalLen = diffBlocksize;
+                    } else {
+                        int residue = (totalLen - diffBlocksize) % blockSize;
+                        totalLen += (blockSize - residue);
+                    }
+                } else {
+                    totalLen += padding.padLength(totalLen);
+                }
+            }
+            break;
         }
         return totalLen;
     }
@@ -729,36 +711,52 @@
         len = (len > 0 ? (len - (len%unitBytes)) : 0);
 
         // check output buffer capacity
-        if ((output == null) || ((output.length - outputOffset) < len)) {
+        if ((output == null) ||
+            ((output.length - outputOffset) < len)) {
             throw new ShortBufferException("Output buffer must be "
                                            + "(at least) " + len
                                            + " bytes long");
         }
 
-        if (len != 0) {
-            // there is some work to do
-            byte[] in = new byte[len];
-
-            int inputConsumed = len - buffered;
-            int bufferedConsumed = buffered;
-            if (inputConsumed < 0) {
-                inputConsumed = 0;
-                bufferedConsumed = len;
+        int outLen = 0;
+        if (len != 0) { // there is some work to do
+            if (len <= buffered) {
+                // all to-be-processed data are from 'buffer'
+                if (decrypting) {
+                    outLen = cipher.decrypt(buffer, 0, len, output, outputOffset);
+                } else {
+                    outLen = cipher.encrypt(buffer, 0, len, output, outputOffset);
+                }
+                buffered -= len;
+                if (buffered != 0) {
+                    System.arraycopy(buffer, len, buffer, 0, buffered);
+                }
+            } else { // len > buffered
+                if (buffered == 0) {
+                    // all to-be-processed data are from 'input'
+                    if (decrypting) {
+                        outLen = cipher.decrypt(input, inputOffset, len, output, outputOffset);
+                    } else {
+                        outLen = cipher.encrypt(input, inputOffset, len, output, outputOffset);
+                    }
+                    inputOffset += len;
+                    inputLen -= len;
+                } else {
+                    // assemble the data using both 'buffer' and 'input'
+                    byte[] in = new byte[len];
+                    System.arraycopy(buffer, 0, in, 0, buffered);
+                    int inConsumed = len - buffered;
+                    System.arraycopy(input, inputOffset, in, buffered, inConsumed);
+                    buffered = 0;
+                    inputOffset += inConsumed;
+                    inputLen -= inConsumed;
+                    if (decrypting) {
+                        outLen = cipher.decrypt(in, 0, len, output, outputOffset);
+                    } else {
+                        outLen = cipher.encrypt(in, 0, len, output, outputOffset);
+                    }
+                }
             }
-
-            if (buffered != 0) {
-                System.arraycopy(buffer, 0, in, 0, bufferedConsumed);
-            }
-            if (inputConsumed > 0) {
-                System.arraycopy(input, inputOffset, in,
-                                 bufferedConsumed, inputConsumed);
-            }
-            if (decrypting) {
-                cipher.decrypt(in, 0, len, output, outputOffset);
-            } else {
-                cipher.encrypt(in, 0, len, output, outputOffset);
-            }
-
             // Let's keep track of how many bytes are needed to make
             // the total input length a multiple of blocksize when
             // padding is applied
@@ -770,23 +768,14 @@
                         ((len - diffBlocksize) % blockSize);
                 }
             }
-
-            inputLen -= inputConsumed;
-            inputOffset += inputConsumed;
-            outputOffset += len;
-            buffered -= bufferedConsumed;
-            if (buffered > 0) {
-                System.arraycopy(buffer, bufferedConsumed, buffer, 0,
-                                 buffered);
-            }
         }
-        // left over again
+        // Store remaining input into 'buffer' again
         if (inputLen > 0) {
             System.arraycopy(input, inputOffset, buffer, buffered,
                              inputLen);
+            buffered += inputLen;
         }
-        buffered += inputLen;
-        return len;
+        return outLen;
     }
 
     /**
@@ -881,11 +870,24 @@
                 ("Must use either different key or iv for GCM encryption");
         }
 
-        // calculate the total input length
-        int totalLen = buffered + inputLen;
-        int paddedLen = totalLen;
+        int estOutSize = getOutputSizeByOperation(inputLen, true);
+        // check output buffer capacity.
+        // if we are decrypting with padding applied, we can perform this
+        // check only after we have determined how many padding bytes there
+        // are.
+        int outputCapacity = output.length - outputOffset;
+        int minOutSize = (decrypting? (estOutSize - blockSize):estOutSize);
+        if ((output == null) || (outputCapacity < minOutSize)) {
+            throw new ShortBufferException("Output buffer must be "
+                + "(at least) " + minOutSize + " bytes long");
+        }
+
+        // calculate total input length
+        int len = buffered + inputLen;
+
+        // calculate padding length
+        int totalLen = len + cipher.getBufferedLength();
         int paddingLen = 0;
-
         // will the total input length be a multiple of blockSize?
         if (unitBytes != blockSize) {
             if (totalLen < diffBlocksize) {
@@ -898,40 +900,23 @@
             paddingLen = padding.padLength(totalLen);
         }
 
-        if ((paddingLen > 0) && (paddingLen != blockSize) &&
-            (padding != null) && decrypting) {
+        if (decrypting && (padding != null) &&
+            (paddingLen > 0) && (paddingLen != blockSize)) {
             throw new IllegalBlockSizeException
                 ("Input length must be multiple of " + blockSize +
                  " when decrypting with padded cipher");
         }
 
-        // if encrypting and padding not null, add padding
-        if (!decrypting && padding != null) {
-            paddedLen += paddingLen;
-        }
-
-        // check output buffer capacity.
-        // if we are decrypting with padding applied, we can perform this
-        // check only after we have determined how many padding bytes there
-        // are.
-        if (output == null) {
-            throw new ShortBufferException("Output buffer is null");
-        }
-        int outputCapacity = output.length - outputOffset;
-
-        if (((!decrypting) && (outputCapacity < paddedLen)) ||
-            (decrypting && (outputCapacity < (paddedLen - blockSize)))) {
-            throw new ShortBufferException("Output buffer too short: "
-                                           + outputCapacity + " bytes given, "
-                                           + paddedLen + " bytes needed");
-        }
-
         // prepare the final input avoiding copying if possible
         byte[] finalBuf = input;
         int finalOffset = inputOffset;
+        int finalBufLen = inputLen;
         if ((buffered != 0) || (!decrypting && padding != null)) {
+            if (decrypting || padding == null) {
+                paddingLen = 0;
+            }
+            finalBuf = new byte[len + paddingLen];
             finalOffset = 0;
-            finalBuf = new byte[paddedLen];
             if (buffered != 0) {
                 System.arraycopy(buffer, 0, finalBuf, 0, buffered);
             }
@@ -939,50 +924,50 @@
                 System.arraycopy(input, inputOffset, finalBuf,
                                  buffered, inputLen);
             }
-            if (!decrypting && padding != null) {
-                padding.padWithLen(finalBuf, totalLen, paddingLen);
+            if (paddingLen != 0) {
+                padding.padWithLen(finalBuf, (buffered+inputLen), paddingLen);
             }
+            finalBufLen = finalBuf.length;
         }
-
+        int outLen = 0;
         if (decrypting) {
             // if the size of specified output buffer is less than
             // the length of the cipher text, then the current
             // content of cipher has to be preserved in order for
             // users to retry the call with a larger buffer in the
             // case of ShortBufferException.
-            if (outputCapacity < paddedLen) {
+            if (outputCapacity < estOutSize) {
                 cipher.save();
             }
             // create temporary output buffer so that only "real"
             // data bytes are passed to user's output buffer.
-            byte[] outWithPadding = new byte[totalLen];
-            totalLen = finalNoPadding(finalBuf, finalOffset, outWithPadding,
-                                      0, totalLen);
+            byte[] outWithPadding = new byte[estOutSize];
+            outLen = finalNoPadding(finalBuf, finalOffset, outWithPadding,
+                                    0, finalBufLen);
 
             if (padding != null) {
-                int padStart = padding.unpad(outWithPadding, 0, totalLen);
+                int padStart = padding.unpad(outWithPadding, 0, outLen);
                 if (padStart < 0) {
                     throw new BadPaddingException("Given final block not "
                                                   + "properly padded");
                 }
-                totalLen = padStart;
+                outLen = padStart;
             }
 
-            if ((output.length - outputOffset) < totalLen) {
+            if (outputCapacity < outLen) {
                 // restore so users can retry with a larger buffer
                 cipher.restore();
                 throw new ShortBufferException("Output buffer too short: "
-                                               + (output.length-outputOffset)
-                                               + " bytes given, " + totalLen
+                                               + (outputCapacity)
+                                               + " bytes given, " + outLen
                                                + " bytes needed");
             }
-            for (int i = 0; i < totalLen; i++) {
-                output[outputOffset + i] = outWithPadding[i];
-            }
+            // copy the result into user-supplied output buffer
+            System.arraycopy(outWithPadding, 0, output, outputOffset, outLen);
         } else { // encrypting
             try {
-                totalLen = finalNoPadding(finalBuf, finalOffset, output,
-                                          outputOffset, paddedLen);
+                outLen = finalNoPadding(finalBuf, finalOffset, output,
+                                        outputOffset, finalBufLen);
             } finally {
                 // reset after doFinal() for GCM encryption
                 requireReinit = (cipherMode == GCM_MODE);
@@ -994,12 +979,13 @@
         if (cipherMode != ECB_MODE) {
             cipher.reset();
         }
-        return totalLen;
+        return outLen;
     }
 
     private int finalNoPadding(byte[] in, int inOfs, byte[] out, int outOfs,
                                int len)
-        throws IllegalBlockSizeException, AEADBadTagException {
+        throws IllegalBlockSizeException, AEADBadTagException,
+        ShortBufferException {
 
         if ((cipherMode != GCM_MODE) && (in == null || len == 0)) {
             return 0;
--- a/src/share/classes/com/sun/crypto/provider/CipherFeedback.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/CipherFeedback.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, 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
@@ -150,9 +150,10 @@
      * @param plainLen the length of the input data
      * @param cipher the buffer for the result
      * @param cipherOffset the offset in <code>cipher</code>
+     * @return the length of the encrypted data
      */
-    void encrypt(byte[] plain, int plainOffset, int plainLen,
-                        byte[] cipher, int cipherOffset)
+    int encrypt(byte[] plain, int plainOffset, int plainLen,
+                byte[] cipher, int cipherOffset)
     {
         int i, len;
         len = blockSize - numBytes;
@@ -194,6 +195,7 @@
                 }
             }
         }
+        return plainLen;
     }
 
     /**
@@ -218,9 +220,10 @@
      * @param cipherLen the length of the input data
      * @param plain the buffer for the result
      * @param plainOffset the offset in <code>plain</code>
+     * @return the length of the decrypted data
      */
-    void decrypt(byte[] cipher, int cipherOffset, int cipherLen,
-                        byte[] plain, int plainOffset)
+    int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
+                byte[] plain, int plainOffset)
     {
         int i, len;
         len = blockSize - numBytes;
@@ -268,5 +271,6 @@
                 }
             }
         }
+        return cipherLen;
     }
 }
--- a/src/share/classes/com/sun/crypto/provider/CounterMode.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/CounterMode.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 201313, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -149,9 +149,10 @@
      * @param len the length of the input data
      * @param out the buffer for the result
      * @param outOff the offset in <code>cipher</code>
+     * @return the length of the encrypted data
      */
-    void encrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
-        crypt(in, inOff, len, out, outOff);
+    int encrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
+        return crypt(in, inOff, len, out, outOff);
     }
 
     /**
@@ -176,9 +177,10 @@
      * @param len the length of the input data
      * @param out the buffer for the result
      * @param outOff the offset in <code>plain</code>
+     * @return the length of the decrypted data
      */
-    void decrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
-        crypt(in, inOff, len, out, outOff);
+    int decrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
+        return crypt(in, inOff, len, out, outOff);
     }
 
     /**
@@ -197,7 +199,8 @@
      * keystream generated by encrypting the counter values. Counter values
      * are encrypted on demand.
      */
-    private void crypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
+    private int crypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
+        int result = len;
         while (len-- > 0) {
             if (used >= blockSize) {
                 embeddedCipher.encryptBlock(counter, 0, encryptedCounter, 0);
@@ -206,5 +209,6 @@
             }
             out[outOff++] = (byte)(in[inOff++] ^ encryptedCounter[used++]);
         }
+        return result;
     }
 }
--- a/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -58,6 +58,16 @@
     // The source of randomness
     private SecureRandom random = null;
 
+    private static void checkKeySize(int keysize)
+        throws InvalidAlgorithmParameterException {
+        if ((keysize != 2048) &&
+            ((keysize < 512) || (keysize > 1024) || (keysize % 64 != 0))) {
+            throw new InvalidAlgorithmParameterException(
+                "Keysize must be multiple of 64 ranging from "
+                + "512 to 1024 (inclusive), or 2048");
+        }
+    }
+
     /**
      * Initializes this parameter generator for a certain keysize
      * and source of randomness.
@@ -67,11 +77,11 @@
      * @param random the source of randomness
      */
     protected void engineInit(int keysize, SecureRandom random) {
-        if ((keysize < 512) || (keysize > 2048) || (keysize % 64 != 0)) {
-            throw new InvalidParameterException("Keysize must be multiple "
-                                                + "of 64, and can only range "
-                                                + "from 512 to 2048 "
-                                                + "(inclusive)");
+        // Re-uses DSA parameters and thus have the same range
+        try {
+            checkKeySize(keysize);
+        } catch (InvalidAlgorithmParameterException ex) {
+            throw new InvalidParameterException(ex.getMessage());
         }
         this.primeSize = keysize;
         this.random = random;
@@ -91,31 +101,29 @@
     protected void engineInit(AlgorithmParameterSpec genParamSpec,
                               SecureRandom random)
         throws InvalidAlgorithmParameterException {
-            if (!(genParamSpec instanceof DHGenParameterSpec)) {
-                throw new InvalidAlgorithmParameterException
-                    ("Inappropriate parameter type");
-            }
+        if (!(genParamSpec instanceof DHGenParameterSpec)) {
+            throw new InvalidAlgorithmParameterException
+                ("Inappropriate parameter type");
+        }
 
-            DHGenParameterSpec dhParamSpec = (DHGenParameterSpec)genParamSpec;
+        DHGenParameterSpec dhParamSpec = (DHGenParameterSpec)genParamSpec;
+
+        primeSize = dhParamSpec.getPrimeSize();
+
+        // Re-uses DSA parameters and thus have the same range
+        checkKeySize(primeSize);
 
-            primeSize = dhParamSpec.getPrimeSize();
-            if ((primeSize<512) || (primeSize>2048) || (primeSize%64 != 0)) {
-                throw new InvalidAlgorithmParameterException
-                    ("Modulus size must be multiple of 64, and can only range "
-                     + "from 512 to 2048 (inclusive)");
-            }
+        exponentSize = dhParamSpec.getExponentSize();
+        if (exponentSize <= 0) {
+            throw new InvalidAlgorithmParameterException
+                ("Exponent size must be greater than zero");
+        }
 
-            exponentSize = dhParamSpec.getExponentSize();
-            if (exponentSize <= 0) {
-                throw new InvalidAlgorithmParameterException
-                    ("Exponent size must be greater than zero");
-            }
-
-            // Require exponentSize < primeSize
-            if (exponentSize >= primeSize) {
-                throw new InvalidAlgorithmParameterException
-                    ("Exponent size must be less than modulus size");
-            }
+        // Require exponentSize < primeSize
+        if (exponentSize >= primeSize) {
+            throw new InvalidAlgorithmParameterException
+                ("Exponent size must be less than modulus size");
+        }
     }
 
     /**
--- a/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/crypto/provider/ElectronicCodeBook.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/ElectronicCodeBook.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, 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
@@ -115,14 +115,15 @@
      * @param len the length of the input data
      * @param out the buffer for the result
      * @param outOff the offset in <code>cipher</code>
+     * @return the length of the encrypted data
      */
-    void encrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
-        while (len >= blockSize) {
+    int encrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
+        for (int i = len; i >= blockSize; i -= blockSize) {
             embeddedCipher.encryptBlock(in, inOff, out, outOff);
-            len -= blockSize;
             inOff += blockSize;
             outOff += blockSize;
         }
+        return len;
     }
 
     /**
@@ -147,14 +148,14 @@
      * @param len the length of the input data
      * @param out the buffer for the result
      * @param outOff the offset in <code>plain</code>
+     * @return the length of the decrypted data
      */
-    void decrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
-        while (len >= blockSize) {
+    int decrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
+        for (int i = len; i >= blockSize; i -= blockSize) {
             embeddedCipher.decryptBlock(in, inOff, out, outOff);
-            len -= blockSize;
             inOff += blockSize;
             outOff += blockSize;
         }
+        return len;
     }
-
 }
--- a/src/share/classes/com/sun/crypto/provider/FeedbackCipher.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/FeedbackCipher.java	Fri Oct 25 10:39:13 2013 -0700
@@ -133,9 +133,10 @@
      * @param plainLen the length of the input data
      * @param cipher the buffer for the encryption result
      * @param cipherOffset the offset in <code>cipher</code>
+     * @return the number of bytes placed into <code>cipher</code>
      */
-    abstract void encrypt(byte[] plain, int plainOffset, int plainLen,
-                          byte[] cipher, int cipherOffset);
+    abstract int encrypt(byte[] plain, int plainOffset, int plainLen,
+                         byte[] cipher, int cipherOffset);
     /**
      * Performs encryption operation for the last time.
      *
@@ -154,10 +155,9 @@
      */
      int encryptFinal(byte[] plain, int plainOffset, int plainLen,
                       byte[] cipher, int cipherOffset)
-         throws IllegalBlockSizeException {
-         encrypt(plain, plainOffset, plainLen, cipher, cipherOffset);
-         return plainLen;
-     }
+         throws IllegalBlockSizeException, ShortBufferException {
+         return encrypt(plain, plainOffset, plainLen, cipher, cipherOffset);
+    }
     /**
      * Performs decryption operation.
      *
@@ -174,9 +174,10 @@
      * @param cipherLen the length of the input data
      * @param plain the buffer for the decryption result
      * @param plainOffset the offset in <code>plain</code>
+     * @return the number of bytes placed into <code>plain</code>
      */
-    abstract void decrypt(byte[] cipher, int cipherOffset, int cipherLen,
-                          byte[] plain, int plainOffset);
+    abstract int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
+                         byte[] plain, int plainOffset);
 
     /**
      * Performs decryption operation for the last time.
@@ -196,9 +197,9 @@
      */
      int decryptFinal(byte[] cipher, int cipherOffset, int cipherLen,
                       byte[] plain, int plainOffset)
-         throws IllegalBlockSizeException, AEADBadTagException {
-         decrypt(cipher, cipherOffset, cipherLen, plain, plainOffset);
-         return cipherLen;
+         throws IllegalBlockSizeException, AEADBadTagException,
+         ShortBufferException {
+         return decrypt(cipher, cipherOffset, cipherLen, plain, plainOffset);
      }
 
     /**
@@ -228,4 +229,15 @@
     void updateAAD(byte[] src, int offset, int len) {
         throw new IllegalStateException("No AAD accepted");
     }
+
+    /**
+     * @return the number of bytes that are buffered internally inside
+     * this FeedbackCipher instance.
+     * @since 1.8
+     */
+    int getBufferedLength() {
+        // Currently only AEAD cipher impl, e.g. GCM, buffers data
+        // internally during decryption mode
+        return 0;
+    }
 }
--- a/src/share/classes/com/sun/crypto/provider/GCTR.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/GCTR.java	Fri Oct 25 10:39:13 2013 -0700
@@ -54,7 +54,7 @@
     private byte[] counter;
 
     // needed for save/restore calls
-    private byte[] counterSave;
+    private byte[] counterSave = null;
 
     // NOTE: cipher should already be initialized
     GCTR(SymmetricCipher cipher, byte[] initialCounterBlk) {
@@ -98,17 +98,16 @@
                 throw new IllegalBlockSizeException("Negative input size!");
             } else if (inLen > 0) {
                 int lastBlockSize = inLen % AES_BLOCK_SIZE;
+                int completeBlkLen = inLen - lastBlockSize;
                 // process the complete blocks first
-                update(in, inOfs, inLen - lastBlockSize, out, outOfs);
+                update(in, inOfs, completeBlkLen, out, outOfs);
                 if (lastBlockSize != 0) {
                     // do the last partial block
                     byte[] encryptedCntr = new byte[AES_BLOCK_SIZE];
                     aes.encryptBlock(counter, 0, encryptedCntr, 0);
-
-                    int processed = inLen - lastBlockSize;
                     for (int n = 0; n < lastBlockSize; n++) {
-                        out[outOfs + processed + n] =
-                            (byte) ((in[inOfs + processed + n] ^
+                        out[outOfs + completeBlkLen + n] =
+                            (byte) ((in[inOfs + completeBlkLen + n] ^
                                      encryptedCntr[n]));
                     }
                 }
@@ -120,12 +119,11 @@
     }
 
     /**
-     * Resets the current counter to its initial value.
-     * This is used after the doFinal() is called so this object can be
-     * reused w/o explicit re-initialization.
+     * Resets the content of this object to when it's first constructed.
      */
     void reset() {
         System.arraycopy(icb, 0, counter, 0, icb.length);
+        counterSave = null;
     }
 
     /**
--- a/src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,10 +35,12 @@
  * This class represents ciphers in GaloisCounter (GCM) mode.
  *
  * <p>This mode currently should only be used w/ AES cipher.
- * Although no checking is done here, caller should only
- * pass AES Cipher to the constructor.
+ * Although no checking is done, caller should only pass AES
+ * Cipher to the constructor.
  *
- * <p>NOTE: This class does not deal with buffering or padding.
+ * <p>NOTE: Unlike other modes, when used for decryption, this class
+ * will buffer all processed outputs internally and won't return them
+ * until the tag has been successfully verified.
  *
  * @since 1.8
  */
@@ -51,6 +53,9 @@
     private ByteArrayOutputStream aadBuffer = new ByteArrayOutputStream();
     private int sizeOfAAD = 0;
 
+    // buffer for storing input in decryption, not used for encryption
+    private ByteArrayOutputStream ibuffer = null;
+
     // in bytes; need to convert to bits (default value 128) when needed
     private int tagLenBytes = DEFAULT_TAG_LEN;
 
@@ -68,12 +73,14 @@
     // additional variables for save/restore calls
     private byte[] aadBufferSave = null;
     private int sizeOfAADSave = 0;
+    private byte[] ibufferSave = null;
     private int processedSave = 0;
 
     // value must be 16-byte long; used by GCTR and GHASH as well
     static void increment32(byte[] value) {
         if (value.length != AES_BLOCK_SIZE) {
-            throw new RuntimeException("Unexpected counter block length");
+            // should never happen
+            throw new ProviderException("Illegal counter block length");
         }
         // start from last byte and only go over 4 bytes, i.e. total 32 bits
         int n = value.length - 1;
@@ -171,6 +178,9 @@
         if (ghashAllToS != null) ghashAllToS.reset();
         processed = 0;
         sizeOfAAD = 0;
+        if (ibuffer != null) {
+            ibuffer.reset();
+        }
     }
 
     /**
@@ -184,6 +194,9 @@
              null : aadBuffer.toByteArray());
         if (gctrPAndC != null) gctrPAndC.save();
         if (ghashAllToS != null) ghashAllToS.save();
+        if (ibuffer != null) {
+            ibufferSave = ibuffer.toByteArray();
+        }
     }
 
     /**
@@ -198,8 +211,12 @@
                 aadBuffer.write(aadBufferSave, 0, aadBufferSave.length);
             }
         }
-       if (gctrPAndC != null) gctrPAndC.restore();
-       if (ghashAllToS != null) ghashAllToS.restore();
+        if (gctrPAndC != null) gctrPAndC.restore();
+        if (ghashAllToS != null) ghashAllToS.restore();
+        if (ibuffer != null) {
+            ibuffer.reset();
+            ibuffer.write(ibufferSave, 0, ibufferSave.length);
+        }
     }
 
     /**
@@ -261,6 +278,9 @@
         }
         processed = 0;
         sizeOfAAD = 0;
+        if (decrypting) {
+            ibuffer = new ByteArrayOutputStream();
+        }
     }
 
     /**
@@ -299,7 +319,7 @@
 
     // Feed the AAD data to GHASH, pad if necessary
     void processAAD() {
-        if (aadBuffer != null) {
+        if (aadBuffer != null && aadBuffer.size() > 0) {
             byte[] aad = aadBuffer.toByteArray();
             sizeOfAAD = aad.length;
             aadBuffer = null;
@@ -365,13 +385,14 @@
      * @param out the buffer for the result
      * @param outOfs the offset in <code>out</code>
      */
-    void encrypt(byte[] in, int inOfs, int len, byte[] out, int outOfs) {
+    int encrypt(byte[] in, int inOfs, int len, byte[] out, int outOfs) {
         processAAD();
         if (len > 0) {
             gctrPAndC.update(in, inOfs, len, out, outOfs);
             processed += len;
             ghashAllToS.update(out, outOfs, len);
         }
+        return len;
     }
 
     /**
@@ -387,28 +408,28 @@
      * @param outOfs the offset in <code>out</code>
      * @return the number of bytes placed into the <code>out</code> buffer
      */
-     int encryptFinal(byte[] in, int inOfs, int len, byte[] out, int outOfs)
-         throws IllegalBlockSizeException {
-         if (out.length - outOfs < (len + tagLenBytes)) {
-             throw new RuntimeException("Output buffer too small");
-         }
+    int encryptFinal(byte[] in, int inOfs, int len, byte[] out, int outOfs)
+        throws IllegalBlockSizeException, ShortBufferException {
+        if (out.length - outOfs < (len + tagLenBytes)) {
+            throw new ShortBufferException("Output buffer too small");
+        }
+
+        processAAD();
+        if (len > 0) {
+            doLastBlock(in, inOfs, len, out, outOfs, true);
+        }
 
-         processAAD();
-         if (len > 0) {
-             //ByteUtil.dumpArray(Arrays.copyOfRange(in, inOfs, inOfs + len));
-             doLastBlock(in, inOfs, len, out, outOfs, true);
-         }
+        byte[] lengthBlock =
+            getLengthBlock(sizeOfAAD*8, processed*8);
+        ghashAllToS.update(lengthBlock);
+        byte[] s = ghashAllToS.digest();
+        byte[] sOut = new byte[s.length];
+        GCTR gctrForSToTag = new GCTR(embeddedCipher, this.preCounterBlock);
+        gctrForSToTag.doFinal(s, 0, s.length, sOut, 0);
 
-         byte[] lengthBlock = getLengthBlock(sizeOfAAD*8, processed*8);
-         ghashAllToS.update(lengthBlock);
-         byte[] s = ghashAllToS.digest();
-         byte[] sOut = new byte[s.length];
-         GCTR gctrForSToTag = new GCTR(embeddedCipher, this.preCounterBlock);
-         gctrForSToTag.doFinal(s, 0, s.length, sOut, 0);
-
-         System.arraycopy(sOut, 0, out, (outOfs + len), tagLenBytes);
-         return (len + tagLenBytes);
-     }
+        System.arraycopy(sOut, 0, out, (outOfs + len), tagLenBytes);
+        return (len + tagLenBytes);
+    }
 
     /**
      * Performs decryption operation.
@@ -432,14 +453,16 @@
      * @param out the buffer for the result
      * @param outOfs the offset in <code>out</code>
      */
-    void decrypt(byte[] in, int inOfs, int len, byte[] out, int outOfs) {
+    int decrypt(byte[] in, int inOfs, int len, byte[] out, int outOfs) {
         processAAD();
 
-        if (len > 0) { // must be at least AES_BLOCK_SIZE bytes long
-            gctrPAndC.update(in, inOfs, len, out, outOfs);
-            processed += len;
-            ghashAllToS.update(in, inOfs, len);
+        if (len > 0) {
+            // store internally until decryptFinal is called because
+            // spec mentioned that only return recovered data after tag
+            // is successfully verified
+            ibuffer.write(in, inOfs, len);
         }
+        return 0;
     }
 
     /**
@@ -458,44 +481,62 @@
      * @param outOfs the offset in <code>plain</code>
      * @return the number of bytes placed into the <code>out</code> buffer
      */
-     int decryptFinal(byte[] in, int inOfs, int len,
-                      byte[] out, int outOfs)
-         throws IllegalBlockSizeException, AEADBadTagException {
-         if (len < tagLenBytes) {
-             throw new RuntimeException("Input buffer too short - need tag");
-         }
-         if (out.length - outOfs < (len - tagLenBytes)) {
-             throw new RuntimeException("Output buffer too small");
-         }
-         processAAD();
+    int decryptFinal(byte[] in, int inOfs, int len,
+                     byte[] out, int outOfs)
+        throws IllegalBlockSizeException, AEADBadTagException,
+        ShortBufferException {
+        if (len < tagLenBytes) {
+            throw new AEADBadTagException("Input too short - need tag");
+        }
+        if (out.length - outOfs < ((ibuffer.size() + len) - tagLenBytes)) {
+            throw new ShortBufferException("Output buffer too small");
+        }
+        processAAD();
+        if (len != 0) {
+            ibuffer.write(in, inOfs, len);
+        }
 
-         int processedOld = processed;
-         byte[] tag = new byte[tagLenBytes];
-         // get the trailing tag bytes from 'in'
-         System.arraycopy(in, inOfs + len - tagLenBytes, tag, 0, tagLenBytes);
-         len -= tagLenBytes;
+        // refresh 'in' to all buffered-up bytes
+        in = ibuffer.toByteArray();
+        inOfs = 0;
+        len = in.length;
+        ibuffer.reset();
 
-         if (len > 0) {
-             doLastBlock(in, inOfs, len, out, outOfs, false);
-         }
+        byte[] tag = new byte[tagLenBytes];
+        // get the trailing tag bytes from 'in'
+        System.arraycopy(in, len - tagLenBytes, tag, 0, tagLenBytes);
+        len -= tagLenBytes;
 
-         byte[] lengthBlock = getLengthBlock(sizeOfAAD*8, processed*8);
-         ghashAllToS.update(lengthBlock);
+        if (len > 0) {
+            doLastBlock(in, inOfs, len, out, outOfs, false);
+        }
 
-         byte[] s = ghashAllToS.digest();
-         byte[] sOut = new byte[s.length];
-         GCTR gctrForSToTag = new GCTR(embeddedCipher, this.preCounterBlock);
-         gctrForSToTag.doFinal(s, 0, s.length, sOut, 0);
-         for (int i = 0; i < tagLenBytes; i++) {
-             if (tag[i] != sOut[i]) {
-                 throw new AEADBadTagException("Tag mismatch!");
-             }
-         }
-         return len;
-     }
+        byte[] lengthBlock =
+            getLengthBlock(sizeOfAAD*8, processed*8);
+        ghashAllToS.update(lengthBlock);
+
+        byte[] s = ghashAllToS.digest();
+        byte[] sOut = new byte[s.length];
+        GCTR gctrForSToTag = new GCTR(embeddedCipher, this.preCounterBlock);
+        gctrForSToTag.doFinal(s, 0, s.length, sOut, 0);
+        for (int i = 0; i < tagLenBytes; i++) {
+            if (tag[i] != sOut[i]) {
+                throw new AEADBadTagException("Tag mismatch!");
+            }
+        }
+        return len;
+    }
 
     // return tag length in bytes
     int getTagLen() {
         return this.tagLenBytes;
     }
+
+    int getBufferedLength() {
+        if (ibuffer == null) {
+            return 0;
+        } else {
+            return ibuffer.size();
+        }
+    }
 }
--- a/src/share/classes/com/sun/crypto/provider/OutputFeedback.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/OutputFeedback.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, 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
@@ -149,9 +149,10 @@
      * @param plainLen the length of the input data
      * @param cipher the buffer for the result
      * @param cipherOffset the offset in <code>cipher</code>
+     * @return the length of the encrypted data
      */
-    void encrypt(byte[] plain, int plainOffset, int plainLen,
-                        byte[] cipher, int cipherOffset)
+    int encrypt(byte[] plain, int plainOffset, int plainLen,
+                byte[] cipher, int cipherOffset)
     {
         int i;
         int len = blockSize - numBytes;
@@ -195,6 +196,7 @@
                 System.arraycopy(k, 0, register, len, numBytes);
             }
         }
+        return plainLen;
     }
 
     /**
@@ -219,11 +221,12 @@
      * @param cipherLen the length of the input data
      * @param plain the buffer for the result
      * @param plainOffset the offset in <code>plain</code>
+     * @return the length of the decrypted data
      */
-    void decrypt(byte[] cipher, int cipherOffset, int cipherLen,
+    int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
                         byte[] plain, int plainOffset)
     {
         // OFB encrypt and decrypt are identical
-        encrypt(cipher, cipherOffset, cipherLen, plain, plainOffset);
+        return encrypt(cipher, cipherOffset, cipherLen, plain, plainOffset);
     }
 }
--- a/src/share/classes/com/sun/crypto/provider/PCBC.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/crypto/provider/PCBC.java	Fri Oct 25 10:39:13 2013 -0700
@@ -136,8 +136,8 @@
      * @param cipher the buffer for the result
      * @param cipherOffset the offset in <code>cipher</code>
      */
-    void encrypt(byte[] plain, int plainOffset, int plainLen,
-                        byte[] cipher, int cipherOffset)
+    int encrypt(byte[] plain, int plainOffset, int plainLen,
+                byte[] cipher, int cipherOffset)
     {
         int i;
         int endIndex = plainOffset + plainLen;
@@ -152,6 +152,7 @@
                 k[i] = (byte)(plain[i+plainOffset] ^ cipher[i+cipherOffset]);
             }
         }
+        return plainLen;
     }
 
     /**
@@ -177,8 +178,8 @@
      * @param plain the buffer for the result
      * @param plainOffset the offset in <code>plain</code>
      */
-    void decrypt(byte[] cipher, int cipherOffset, int cipherLen,
-                        byte[] plain, int plainOffset)
+    int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
+                byte[] plain, int plainOffset)
     {
         int i;
         int endIndex = cipherOffset + cipherLen;
@@ -194,5 +195,6 @@
                 k[i] = (byte)(plain[i+plainOffset] ^ cipher[i+cipherOffset]);
             }
         }
+        return cipherLen;
     }
 }
--- a/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/jdi/AbsentInformationException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/AbsentInformationException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -31,6 +31,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class AbsentInformationException extends Exception
 {
     private static final long serialVersionUID = 4988939309582416373L;
--- a/src/share/classes/com/sun/jdi/Accessible.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Accessible.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,6 +36,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface Accessible {
 
     /**
--- a/src/share/classes/com/sun/jdi/ArrayReference.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ArrayReference.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface ArrayReference extends ObjectReference {
 
     /**
--- a/src/share/classes/com/sun/jdi/ArrayType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ArrayType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -38,6 +38,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface ArrayType extends ReferenceType {
 
     /**
--- a/src/share/classes/com/sun/jdi/BooleanType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/BooleanType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,5 +35,6 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface BooleanType extends PrimitiveType {
 }
--- a/src/share/classes/com/sun/jdi/BooleanValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/BooleanValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,8 +34,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface BooleanValue extends PrimitiveValue
-{
+@jdk.Exported
+public interface BooleanValue extends PrimitiveValue {
+
     /**
      * Returns this BooleanValue as a boolean.
      *
--- a/src/share/classes/com/sun/jdi/Bootstrap.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Bootstrap.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,6 +34,7 @@
  * @since  1.3
  */
 
+@jdk.Exported
 public class Bootstrap extends Object {
 
     /**
--- a/src/share/classes/com/sun/jdi/ByteType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ByteType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,6 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface ByteType extends PrimitiveType
-{
+@jdk.Exported
+public interface ByteType extends PrimitiveType {
 }
--- a/src/share/classes/com/sun/jdi/ByteValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ByteValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -33,8 +33,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface ByteValue extends PrimitiveValue, Comparable<ByteValue>
-{
+@jdk.Exported
+public interface ByteValue extends PrimitiveValue, Comparable<ByteValue> {
+
     /**
      * Returns this ByteValue as a <code>byte</code>.
      *
--- a/src/share/classes/com/sun/jdi/CharType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/CharType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,6 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface CharType extends PrimitiveType
-{
+@jdk.Exported
+public interface CharType extends PrimitiveType {
 }
--- a/src/share/classes/com/sun/jdi/CharValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/CharValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,8 +34,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface CharValue extends PrimitiveValue, Comparable<CharValue>
-{
+@jdk.Exported
+public interface CharValue extends PrimitiveValue, Comparable<CharValue> {
+
     /**
      * Returns this CharValue as a <code>char</code>.
      *
--- a/src/share/classes/com/sun/jdi/ClassLoaderReference.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ClassLoaderReference.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface ClassLoaderReference extends ObjectReference {
 
     /**
--- a/src/share/classes/com/sun/jdi/ClassNotLoadedException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ClassNotLoadedException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -67,6 +67,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class ClassNotLoadedException extends Exception
 {
     private static final long serialVersionUID = -6242978768444298722L;
--- a/src/share/classes/com/sun/jdi/ClassNotPreparedException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ClassNotPreparedException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class ClassNotPreparedException extends RuntimeException {
     private static final long serialVersionUID = -6120698967144079642L;
     public ClassNotPreparedException()
--- a/src/share/classes/com/sun/jdi/ClassObjectReference.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ClassObjectReference.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface ClassObjectReference extends ObjectReference {
 
     /**
--- a/src/share/classes/com/sun/jdi/ClassType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ClassType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -41,6 +41,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface ClassType extends ReferenceType {
     /**
      * Gets the superclass of this class.
--- a/src/share/classes/com/sun/jdi/DoubleType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/DoubleType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,6 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface DoubleType extends PrimitiveType
-{
+@jdk.Exported
+public interface DoubleType extends PrimitiveType {
 }
--- a/src/share/classes/com/sun/jdi/DoubleValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/DoubleValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,8 +34,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface DoubleValue extends PrimitiveValue, Comparable<DoubleValue>
-{
+@jdk.Exported
+public interface DoubleValue extends PrimitiveValue, Comparable<DoubleValue> {
+
     /**
      * Returns this DoubleValue as a <code>double</code>.
      *
--- a/src/share/classes/com/sun/jdi/Field.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Field.java	Fri Oct 25 10:39:13 2013 -0700
@@ -38,6 +38,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface Field extends TypeComponent, Comparable<Field> {
 
     /**
--- a/src/share/classes/com/sun/jdi/FloatType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/FloatType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,6 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface FloatType extends PrimitiveType
-{
+@jdk.Exported
+public interface FloatType extends PrimitiveType {
 }
--- a/src/share/classes/com/sun/jdi/FloatValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/FloatValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,8 +34,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface FloatValue extends PrimitiveValue, Comparable<FloatValue>
-{
+@jdk.Exported
+public interface FloatValue extends PrimitiveValue, Comparable<FloatValue> {
+
     /**
      * Returns this FloatValue as a float.
      *
--- a/src/share/classes/com/sun/jdi/IncompatibleThreadStateException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/IncompatibleThreadStateException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,16 +32,15 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
-public class IncompatibleThreadStateException extends Exception
-{
+@jdk.Exported
+public class IncompatibleThreadStateException extends Exception {
     private static final long serialVersionUID = 6199174323414551389L;
-    public IncompatibleThreadStateException()
-    {
+
+    public IncompatibleThreadStateException() {
         super();
     }
 
-    public IncompatibleThreadStateException(String s)
-    {
+    public IncompatibleThreadStateException(String s) {
         super(s);
     }
 }
--- a/src/share/classes/com/sun/jdi/InconsistentDebugInfoException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/InconsistentDebugInfoException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,6 +34,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class InconsistentDebugInfoException extends RuntimeException {
     private static final long serialVersionUID = 7964236415376861808L;
     public InconsistentDebugInfoException() {
--- a/src/share/classes/com/sun/jdi/IntegerType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/IntegerType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,6 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface IntegerType extends PrimitiveType
-{
+@jdk.Exported
+public interface IntegerType extends PrimitiveType {
 }
--- a/src/share/classes/com/sun/jdi/IntegerValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/IntegerValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,8 +34,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface IntegerValue extends PrimitiveValue, Comparable<IntegerValue>
-{
+@jdk.Exported
+public interface IntegerValue extends PrimitiveValue, Comparable<IntegerValue> {
+
     /**
      * Returns this IntegerValue as an int.
      *
--- a/src/share/classes/com/sun/jdi/InterfaceType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/InterfaceType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,6 +43,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface InterfaceType extends ReferenceType {
     /**
      * Gets the interfaces directly extended by this interface.
--- a/src/share/classes/com/sun/jdi/InternalException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/InternalException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class InternalException extends RuntimeException {
      private static final long serialVersionUID = -9171606393104480607L;
      private int errorCode;
--- a/src/share/classes/com/sun/jdi/InvalidCodeIndexException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/InvalidCodeIndexException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,6 +34,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 @Deprecated
 public class InvalidCodeIndexException extends RuntimeException {
     private static final long serialVersionUID = 7416010225133747805L;
--- a/src/share/classes/com/sun/jdi/InvalidLineNumberException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/InvalidLineNumberException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,6 +34,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 @Deprecated
 public class InvalidLineNumberException extends RuntimeException {
     private static final long serialVersionUID = 4048709912372692875L;
--- a/src/share/classes/com/sun/jdi/InvalidStackFrameException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/InvalidStackFrameException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class InvalidStackFrameException extends RuntimeException {
     private static final long serialVersionUID = -1919378296505827922L;
     public InvalidStackFrameException() {
--- a/src/share/classes/com/sun/jdi/InvalidTypeException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/InvalidTypeException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,16 +32,15 @@
  * @author James McIlree
  * @since  1.3
  */
-public class InvalidTypeException extends Exception
-{
+@jdk.Exported
+public class InvalidTypeException extends Exception {
     private static final long serialVersionUID = 2256667231949650806L;
-    public InvalidTypeException()
-    {
+
+    public InvalidTypeException() {
         super();
     }
 
-    public InvalidTypeException(String s)
-    {
+    public InvalidTypeException(String s) {
         super(s);
     }
 }
--- a/src/share/classes/com/sun/jdi/InvocationException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/InvocationException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,19 +32,17 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
-public class InvocationException extends Exception
-{
+@jdk.Exported
+public class InvocationException extends Exception {
     private static final long serialVersionUID = 6066780907971918568L;
     ObjectReference exception;
 
-    public InvocationException(ObjectReference exception)
-    {
+    public InvocationException(ObjectReference exception) {
         super("Exception occurred in target VM");
         this.exception = exception;
     }
 
-    public ObjectReference exception()
-    {
+    public ObjectReference exception() {
         return exception;
     }
 }
--- a/src/share/classes/com/sun/jdi/JDIPermission.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/JDIPermission.java	Fri Oct 25 10:39:13 2013 -0700
@@ -78,6 +78,7 @@
  *
  */
 
+@jdk.Exported
 public final class JDIPermission extends java.security.BasicPermission {
     private static final long serialVersionUID = -6988461416938786271L;
     /**
--- a/src/share/classes/com/sun/jdi/LocalVariable.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/LocalVariable.java	Fri Oct 25 10:39:13 2013 -0700
@@ -42,6 +42,7 @@
  * @since  1.3
  */
 
+@jdk.Exported
 public interface LocalVariable extends Mirror, Comparable<LocalVariable> {
 
     /**
--- a/src/share/classes/com/sun/jdi/Locatable.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Locatable.java	Fri Oct 25 10:39:13 2013 -0700
@@ -33,6 +33,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface Locatable {
     /**
      * Returns the {@link Location} of this mirror, if there
--- a/src/share/classes/com/sun/jdi/Location.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Location.java	Fri Oct 25 10:39:13 2013 -0700
@@ -86,6 +86,7 @@
  * @author James McIlree
  * @since 1.3
  */
+@jdk.Exported
 public interface Location extends Mirror, Comparable<Location> {
 
     /**
--- a/src/share/classes/com/sun/jdi/LongType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/LongType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,6 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface LongType extends PrimitiveType
-{
+@jdk.Exported
+public interface LongType extends PrimitiveType {
 }
--- a/src/share/classes/com/sun/jdi/LongValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/LongValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,8 +34,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface LongValue extends PrimitiveValue, Comparable<LongValue>
-{
+@jdk.Exported
+public interface LongValue extends PrimitiveValue, Comparable<LongValue> {
+
     /**
      * Returns this LongValue as a long.
      *
--- a/src/share/classes/com/sun/jdi/Method.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Method.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface Method extends TypeComponent, Locatable, Comparable<Method> {
 
     /**
--- a/src/share/classes/com/sun/jdi/Mirror.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Mirror.java	Fri Oct 25 10:39:13 2013 -0700
@@ -56,6 +56,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface Mirror {
 
     /**
--- a/src/share/classes/com/sun/jdi/MonitorInfo.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/MonitorInfo.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @since  1.6
  */
 
+@jdk.Exported
 public interface MonitorInfo extends Mirror {
 
     /**
--- a/src/share/classes/com/sun/jdi/NativeMethodException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/NativeMethodException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class NativeMethodException extends RuntimeException {
 
     private static final long serialVersionUID = 3924951669039469992L;
--- a/src/share/classes/com/sun/jdi/ObjectCollectedException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ObjectCollectedException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class ObjectCollectedException extends RuntimeException {
     private static final long serialVersionUID = -1928428056197269588L;
     public ObjectCollectedException() {
--- a/src/share/classes/com/sun/jdi/ObjectReference.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ObjectReference.java	Fri Oct 25 10:39:13 2013 -0700
@@ -55,8 +55,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface ObjectReference extends Value
-{
+@jdk.Exported
+public interface ObjectReference extends Value {
+
     /**
      * Gets the {@link ReferenceType} that mirrors the type
      * of this object. The type may be a subclass or implementor of the
--- a/src/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java	Fri Oct 25 10:39:13 2013 -0700
@@ -33,6 +33,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface PathSearchingVirtualMachine extends VirtualMachine {
     /**
      * Get the class path for this virtual machine.
--- a/src/share/classes/com/sun/jdi/PrimitiveType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/PrimitiveType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -37,5 +37,6 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface PrimitiveType extends Type {
 }
--- a/src/share/classes/com/sun/jdi/PrimitiveValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/PrimitiveValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,8 +35,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface PrimitiveValue extends Value
-{
+@jdk.Exported
+public interface PrimitiveValue extends Value {
+
     /**
      * Converts this value to a BooleanValue and returns the result
      * as a boolean.
--- a/src/share/classes/com/sun/jdi/ReferenceType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ReferenceType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -77,6 +77,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface ReferenceType
     extends Type, Comparable<ReferenceType>, Accessible
 {
--- a/src/share/classes/com/sun/jdi/ShortType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ShortType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,5 +35,6 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface ShortType extends PrimitiveType {
 }
--- a/src/share/classes/com/sun/jdi/ShortValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ShortValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,8 +34,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface ShortValue extends PrimitiveValue, Comparable<ShortValue>
-{
+@jdk.Exported
+public interface ShortValue extends PrimitiveValue, Comparable<ShortValue> {
+
     /**
      * Returns this ShortValue as a short.
      *
--- a/src/share/classes/com/sun/jdi/StackFrame.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/StackFrame.java	Fri Oct 25 10:39:13 2013 -0700
@@ -58,8 +58,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface StackFrame extends Mirror, Locatable
-{
+@jdk.Exported
+public interface StackFrame extends Mirror, Locatable {
+
     /**
      * Returns the {@link Location} of the current instruction in the frame.
      * The method for which this frame was created can also be accessed
--- a/src/share/classes/com/sun/jdi/StringReference.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/StringReference.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,8 +35,8 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface StringReference extends ObjectReference
-{
+@jdk.Exported
+public interface StringReference extends ObjectReference {
     /**
      * Returns the StringReference as a String. The returned string
      * is the equivalent of the mirrored string, but is an entity in the
--- a/src/share/classes/com/sun/jdi/ThreadGroupReference.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ThreadGroupReference.java	Fri Oct 25 10:39:13 2013 -0700
@@ -37,8 +37,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface ThreadGroupReference extends ObjectReference
-{
+@jdk.Exported
+public interface ThreadGroupReference extends ObjectReference {
+
     /**
      * Returns the name of this thread group.
      *
--- a/src/share/classes/com/sun/jdi/ThreadReference.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/ThreadReference.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,8 +36,8 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface ThreadReference extends ObjectReference
-{
+@jdk.Exported
+public interface ThreadReference extends ObjectReference {
     /** Thread status is unknown */
     public final int THREAD_STATUS_UNKNOWN  =-1;
     /** Thread has completed execution */
--- a/src/share/classes/com/sun/jdi/Type.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Type.java	Fri Oct 25 10:39:13 2013 -0700
@@ -127,8 +127,9 @@
  * @author James McIlree
  * @since  1.3
  */
-public interface Type extends Mirror
-{
+@jdk.Exported
+public interface Type extends Mirror {
+
     /**
      * Returns the JNI-style signature for this type.
      * <p>
--- a/src/share/classes/com/sun/jdi/TypeComponent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/TypeComponent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface TypeComponent extends Mirror, Accessible {
 
     /**
--- a/src/share/classes/com/sun/jdi/VMCannotBeModifiedException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/VMCannotBeModifiedException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author Jim Holmlund
  * @since  1.5
  */
+@jdk.Exported
 public class VMCannotBeModifiedException extends UnsupportedOperationException {
     private static final long serialVersionUID = -4063879815130164009L;
     public VMCannotBeModifiedException() {
--- a/src/share/classes/com/sun/jdi/VMDisconnectedException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/VMDisconnectedException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -33,6 +33,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public class VMDisconnectedException extends RuntimeException {
 
     private static final long serialVersionUID = 2892975269768351637L;
--- a/src/share/classes/com/sun/jdi/VMMismatchException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/VMMismatchException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -33,6 +33,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class VMMismatchException extends RuntimeException {
     private static final long serialVersionUID = 289169358790459564L;
     public VMMismatchException() {
--- a/src/share/classes/com/sun/jdi/VMOutOfMemoryException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/VMOutOfMemoryException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public class VMOutOfMemoryException extends RuntimeException {
     private static final long serialVersionUID = 71504228548910686L;
     public VMOutOfMemoryException() {
--- a/src/share/classes/com/sun/jdi/Value.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/Value.java	Fri Oct 25 10:39:13 2013 -0700
@@ -168,8 +168,8 @@
  * @since  1.3
  */
 
-public interface Value extends Mirror
-{
+@jdk.Exported
+public interface Value extends Mirror {
     /**
      * Returns the run-time type of this value.
      *
--- a/src/share/classes/com/sun/jdi/VirtualMachine.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/VirtualMachine.java	Fri Oct 25 10:39:13 2013 -0700
@@ -70,6 +70,7 @@
  * @author James McIlree
  * @since  1.3
  */
+@jdk.Exported
 public interface VirtualMachine extends Mirror {
 
     /**
--- a/src/share/classes/com/sun/jdi/VirtualMachineManager.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/VirtualMachineManager.java	Fri Oct 25 10:39:13 2013 -0700
@@ -271,6 +271,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface VirtualMachineManager {
 
     /**
--- a/src/share/classes/com/sun/jdi/VoidType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/VoidType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,5 +35,6 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface VoidType extends Type {
 }
--- a/src/share/classes/com/sun/jdi/VoidValue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/VoidValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface VoidValue extends Value {
 
     /**
--- a/src/share/classes/com/sun/jdi/connect/AttachingConnector.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/AttachingConnector.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface AttachingConnector extends Connector {
     /**
      * Attaches to a running application and and returns a
--- a/src/share/classes/com/sun/jdi/connect/Connector.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/Connector.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface Connector {
     /**
      * Returns a short identifier for the connector. Connector implementors
@@ -91,6 +92,7 @@
      * {@link Connector.IntegerArgument},
      * or {@link Connector.SelectedArgument}.
      */
+    @jdk.Exported
     public interface Argument extends Serializable {
         /**
          * Returns a short, unique identifier for the argument.
@@ -156,6 +158,7 @@
      * whose value is Boolean.  Boolean values are represented
      * by the localized versions of the strings "true" and "false".
      */
+    @jdk.Exported
     public interface BooleanArgument extends Argument {
         /**
          * Sets the value of the argument.
@@ -196,6 +199,7 @@
      * whose value is an integer.  Integer values are represented
      * by their corresponding strings.
      */
+    @jdk.Exported
     public interface IntegerArgument extends Argument {
         /**
          * Sets the value of the argument.
@@ -257,6 +261,7 @@
      * Specification for and value of a Connector argument,
      * whose value is a String.
      */
+    @jdk.Exported
     public interface StringArgument extends Argument {
         /**
          * Performs basic sanity check of argument.
@@ -269,6 +274,7 @@
      * Specification for and value of a Connector argument,
      * whose value is a String selected from a list of choices.
      */
+    @jdk.Exported
     public interface SelectedArgument extends Argument {
         /**
          * Return the possible values for the argument
--- a/src/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,8 +36,9 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
-public class IllegalConnectorArgumentsException extends Exception
-{
+@jdk.Exported
+public class IllegalConnectorArgumentsException extends Exception {
+
     private static final long serialVersionUID = -3042212603611350941L;
     List<String> names;
 
--- a/src/share/classes/com/sun/jdi/connect/LaunchingConnector.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/LaunchingConnector.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface LaunchingConnector extends Connector {
     /**
      * Launches an application and connects to its VM. Properties
--- a/src/share/classes/com/sun/jdi/connect/ListeningConnector.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/ListeningConnector.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface ListeningConnector extends Connector {
     /**
      * Indicates whether this listening connector supports multiple
--- a/src/share/classes/com/sun/jdi/connect/Transport.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/Transport.java	Fri Oct 25 10:39:13 2013 -0700
@@ -42,6 +42,7 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
+@jdk.Exported
 public interface Transport {
     /**
      * Returns a short identifier for the transport.
--- a/src/share/classes/com/sun/jdi/connect/TransportTimeoutException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/TransportTimeoutException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -54,6 +54,7 @@
  *
  * @since 1.5
  */
+@jdk.Exported
 public class TransportTimeoutException extends java.io.IOException {
     private static final long serialVersionUID = 4107035242623365074L;
     /**
--- a/src/share/classes/com/sun/jdi/connect/VMStartException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/VMStartException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,8 +34,9 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
-public class VMStartException extends Exception
-{
+@jdk.Exported
+public class VMStartException extends Exception {
+
     private static final long serialVersionUID = 6408644824640801020L;
     Process process;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/jdi/connect/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,39 @@
+/*
+ * 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
+ * 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 package defines connections between the virtual machine
+ * using the JDI and the target virtual machine.
+ * In concert with {@link com.sun.jdi.VirtualMachineManager}
+ * it is the mechanism for launching, attaching, etc to
+ * target virtual machines.
+ * <p>
+ * Methods may be added to the interfaces in the JDI packages in future
+ * releases. Existing packages may be renamed if the JDI becomes a standard
+ * extension.
+ */
+
+@jdk.Exported
+package com.sun.jdi.connect;
--- a/src/share/classes/com/sun/jdi/connect/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-<html>
-<head>
-<title>com.sun.jdi.connect description</title>
-<!--
-
-Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute 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.
--->
-</head>
-<body bgcolor="white">
-
-This package defines 
-connections between the virtual machine
-using the JDI and the target virtual machine. 
-In concert with {@link com.sun.jdi.VirtualMachineManager}
-it is the mechanism for launching, attaching, etc to 
-target virtual machines.
-<p>
-Methods may be added to the interfaces in the JDI packages in future 
-releases. Existing packages may be renamed if the JDI becomes a standard 
-extension.
-  </body>
-</html>
--- a/src/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  *
  * @since 1.5
  */
+@jdk.Exported
 public class ClosedConnectionException extends java.io.IOException {
     private static final long serialVersionUID = 3877032124297204774L;
     /**
--- a/src/share/classes/com/sun/jdi/connect/spi/Connection.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/spi/Connection.java	Fri Oct 25 10:39:13 2013 -0700
@@ -56,6 +56,7 @@
  * @since 1.5
  */
 
+@jdk.Exported
 public abstract class Connection {
 
     /**
--- a/src/share/classes/com/sun/jdi/connect/spi/TransportService.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/connect/spi/TransportService.java	Fri Oct 25 10:39:13 2013 -0700
@@ -77,6 +77,7 @@
  * @since 1.5
  */
 
+@jdk.Exported
 public abstract class TransportService {
 
     /**
@@ -96,6 +97,7 @@
     /**
      * The transport service capabilities.
      */
+    @jdk.Exported
     public static abstract class Capabilities {
 
         /**
@@ -229,6 +231,7 @@
      * #stopListening stopListening} to stop the transport
      * service from listening on an address.
      */
+    @jdk.Exported
     public static abstract class ListenKey {
 
         /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/jdi/connect/spi/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,33 @@
+/*
+ * 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
+ * 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 package comprises the interfaces and classes used to
+ * develop new {@link com.sun.jdi.connect.spi.TransportService}
+ * implementations.
+ */
+
+@jdk.Exported
+package com.sun.jdi.connect.spi;
--- a/src/share/classes/com/sun/jdi/connect/spi/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-<html>
-<head>
-    <title>com.sun.jdi.connect.spi description</title>
-<!--
- 
-Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute 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.
--->
-</head>
-<body bgcolor="white">
-This package comprises the interfaces and classes used to
-develop new {@link com.sun.jdi.connect.spi.TransportService} 
-implementations.
-  </body>
-</html>
--- a/src/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -37,5 +37,6 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface AccessWatchpointEvent extends WatchpointEvent {
 }
--- a/src/share/classes/com/sun/jdi/event/BreakpointEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/BreakpointEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -47,6 +47,6 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface BreakpointEvent extends LocatableEvent {
-
 }
--- a/src/share/classes/com/sun/jdi/event/ClassPrepareEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/ClassPrepareEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ClassPrepareEvent extends Event {
     /**
      * Returns the thread in which this event has occurred.
--- a/src/share/classes/com/sun/jdi/event/ClassUnloadEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/ClassUnloadEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ClassUnloadEvent extends Event {
     /**
      * Returns the name of the class that has been unloaded.
--- a/src/share/classes/com/sun/jdi/event/Event.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/Event.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,6 +43,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface Event extends Mirror {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/EventIterator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/EventIterator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -40,6 +40,7 @@
  * @since  1.3
  */
 
+@jdk.Exported
 public interface EventIterator extends Iterator<Event> {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/EventQueue.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/EventQueue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -57,6 +57,7 @@
  * @since  1.3
  */
 
+@jdk.Exported
 public interface EventQueue extends Mirror {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/EventSet.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/EventSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -127,6 +127,7 @@
  * @since  1.3
  */
 
+@jdk.Exported
 public interface EventSet extends Mirror, Set<Event> {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/ExceptionEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/ExceptionEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ExceptionEvent extends LocatableEvent {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/LocatableEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/LocatableEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,6 +36,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface LocatableEvent extends Event, Locatable {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/MethodEntryEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/MethodEntryEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,6 +43,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface MethodEntryEvent extends LocatableEvent {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/MethodExitEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/MethodExitEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -40,6 +40,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface MethodExitEvent extends LocatableEvent {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -38,6 +38,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ModificationWatchpointEvent extends WatchpointEvent {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -40,6 +40,7 @@
  * @author Swamy Venkataramanappa
  * @since  1.6
  */
+@jdk.Exported
 public interface MonitorContendedEnterEvent extends LocatableEvent {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @author Swamy Venkataramanappa
  * @since  1.6
  */
+@jdk.Exported
 public interface MonitorContendedEnteredEvent extends LocatableEvent {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/MonitorWaitEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/MonitorWaitEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -38,6 +38,7 @@
  * @author Swamy Venkataramanappa
  * @since  1.6
  */
+@jdk.Exported
 public interface MonitorWaitEvent extends LocatableEvent {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -38,6 +38,7 @@
  * @author Swamy Venkataramanappa
  * @since  1.6
  */
+@jdk.Exported
 public interface MonitorWaitedEvent extends LocatableEvent {
 
     /**
--- a/src/share/classes/com/sun/jdi/event/StepEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/StepEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -46,6 +46,6 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface StepEvent extends LocatableEvent {
-
 }
--- a/src/share/classes/com/sun/jdi/event/ThreadDeathEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/ThreadDeathEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ThreadDeathEvent extends Event {
     /**
      * Returns the thread which is terminating.
--- a/src/share/classes/com/sun/jdi/event/ThreadStartEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/ThreadStartEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -52,6 +52,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ThreadStartEvent extends Event {
     /**
      * Returns the thread which has started.
--- a/src/share/classes/com/sun/jdi/event/VMDeathEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/VMDeathEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -68,5 +68,6 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface VMDeathEvent extends Event {
 }
--- a/src/share/classes/com/sun/jdi/event/VMDisconnectEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/VMDisconnectEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -52,5 +52,6 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface VMDisconnectEvent extends Event {
 }
--- a/src/share/classes/com/sun/jdi/event/VMStartEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/VMStartEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,6 +43,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface VMStartEvent extends Event {
     /**
      * Returns the initial thread of the VM which has started.
--- a/src/share/classes/com/sun/jdi/event/WatchpointEvent.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/event/WatchpointEvent.java	Fri Oct 25 10:39:13 2013 -0700
@@ -37,6 +37,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface WatchpointEvent extends LocatableEvent {
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/jdi/event/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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 package defines JDI events and event processing.
+ * An {@link com.sun.jdi.event.Event} is always a member of an
+ * {@link com.sun.jdi.event.EventSet}, which
+ * is retrieved from the {@link com.sun.jdi.event.EventQueue}.
+ * Examples of Events include
+ * {@link com.sun.jdi.event.BreakpointEvent "breakpoints events"},
+ * {@link com.sun.jdi.event.ThreadStartEvent "thread creation events"} and
+ * {@link com.sun.jdi.event.VMDeathEvent "virtual machine death event"}.
+ *  With the exception
+ * of termination events, all events received must be requested with an
+ * {@link com.sun.jdi.request.EventRequest "EventRequest"}.  The
+ * {@link com.sun.jdi.request} package defines event requests and event
+ * request management.
+ * <p>
+ * Methods may be added to the interfaces in the JDI packages in future
+ * releases. Existing packages may be renamed if the JDI becomes a standard
+ * extension.
+ */
+
+@jdk.Exported
+package com.sun.jdi.event;
--- a/src/share/classes/com/sun/jdi/event/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-<html>
-<head>
-    <title>com.sun.jdi.event description</title>
-<!--
- 
-Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute 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.
--->
-</head>
-<body bgcolor="white">
-This package defines JDI events and event processing.
-An {@link com.sun.jdi.event.Event} is always a member of an 
-{@link com.sun.jdi.event.EventSet}, which
-is retrieved from the {@link com.sun.jdi.event.EventQueue}. 
-Examples of Events include
-{@link com.sun.jdi.event.BreakpointEvent "breakpoints events"}, 
-{@link com.sun.jdi.event.ThreadStartEvent "thread creation events"} and 
-{@link com.sun.jdi.event.VMDeathEvent "virtual machine death event"}. 
-With the exception
-of termination events, all events received must be requested with an
-{@link com.sun.jdi.request.EventRequest "EventRequest"}.  The 
-{@link com.sun.jdi.request} package defines event requests and event
-request management.
-<p>
-Methods may be added to the interfaces in the JDI packages in future 
-releases. Existing packages may be renamed if the JDI becomes a standard 
-extension.
-  </body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/jdi/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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 is the core package of the Java Debug
+ * Interface (JDI), it defines mirrors for values, types, and the target
+ * VirtualMachine itself - as well bootstrapping facilities.
+ * {@link com.sun.jdi.VirtualMachine} mirrors the target virtual machine and
+ * is the origin of all information provided by the JDI.  A VirtualMachine
+ * is typically created by using the
+ * {@link com.sun.jdi.VirtualMachineManager} to create
+ * a connection to the target virtual machine (see the
+ * {@link com.sun.jdi.connect} package).  In turn the
+ * {@link com.sun.jdi.VirtualMachineManager} is typically created by calling
+ * {@link com.sun.jdi.Bootstrap#virtualMachineManager()}.
+ * <p>
+ * Most of the methods within this package can throw the unchecked exception
+ * {@link com.sun.jdi.VMDisconnectedException}.
+ * <p>
+ * Methods may be added to the interfaces in the JDI packages in future
+ * releases. Existing packages may be renamed if the JDI becomes a standard
+ * extension.
+ */
+
+@jdk.Exported
+package com.sun.jdi;
--- a/src/share/classes/com/sun/jdi/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-<html>
-<head>
-    <title>com.sun.jdi package description</title>
-<!--
- 
-Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute 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.
--->
-</head>
-<body bgcolor="white">
-This is the core package of the Java Debug 
-Interface (JDI), it defines mirrors for values, types, and the target
-VirtualMachine itself - as well bootstrapping facilities.
-{@link com.sun.jdi.VirtualMachine} mirrors the target virtual machine and
-is the origin of all information provided by the JDI.  A VirtualMachine
-is typically created by using the 
-{@link com.sun.jdi.VirtualMachineManager} to create
-a connection to the target virtual machine (see the 
-{@link com.sun.jdi.connect} package).  In turn the 
-{@link com.sun.jdi.VirtualMachineManager} is typically created by calling 
-{@link com.sun.jdi.Bootstrap#virtualMachineManager()}. 
-<p>
-Most of the methods within this package can throw the unchecked exception
-{@link com.sun.jdi.VMDisconnectedException}. 
-<p>
-Methods may be added to the interfaces in the JDI packages in future 
-releases. Existing packages may be renamed if the JDI becomes a standard 
-extension.
-  </body>
-</html>
--- a/src/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -56,5 +56,6 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface AccessWatchpointRequest extends WatchpointRequest {
 }
--- a/src/share/classes/com/sun/jdi/request/BreakpointRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/BreakpointRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -46,6 +46,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface BreakpointRequest extends EventRequest, Locatable {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/ClassPrepareRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/ClassPrepareRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -47,6 +47,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ClassPrepareRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/ClassUnloadRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/ClassUnloadRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -46,6 +46,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ClassUnloadRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/DuplicateRequestException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/DuplicateRequestException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -31,16 +31,15 @@
  * @author Robert Field
  * @since  1.3
  */
-public class DuplicateRequestException extends RuntimeException
-{
+@jdk.Exported
+public class DuplicateRequestException extends RuntimeException {
     private static final long serialVersionUID = -3719784920313411060L;
-    public DuplicateRequestException()
-    {
+
+    public DuplicateRequestException() {
         super();
     }
 
-    public DuplicateRequestException(String s)
-    {
+    public DuplicateRequestException(String s) {
         super(s);
     }
 }
--- a/src/share/classes/com/sun/jdi/request/EventRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/EventRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -78,6 +78,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface EventRequest extends Mirror {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/EventRequestManager.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/EventRequestManager.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @since  1.3
  */
 
+@jdk.Exported
 public interface EventRequestManager extends Mirror {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/ExceptionRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/ExceptionRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,6 +43,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ExceptionRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/InvalidRequestStateException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/InvalidRequestStateException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public class InvalidRequestStateException extends RuntimeException {
     private static final long serialVersionUID = -3774632428543322148L;
     public InvalidRequestStateException()
--- a/src/share/classes/com/sun/jdi/request/MethodEntryRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/MethodEntryRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface MethodEntryRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/MethodExitRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/MethodExitRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface MethodExitRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -55,5 +55,6 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ModificationWatchpointRequest extends WatchpointRequest {
 }
--- a/src/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @author Swamy Venkataramanappa
  * @since  1.6
  */
+@jdk.Exported
 public interface MonitorContendedEnterRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @author Swamy Venkataramanappa
  * @since  1.6
  */
+@jdk.Exported
 public interface MonitorContendedEnteredRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/MonitorWaitRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/MonitorWaitRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @author Swamy Venkataramanappa
  * @since  1.6
  */
+@jdk.Exported
 public interface MonitorWaitRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @author Swamy Venkataramanappa
  * @since  1.6
  */
+@jdk.Exported
 public interface MonitorWaitedRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/StepRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/StepRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,6 +43,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface StepRequest extends EventRequest {
 
     /** Step into any newly pushed frames */
--- a/src/share/classes/com/sun/jdi/request/ThreadDeathRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/ThreadDeathRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ThreadDeathRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/ThreadStartRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/ThreadStartRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface ThreadStartRequest extends EventRequest {
 
     /**
--- a/src/share/classes/com/sun/jdi/request/VMDeathRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/VMDeathRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -56,6 +56,7 @@
  * @author Robert Field
  * @since  1.4
  */
+@jdk.Exported
 public interface VMDeathRequest extends EventRequest {
 
 }
--- a/src/share/classes/com/sun/jdi/request/WatchpointRequest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jdi/request/WatchpointRequest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -38,6 +38,7 @@
  * @author Robert Field
  * @since  1.3
  */
+@jdk.Exported
 public interface WatchpointRequest extends EventRequest {
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/jdi/request/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,46 @@
+/*
+ * 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
+ * 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 package is used to request that a JDI
+ * event be sent under specified conditions.
+ * With the exception of termination events, which are
+ * always sent, there is one kind of
+ * {@link com.sun.jdi.request.EventRequest} for each kind of
+ * {@link com.sun.jdi.event.Event Event} - for example,
+ * {@link com.sun.jdi.request.BreakpointRequest} is used to request a
+ * {@link com.sun.jdi.event.BreakpointEvent BreakpointEvent}.
+ * Event requests are created by the
+ * {@link com.sun.jdi.request.EventRequestManager}.
+ * Events and event processing are defined in the
+ * {@link com.sun.jdi.event} package.
+ * <p>
+ * Methods may be added to the interfaces in the JDI packages in future
+ * releases. Existing packages may be renamed if the JDI becomes a standard
+ * extension.
+ */
+
+@jdk.Exported
+package com.sun.jdi.request;
--- a/src/share/classes/com/sun/jdi/request/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-<html>
-<head>
-    <title>com.sun.jdi.request description</title>
-<!--
- 
-Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute 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.
--->
-</head>
-<body bgcolor="white">
-This package is used to request that a JDI
-event be sent under specified conditions.
-With the exception of termination events, which are
-always sent, there is one kind of 
-{@link com.sun.jdi.request.EventRequest} for each kind of 
-{@link com.sun.jdi.event.Event Event} - for example,
-{@link com.sun.jdi.request.BreakpointRequest} is used to request a
-{@link com.sun.jdi.event.BreakpointEvent BreakpointEvent}.
-Event requests are created by the 
-{@link com.sun.jdi.request.EventRequestManager}.  
-Events and event processing are defined in the
-{@link com.sun.jdi.event} package.
-<p>
-Methods may be added to the interfaces in the JDI packages in future 
-releases. Existing packages may be renamed if the JDI becomes a standard 
-extension.
-  </body>
-</html>
--- a/src/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/jndi/ldap/LdapCtxFactory.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java	Fri Oct 25 10:39:13 2013 -0700
@@ -237,7 +237,7 @@
     private static String[] getTypeNames(Class<?> currentClass, Vector<String> v) {
 
         getClassesAux(currentClass, v);
-        Class[] members = currentClass.getInterfaces();
+        Class<?>[] members = currentClass.getInterfaces();
         for (int i = 0; i < members.length; i++) {
             getClassesAux(members[i], v);
         }
--- a/src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jndi/ldap/LdapPoolManager.java	Fri Oct 25 10:39:13 2013 -0700
@@ -237,7 +237,7 @@
              !socketFactory.equals(LdapCtx.DEFAULT_SSL_FACTORY)) {
             try {
                 Class<?> socketFactoryClass = Obj.helper.loadClass(socketFactory);
-                Class[] interfaces = socketFactoryClass.getInterfaces();
+                Class<?>[] interfaces = socketFactoryClass.getInterfaces();
                 for (int i = 0; i < interfaces.length; i++) {
                     if (interfaces[i].getCanonicalName().equals(COMPARATOR)) {
                         foundSockCmp = true;
--- a/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/GarbageCollectionNotificationInfo.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java	Fri Oct 25 10:39:13 2013 -0700
@@ -85,6 +85,7 @@
  * </ul>
  **/
 
+@jdk.Exported
 public class GarbageCollectionNotificationInfo implements  CompositeDataView {
 
     private final String gcName;
--- a/src/share/classes/com/sun/management/GarbageCollectorMXBean.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/management/GarbageCollectorMXBean.java	Fri Oct 25 10:39:13 2013 -0700
@@ -37,6 +37,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
+@jdk.Exported
 public interface GarbageCollectorMXBean
     extends java.lang.management.GarbageCollectorMXBean {
 
--- a/src/share/classes/com/sun/management/GcInfo.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/management/GcInfo.java	Fri Oct 25 10:39:13 2013 -0700
@@ -64,6 +64,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
+@jdk.Exported
 public class GcInfo implements CompositeData, CompositeDataView {
     private final long index;
     private final long startTime;
--- a/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	Fri Oct 25 10:39:13 2013 -0700
@@ -48,6 +48,7 @@
  *
  * @see ManagementFactory#getPlatformMXBeans(Class)
  */
+@jdk.Exported
 public interface HotSpotDiagnosticMXBean extends PlatformManagedObject {
     /**
      * Dumps the heap to the <tt>outputFile</tt> file in the same
@@ -66,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/management/OperatingSystemMXBean.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/management/OperatingSystemMXBean.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
+@jdk.Exported
 public interface OperatingSystemMXBean extends
     java.lang.management.OperatingSystemMXBean {
 
--- a/src/share/classes/com/sun/management/ThreadMXBean.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/management/ThreadMXBean.java	Fri Oct 25 10:39:13 2013 -0700
@@ -38,6 +38,7 @@
  * @since   6u25
  */
 
+@jdk.Exported
 public interface ThreadMXBean extends java.lang.management.ThreadMXBean {
     /**
      * Returns the total CPU time for each thread whose ID is
--- a/src/share/classes/com/sun/management/UnixOperatingSystemMXBean.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/management/UnixOperatingSystemMXBean.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
+@jdk.Exported
 public interface UnixOperatingSystemMXBean extends
     com.sun.management.OperatingSystemMXBean {
 
--- a/src/share/classes/com/sun/management/VMOption.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/management/VMOption.java	Fri Oct 25 10:39:13 2013 -0700
@@ -52,6 +52,7 @@
  * @author Mandy Chung
  * @since 1.6
  */
+@jdk.Exported
 public class VMOption {
     private String name;
     private String value;
@@ -64,6 +65,7 @@
      *
      * @since 1.6
      */
+    @jdk.Exported
     public enum Origin {
         /**
          * The VM option has not been set and its value
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/management/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,44 @@
+/*
+ * 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
+ * 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 package contains Oracle Corporation's platform extension to
+ * the implementation of the
+ * <a href="{@docRoot}/../../../../api/java/lang/management/package-summary.html">
+ * java.lang.management</a> API and also defines the management
+ * interface for some other components for the platform.
+ *
+ * <p>
+ * All platform MBeans are registered in the <em>platform MBeanServer</em>
+ * which can be obtained via the
+ * <a href="{@docRoot}/../../../../api/java/lang/management/ManagementFactory.html#getPlatformMBeanServer()">
+ * java.lang.management.ManagementFactory.getPlatformMBeanServer</a>
+ *
+ * @author  Mandy Chung
+ * @since   1.5
+ */
+
+@jdk.Exported
+package com.sun.management;
--- a/src/share/classes/com/sun/management/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
-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.  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.
--->
-
-</head>
-<body bgcolor="white">
-
-This package contains Oracle Corporation's platform extension to
-the implementation of the
-<a href="{@docRoot}/../../../../api/java/lang/management/package-summary.html">
-java.lang.management</a> API and also defines the management
-interface for some other components for the platform.
-
-<p>
-All platform MBeans are registered in the <em>platform MBeanServer</em>
-which can be obtained via the
-<a href="{@docRoot}/../../../../api/java/lang/management/ManagementFactory.html#getPlatformMBeanServer()">
-java.lang.management.ManagementFactory.getPlatformMBeanServer</a>
-
-@author  Mandy Chung
-@since   1.5
-
-</body>
-</html>
-
-
--- a/src/share/classes/com/sun/net/httpserver/Authenticator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/Authenticator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,6 +36,7 @@
  * Note. This implies that any caching of credentials or other authentication
  * information must be done outside of this class.
  */
+@jdk.Exported
 public abstract class Authenticator {
 
     /**
@@ -47,6 +48,7 @@
      * Indicates an authentication failure. The authentication
      * attempt has completed.
      */
+    @jdk.Exported
     public static class Failure extends Result {
 
         private int responseCode;
@@ -68,6 +70,7 @@
      * authenticated user principal can be acquired by calling
      * getPrincipal().
      */
+    @jdk.Exported
     public static class Success extends Result {
         private HttpPrincipal principal;
 
@@ -89,6 +92,7 @@
      * set any necessary response headers in the given HttpExchange
      * before returning this Retry object.
      */
+    @jdk.Exported
     public static class Retry extends Result {
 
         private int responseCode;
--- a/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -33,6 +33,7 @@
  * to provide an implementation of {@link #checkCredentials(String,String)}
  * which is called to verify each incoming request.
  */
+@jdk.Exported
 public abstract class BasicAuthenticator extends Authenticator {
 
     protected String realm;
--- a/src/share/classes/com/sun/net/httpserver/Filter.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/Filter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * exchange handler.
  * @since 1.6
  */
+@jdk.Exported
 public abstract class Filter {
 
     protected Filter () {}
@@ -48,6 +49,7 @@
      * Each filter in the chain is given one of these
      * so it can invoke the next filter in the chain
      */
+    @jdk.Exported
     public static class Chain {
         /* the last element in the chain must invoke the users
          * handler
--- a/src/share/classes/com/sun/net/httpserver/Headers.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/Headers.java	Fri Oct 25 10:39:13 2013 -0700
@@ -58,6 +58,7 @@
  * as a header line containing the key but no associated value.
  * @since 1.6
  */
+@jdk.Exported
 public class Headers implements Map<String,List<String>> {
 
         HashMap<String,List<String>> map;
--- a/src/share/classes/com/sun/net/httpserver/HttpContext.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpContext.java	Fri Oct 25 10:39:13 2013 -0700
@@ -40,6 +40,7 @@
  * context can be pre- and post-processed by each Filter in the chain.
  * @since 1.6
  */
+@jdk.Exported
 public abstract class HttpContext {
 
     protected HttpContext () {
--- a/src/share/classes/com/sun/net/httpserver/HttpExchange.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpExchange.java	Fri Oct 25 10:39:13 2013 -0700
@@ -65,6 +65,7 @@
  * @since 1.6
  */
 
+@jdk.Exported
 public abstract class HttpExchange {
 
     protected HttpExchange () {
--- a/src/share/classes/com/sun/net/httpserver/HttpHandler.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpHandler.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * HTTP exchange is handled by one of these handlers.
  * @since 1.6
  */
+@jdk.Exported
 public interface HttpHandler {
     /**
      * Handle the given request and generate an appropriate response.
--- a/src/share/classes/com/sun/net/httpserver/HttpPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -33,6 +33,7 @@
  * Represents a user authenticated by HTTP Basic or Digest
  * authentication.
  */
+@jdk.Exported
 public class HttpPrincipal implements Principal {
     private String username, realm;
 
--- a/src/share/classes/com/sun/net/httpserver/HttpServer.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpServer.java	Fri Oct 25 10:39:13 2013 -0700
@@ -87,6 +87,7 @@
  * @since 1.6
  */
 
+@jdk.Exported
 public abstract class HttpServer {
 
     /**
--- a/src/share/classes/com/sun/net/httpserver/HttpsConfigurator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpsConfigurator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -67,6 +67,7 @@
  * </blockquote></pre>
  * @since 1.6
  */
+@jdk.Exported
 public class HttpsConfigurator {
 
     private SSLContext context;
--- a/src/share/classes/com/sun/net/httpserver/HttpsExchange.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpsExchange.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @since 1.6
  */
 
+@jdk.Exported
 public abstract class HttpsExchange extends HttpExchange {
 
     protected HttpsExchange () {
--- a/src/share/classes/com/sun/net/httpserver/HttpsParameters.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpsParameters.java	Fri Oct 25 10:39:13 2013 -0700
@@ -49,6 +49,7 @@
  * are used, and any settings made in this object are ignored.
  * @since 1.6
  */
+@jdk.Exported
 public abstract class HttpsParameters {
 
     private String[] cipherSuites;
--- a/src/share/classes/com/sun/net/httpserver/HttpsServer.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/HttpsServer.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @since 1.6
  */
 
+@jdk.Exported
 public abstract class HttpsServer extends HttpServer {
 
     /**
--- a/src/share/classes/com/sun/net/httpserver/package-info.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -123,4 +123,5 @@
    <p>
    @since 1.6
  */
+@jdk.Exported
 package com.sun.net.httpserver;
--- a/src/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java	Fri Oct 25 10:39:13 2013 -0700
@@ -40,6 +40,7 @@
  * {@link HttpServer} and associated classes. Applications do not normally use
  * this class. See {@link #provider()} for how providers are found and loaded.
  */
+@jdk.Exported
 public abstract class HttpServerProvider {
 
     /**
--- a/src/share/classes/com/sun/net/httpserver/spi/package-info.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/httpserver/spi/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -24,7 +24,8 @@
  */
 
 /**
- Provides a pluggable service provider interface, which allows the HTTP server
- implementation to be replaced with other implementations.
-*/
+ * Provides a pluggable service provider interface, which allows the HTTP server
+ * implementation to be replaced with other implementations.
+ */
+@jdk.Exported
 package com.sun.net.httpserver.spi;
--- a/src/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -404,6 +404,7 @@
         return delegate.getContent();
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(Class[] classes) throws IOException {
         return delegate.getContent(classes);
     }
--- a/src/share/classes/com/sun/nio/sctp/AbstractNotificationHandler.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/AbstractNotificationHandler.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public class AbstractNotificationHandler<T>
     implements NotificationHandler<T>
 {
--- a/src/share/classes/com/sun/nio/sctp/Association.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/Association.java	Fri Oct 25 10:39:13 2013 -0700
@@ -51,6 +51,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public class Association {
     private final int associationID;
     private final int maxInStreams;
--- a/src/share/classes/com/sun/nio/sctp/AssociationChangeNotification.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/AssociationChangeNotification.java	Fri Oct 25 10:39:13 2013 -0700
@@ -29,6 +29,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public abstract class AssociationChangeNotification
     implements Notification
 {
@@ -37,6 +38,7 @@
      *
      * @since 1.7
      */
+    @jdk.Exported
     public enum AssocChangeEvent
     {
         /**
--- a/src/share/classes/com/sun/nio/sctp/HandlerResult.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/HandlerResult.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,6 +34,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public enum HandlerResult {
     /**
      * Try to receieve another message or notification.
--- a/src/share/classes/com/sun/nio/sctp/IllegalReceiveException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/IllegalReceiveException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -31,6 +31,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public class IllegalReceiveException extends IllegalStateException {
     private static final long serialVersionUID = 2296619040988576224L;
 
--- a/src/share/classes/com/sun/nio/sctp/IllegalUnbindException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/IllegalUnbindException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -31,6 +31,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public class IllegalUnbindException extends IllegalStateException {
     private static final long serialVersionUID = -310540883995532224L;
 
--- a/src/share/classes/com/sun/nio/sctp/InvalidStreamException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/InvalidStreamException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -30,6 +30,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public class InvalidStreamException extends IllegalArgumentException {
     private static final long serialVersionUID = -9172703378046665558L;
 
--- a/src/share/classes/com/sun/nio/sctp/MessageInfo.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/MessageInfo.java	Fri Oct 25 10:39:13 2013 -0700
@@ -56,6 +56,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public abstract class MessageInfo {
     /**
      * Initializes a new instance of this class.
--- a/src/share/classes/com/sun/nio/sctp/Notification.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/Notification.java	Fri Oct 25 10:39:13 2013 -0700
@@ -37,6 +37,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public interface Notification {
     /**
      * Returns the association that this notification is applicable to.
--- a/src/share/classes/com/sun/nio/sctp/NotificationHandler.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/NotificationHandler.java	Fri Oct 25 10:39:13 2013 -0700
@@ -49,6 +49,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public interface NotificationHandler<T> {
     /**
      * Invoked when a notification is received from the SCTP stack.
--- a/src/share/classes/com/sun/nio/sctp/PeerAddressChangeNotification.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/PeerAddressChangeNotification.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public abstract class PeerAddressChangeNotification
     implements Notification
 {
@@ -46,6 +47,7 @@
      *
      * @since 1.7
      */
+    @jdk.Exported
     public enum AddressChangeEvent {
         /**
          * This address is now reachable.
--- a/src/share/classes/com/sun/nio/sctp/SctpChannel.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/SctpChannel.java	Fri Oct 25 10:39:13 2013 -0700
@@ -134,6 +134,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public abstract class SctpChannel
     extends AbstractSelectableChannel
 {
--- a/src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java	Fri Oct 25 10:39:13 2013 -0700
@@ -134,6 +134,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public abstract class SctpMultiChannel
     extends AbstractSelectableChannel
 {
--- a/src/share/classes/com/sun/nio/sctp/SctpServerChannel.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/SctpServerChannel.java	Fri Oct 25 10:39:13 2013 -0700
@@ -68,6 +68,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public abstract class SctpServerChannel
     extends AbstractSelectableChannel
 {
--- a/src/share/classes/com/sun/nio/sctp/SctpSocketOption.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/SctpSocketOption.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,4 +35,5 @@
  *
  * @see SctpStandardSocketOptions
  */
+@jdk.Exported
 public interface SctpSocketOption<T> extends SocketOption<T> { }
--- a/src/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java	Fri Oct 25 10:39:13 2013 -0700
@@ -34,6 +34,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public class SctpStandardSocketOptions {
     private SctpStandardSocketOptions() {}
     /**
@@ -315,6 +316,7 @@
      *
      * @since 1.7
      */
+    @jdk.Exported
     public static class InitMaxStreams {
         private int maxInStreams;
         private int maxOutStreams;
--- a/src/share/classes/com/sun/nio/sctp/SendFailedNotification.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/SendFailedNotification.java	Fri Oct 25 10:39:13 2013 -0700
@@ -37,6 +37,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public abstract class SendFailedNotification implements Notification {
     /**
      * Initializes a new instance of this class.
--- a/src/share/classes/com/sun/nio/sctp/ShutdownNotification.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/ShutdownNotification.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  *
  * @since 1.7
  */
+@jdk.Exported
 public abstract class ShutdownNotification implements Notification {
     /**
      * Initializes a new instance of this class.
--- a/src/share/classes/com/sun/nio/sctp/package-info.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/nio/sctp/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -72,4 +72,5 @@
  * @since 1.7
  */
 
+@jdk.Exported
 package com.sun.nio.sctp;
--- a/src/share/classes/com/sun/security/auth/LdapPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/LdapPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  *
  * @since 1.6
  */
+@jdk.Exported
 public final class LdapPrincipal implements Principal, java.io.Serializable {
 
     private static final long serialVersionUID = 6820120005580754861L;
--- a/src/share/classes/com/sun/security/auth/NTDomainPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/NTDomainPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class NTDomainPrincipal implements Principal, java.io.Serializable {
 
     private static final long serialVersionUID = -4408637351440771220L;
--- a/src/share/classes/com/sun/security/auth/NTNumericCredential.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/NTNumericCredential.java	Fri Oct 25 10:39:13 2013 -0700
@@ -31,6 +31,7 @@
  *
  */
 
+@jdk.Exported
 public class NTNumericCredential {
 
     private long impersonationToken;
--- a/src/share/classes/com/sun/security/auth/NTSid.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/NTSid.java	Fri Oct 25 10:39:13 2013 -0700
@@ -47,6 +47,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class NTSid implements Principal, java.io.Serializable {
 
     private static final long serialVersionUID = 4412290580770249885L;
--- a/src/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,6 +43,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class NTSidDomainPrincipal extends NTSid {
 
     private static final long serialVersionUID = 5247810785821650912L;
--- a/src/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -40,6 +40,7 @@
  * @see javax.security.auth.Subject
  * @see com.sun.security.auth.NTSid
  */
+@jdk.Exported
 public class NTSidGroupPrincipal extends NTSid {
 
     private static final long serialVersionUID = -1373347438636198229L;
--- a/src/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class NTSidPrimaryGroupPrincipal extends NTSid {
 
     private static final long serialVersionUID = 8011978367305190527L;
--- a/src/share/classes/com/sun/security/auth/NTSidUserPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/NTSidUserPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -39,6 +39,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class NTSidUserPrincipal extends NTSid {
 
     private static final long serialVersionUID = -5573239889517749525L;
--- a/src/share/classes/com/sun/security/auth/NTUserPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/NTUserPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -41,6 +41,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class NTUserPrincipal implements Principal, java.io.Serializable {
 
     private static final long serialVersionUID = -8737649811939033735L;
--- a/src/share/classes/com/sun/security/auth/PolicyFile.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/PolicyFile.java	Fri Oct 25 10:39:13 2013 -0700
@@ -215,6 +215,7 @@
  * @see java.security.ProtectionDomain
  * @see java.security.Security security properties
  */
+@jdk.Exported(false)
 @Deprecated
 public class PolicyFile extends javax.security.auth.Policy {
 
--- a/src/share/classes/com/sun/security/auth/PrincipalComparator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/PrincipalComparator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -50,6 +50,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public interface PrincipalComparator {
     /**
      * Check if the specified <code>Subject</code> is implied by
--- a/src/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -45,6 +45,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported(false)
 @Deprecated
 public class SolarisNumericGroupPrincipal implements
                                         Principal,
--- a/src/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported(false)
 @Deprecated
 public class SolarisNumericUserPrincipal implements
                                         Principal,
--- a/src/share/classes/com/sun/security/auth/SolarisPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/SolarisPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,6 +44,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported(false)
 @Deprecated
 public class SolarisPrincipal implements Principal, java.io.Serializable {
 
--- a/src/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -41,6 +41,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class UnixNumericGroupPrincipal implements
                                         Principal,
                                         java.io.Serializable {
--- a/src/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -41,6 +41,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class UnixNumericUserPrincipal implements
                                         Principal,
                                         java.io.Serializable {
--- a/src/share/classes/com/sun/security/auth/UnixPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/UnixPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -41,6 +41,7 @@
  * @see java.security.Principal
  * @see javax.security.auth.Subject
  */
+@jdk.Exported
 public class UnixPrincipal implements Principal, java.io.Serializable {
 
     private static final long serialVersionUID = -2951667807323493631L;
--- a/src/share/classes/com/sun/security/auth/UserPrincipal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/UserPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -42,6 +42,7 @@
  *
  * @since 1.6
  */
+@jdk.Exported
 public final class UserPrincipal implements Principal, java.io.Serializable {
 
     private static final long serialVersionUID = 892106070870210969L;
--- a/src/share/classes/com/sun/security/auth/X500Principal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/X500Principal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -49,6 +49,7 @@
  *             class.
  * @see javax.security.auth.x500.X500Principal
 */
+@jdk.Exported(false)
 @Deprecated
 public class X500Principal implements Principal, java.io.Serializable {
 
--- a/src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java	Fri Oct 25 10:39:13 2013 -0700
@@ -54,6 +54,7 @@
  * @see javax.security.auth.callback
  * @deprecated This class will be removed in a future release.
  */
+@jdk.Exported(false)
 @Deprecated
 public class DialogCallbackHandler implements CallbackHandler {
 
--- a/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java	Fri Oct 25 10:39:13 2013 -0700
@@ -53,6 +53,7 @@
  * @see javax.security.auth.callback
  */
 
+@jdk.Exported
 public class TextCallbackHandler implements CallbackHandler {
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/security/auth/callback/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+@jdk.Exported
+package com.sun.security.auth.callback;
--- a/src/share/classes/com/sun/security/auth/login/ConfigFile.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/login/ConfigFile.java	Fri Oct 25 10:39:13 2013 -0700
@@ -83,6 +83,7 @@
  * @see javax.security.auth.login.LoginContext
  * @see java.security.Security security properties
  */
+@jdk.Exported
 public class ConfigFile extends Configuration {
 
     private final sun.security.provider.ConfigFile.Spi spi;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/security/auth/login/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+@jdk.Exported
+package com.sun.security.auth.login;
--- a/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java	Fri Oct 25 10:39:13 2013 -0700
@@ -151,6 +151,7 @@
  * </pre>
  *
  */
+@jdk.Exported
 public class JndiLoginModule implements LoginModule {
 
     private static final ResourceBundle rb = AccessController.doPrivileged(
--- a/src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java	Fri Oct 25 10:39:13 2013 -0700
@@ -110,6 +110,7 @@
  *
  * </dl>
  */
+@jdk.Exported
 public class KeyStoreLoginModule implements LoginModule {
 
     private static final ResourceBundle rb = AccessController.doPrivileged(
--- a/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Fri Oct 25 10:39:13 2013 -0700
@@ -379,6 +379,7 @@
  * @author Ram Marti
  */
 
+@jdk.Exported
 public class Krb5LoginModule implements LoginModule {
 
     // initial state
--- a/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java	Fri Oct 25 10:39:13 2013 -0700
@@ -304,6 +304,7 @@
  *
  * @since 1.6
  */
+@jdk.Exported
 public class LdapLoginModule implements LoginModule {
 
     // Use the default classloader for this class to load the prompt strings.
--- a/src/share/classes/com/sun/security/auth/module/NTLoginModule.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/NTLoginModule.java	Fri Oct 25 10:39:13 2013 -0700
@@ -57,6 +57,7 @@
  *
  * @see javax.security.auth.spi.LoginModule
  */
+@jdk.Exported
 public class NTLoginModule implements LoginModule {
 
     private NTSystem ntSystem;
--- a/src/share/classes/com/sun/security/auth/module/NTSystem.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/NTSystem.java	Fri Oct 25 10:39:13 2013 -0700
@@ -30,6 +30,7 @@
  * security information for the current user.
  *
  */
+@jdk.Exported
 public class NTSystem {
 
     private native void getCurrent(boolean debug);
--- a/src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java	Fri Oct 25 10:39:13 2013 -0700
@@ -52,6 +52,7 @@
  *             UnixLoginModule.
  *
  */
+@jdk.Exported(false)
 @Deprecated
 public class SolarisLoginModule implements LoginModule {
 
--- a/src/share/classes/com/sun/security/auth/module/SolarisSystem.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/SolarisSystem.java	Fri Oct 25 10:39:13 2013 -0700
@@ -30,6 +30,7 @@
  * UID/GID/groups information for the current user.
  *
  */
+@jdk.Exported
 public class SolarisSystem {
 
     private native void getSolarisInfo();
--- a/src/share/classes/com/sun/security/auth/module/UnixLoginModule.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/UnixLoginModule.java	Fri Oct 25 10:39:13 2013 -0700
@@ -47,6 +47,7 @@
  * debug messages will be output to the output stream, System.out.
  *
  */
+@jdk.Exported
 public class UnixLoginModule implements LoginModule {
 
     // initial state
--- a/src/share/classes/com/sun/security/auth/module/UnixSystem.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/auth/module/UnixSystem.java	Fri Oct 25 10:39:13 2013 -0700
@@ -30,6 +30,7 @@
  * UID/GID/groups information for the current user.
  *
  */
+@jdk.Exported
 public class UnixSystem {
 
     private native void getUnixInfo();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/security/auth/module/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+@jdk.Exported
+package com.sun.security.auth.module;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/security/auth/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+@jdk.Exported
+package com.sun.security.auth;
--- a/src/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java	Fri Oct 25 10:39:13 2013 -0700
@@ -28,7 +28,8 @@
 /**
  * Kerberos 5 AuthorizationData entry.
  */
-final public class AuthorizationDataEntry {
+@jdk.Exported
+public final class AuthorizationDataEntry {
 
     private final int type;
     private final byte[] data;
--- a/src/share/classes/com/sun/security/jgss/ExtendedGSSContext.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/jgss/ExtendedGSSContext.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * functionalities not defined by {@code org.ietf.jgss.GSSContext},
  * such as querying context-specific attributes.
  */
+@jdk.Exported
 public interface ExtendedGSSContext extends GSSContext {
     /**
      * Return the mechanism-specific attribute associated with {@code type}.
--- a/src/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java	Fri Oct 25 10:39:13 2013 -0700
@@ -32,6 +32,7 @@
  * functionalities not defined by {@code org.ietf.jgss.GSSCredential}.
  * @since 1.8
  */
+@jdk.Exported
 public interface ExtendedGSSCredential extends GSSCredential {
     /**
      * Impersonates a principal. In Kerberos, this can be implemented
--- a/src/share/classes/com/sun/security/jgss/GSSUtil.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/jgss/GSSUtil.java	Fri Oct 25 10:39:13 2013 -0700
@@ -33,6 +33,7 @@
  * GSS-API Utilities for using in conjunction with Sun Microsystem's
  * implementation of Java GSS-API.
  */
+@jdk.Exported
 public class GSSUtil {
 
     /**
--- a/src/share/classes/com/sun/security/jgss/InquireSecContextPermission.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/jgss/InquireSecContextPermission.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
  *
  * <p>The target name is the {@link InquireType} allowed.
  */
+@jdk.Exported
 public final class InquireSecContextPermission extends BasicPermission {
     private static final long serialVersionUID = -7131173349668647297L;
 
--- a/src/share/classes/com/sun/security/jgss/InquireType.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/security/jgss/InquireType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -29,6 +29,7 @@
  * Attribute types that can be specified as an argument of
  * {@link com.sun.security.jgss.ExtendedGSSContext#inquireSecContext}
  */
+@jdk.Exported
 public enum InquireType {
     /**
      * Attribute type for retrieving the session key of an
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/security/jgss/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+@jdk.Exported
+package com.sun.security.jgss;
--- a/src/share/classes/com/sun/tools/attach/AgentInitializationException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/attach/AgentInitializationException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -40,6 +40,7 @@
  * the error returned by the agent's <code>Agent_OnAttach</code> function.
  * This error code can be obtained by invoking the {@link #returnValue() returnValue} method.
  */
+@jdk.Exported
 public class AgentInitializationException extends Exception {
 
     /** use serialVersionUID for interoperability */
--- a/src/share/classes/com/sun/tools/attach/AgentLoadException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/attach/AgentLoadException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,6 +36,7 @@
  * com.sun.tools.attach.VirtualMachine#loadAgentPath loadAgentPath} methods
  * if the agent, or agent library, cannot be loaded.
  */
+@jdk.Exported
 public class AgentLoadException extends Exception {
 
     /** use serialVersionUID for interoperability */
--- a/src/share/classes/com/sun/tools/attach/AttachNotSupportedException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/attach/AttachNotSupportedException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,6 +36,7 @@
  * AttachProvider.attachVirtualMachine} if the provider attempts to
  * attach to a Java virtual machine with which it not comptatible.
  */
+@jdk.Exported
 public class AttachNotSupportedException extends Exception {
 
     /** use serialVersionUID for interoperability */
--- a/src/share/classes/com/sun/tools/attach/AttachPermission.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/attach/AttachPermission.java	Fri Oct 25 10:39:13 2013 -0700
@@ -79,6 +79,7 @@
  * @see com.sun.tools.attach.spi.AttachProvider
  */
 
+@jdk.Exported
 public final class AttachPermission extends java.security.BasicPermission {
 
     /** use serialVersionUID for interoperability */
--- a/src/share/classes/com/sun/tools/attach/VirtualMachine.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/attach/VirtualMachine.java	Fri Oct 25 10:39:13 2013 -0700
@@ -102,6 +102,7 @@
  * @since 1.6
  */
 
+@jdk.Exported
 public abstract class VirtualMachine {
     private AttachProvider provider;
     private String id;
--- a/src/share/classes/com/sun/tools/attach/VirtualMachineDescriptor.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/attach/VirtualMachineDescriptor.java	Fri Oct 25 10:39:13 2013 -0700
@@ -55,6 +55,7 @@
  *
  * @since 1.6
  */
+@jdk.Exported
 public class VirtualMachineDescriptor {
 
     private AttachProvider provider;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/attach/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides the API to attach to a Java<sup><font size=-2>TM</font></sup>
+ * virtual machine.
+ * <p>
+ * A tool, written in the Java Language, uses this API to attach to a target
+ * virtual machine (VM) and load its tool agent into the target VM. For
+ * example, a management console might have a management agent which it uses
+ * to  obtain management information from instrumented objects in a Java
+ * virtual machine. If the management console is required to manage
+ * an application that is running in a virtual machine that does not include
+ * the management agent, then this API can be used to attach to the target
+ * VM and load the agent.
+ *
+ * @since 1.6
+ */
+
+@jdk.Exported
+package com.sun.tools.attach;
--- a/src/share/classes/com/sun/tools/attach/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-<!-- 
- Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  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.
--->
-
-<!doctype html public "-//IETF//DTD HTML//EN">
-<html>
-<body bgcolor="white">
-
-Provides the API to attach to a Java<sup><font size=-2>TM</font></sup> 
-virtual machine.
-
-A tool, written in the Java Language, uses this API to attach to a target 
-virtual machine (VM) and load its tool agent into the target VM. For 
-example, a management console might have a management agent which it uses
-to obtain management information from instrumented objects in a Java
-virtual machine. If the management console is required to manage
-an application that is running in a virtual machine that does not include
-the management agent, then this API can be used to attach to the target
-VM and load the agent.
-
-@since 1.6
-
-</body>
-</html>
-
-
-
--- a/src/share/classes/com/sun/tools/attach/spi/AttachProvider.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/attach/spi/AttachProvider.java	Fri Oct 25 10:39:13 2013 -0700
@@ -74,6 +74,7 @@
  * @since 1.6
  */
 
+@jdk.Exported
 public abstract class AttachProvider {
 
     private static final Object lock = new Object();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/attach/spi/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+/**
+ * Only developers who are defining new attach providers should need to make
+ * direct use of this package.
+ *
+ * @since 1.6
+ */
+
+@jdk.Exported
+package com.sun.tools.attach.spi;
--- a/src/share/classes/com/sun/tools/attach/spi/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<!--
- Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  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.
--->
-
-<!doctype html public "-//IETF//DTD HTML//EN">
-<html>
-<body bgcolor="white">
-
-Provider classes for the <tt>{@link com.sun.tools.attach}</tt> package.
-
-<p> Only developers who are defining new attach providers should need to make
-direct use of this package.  </p>
-
-@since 1.6
-
-</body>
-</html>
--- a/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/com/sun/tools/jconsole/JConsoleContext.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/jconsole/JConsoleContext.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,6 +43,7 @@
  *
  * @since 1.6
  */
+@jdk.Exported
 public interface JConsoleContext {
     /**
      * The {@link ConnectionState ConnectionState} bound property name.
@@ -53,6 +54,7 @@
      * Values for the {@linkplain #CONNECTION_STATE_PROPERTY
      * <i>ConnectionState</i>} bound property.
      */
+    @jdk.Exported
     public enum ConnectionState {
         /**
          * The connection has been successfully established.
--- a/src/share/classes/com/sun/tools/jconsole/JConsolePlugin.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/com/sun/tools/jconsole/JConsolePlugin.java	Fri Oct 25 10:39:13 2013 -0700
@@ -72,6 +72,7 @@
  *
  * @since 1.6
  */
+@jdk.Exported
 public abstract class JConsolePlugin {
     private volatile JConsoleContext context = null;
     private List<PropertyChangeListener> listeners = null;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/jconsole/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * This package contains the JConsole API.
+ *
+ * @since 1.6
+ */
+
+@jdk.Exported
+package com.sun.tools.jconsole;
--- a/src/share/classes/com/sun/tools/jconsole/package.html	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-<!--
- Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute 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.
--->
-
-<!doctype html public "-//IETF//DTD HTML//EN">
-<html>
-<head>
-</head>
-<body bgcolor="white">
-
-This package contains the JConsole API.
-
-@since 1.6
-
-</body>
-</html>
--- a/src/share/classes/java/awt/datatransfer/DataFlavor.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/awt/datatransfer/DataFlavor.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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 =
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<ClassLoader>() {
-                    public ClassLoader 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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/beans/Beans.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/beans/MetaData.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/ObjectInputStream.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/io/ObjectInputStream.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/io/ObjectOutputStream.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/lang/Class.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/Class.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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();
 
 
     /**
--- a/src/share/classes/java/lang/ClassLoader.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/ClassLoader.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
 
 /**
@@ -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) {
@@ -1061,6 +1069,10 @@
      * built-in to the virtual machine is searched.  That failing, this method
      * will invoke {@link #findResource(String)} to find the resource.  </p>
      *
+     * @apiNote When overriding this method it is recommended that an
+     * implementation ensures that any delegation is consistent with the {@link
+     * #getResources(java.lang.String) getResources(String)} method.
+     *
      * @param  name
      *         The resource name
      *
@@ -1094,6 +1106,13 @@
      * <p> The search order is described in the documentation for {@link
      * #getResource(String)}.  </p>
      *
+     * @apiNote When overriding this method it is recommended that an
+     * implementation ensures that any delegation is consistent with the {@link
+     * #getResource(java.lang.String) getResource(String)} method. This should
+     * ensure that the first element returned by the Enumeration's
+     * {@code nextElement} method is the same resource that the
+     * {@code getResource(String)} method would return.
+     *
      * @param  name
      *         The resource name
      *
--- a/src/share/classes/java/lang/System.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/System.java	Fri Oct 25 10:39:13 2013 -0700
@@ -26,6 +26,7 @@
 
 import java.io.*;
 import java.lang.reflect.Executable;
+import java.security.AccessControlContext;
 import java.util.Properties;
 import java.util.PropertyPermission;
 import java.util.StringTokenizer;
@@ -1254,6 +1255,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/Thread.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/instrument/Instrumentation.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/instrument/Instrumentation.java	Fri Oct 25 10:39:13 2013 -0700
@@ -381,6 +381,7 @@
      *
      * @return an array containing all the classes loaded by the JVM, zero-length if there are none
      */
+    @SuppressWarnings("rawtypes")
     Class[]
     getAllLoadedClasses();
 
@@ -393,6 +394,7 @@
      * @return an array containing all the classes for which loader is an initiating loader,
      *          zero-length if there are none
      */
+    @SuppressWarnings("rawtypes")
     Class[]
     getInitiatedClasses(ClassLoader loader);
 
--- a/src/share/classes/java/lang/invoke/CallSite.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/invoke/CallSite.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/invoke/ConstantCallSite.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Fri Oct 25 10:39:13 2013 -0700
@@ -27,12 +27,15 @@
 
 import jdk.internal.org.objectweb.asm.*;
 import sun.misc.Unsafe;
+import sun.security.action.GetPropertyAction;
 
+import java.io.FilePermission;
 import java.lang.reflect.Constructor;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.security.ProtectionDomain;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.PropertyPermission;
 
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
 
@@ -66,12 +69,23 @@
     // Used to ensure that each spun class name is unique
     private static final AtomicInteger counter = new AtomicInteger(0);
 
+    // For dumping generated classes to disk, for debugging purposes
+    private static final ProxyClassesDumper dumper;
+
+    static {
+        final String key = "jdk.internal.lambda.dumpProxyClasses";
+        String path = AccessController.doPrivileged(
+                new GetPropertyAction(key), null,
+                new PropertyPermission(key , "read"));
+        dumper = (null == path) ? null : ProxyClassesDumper.getInstance(path);
+    }
+
     // See context values in AbstractValidatingLambdaMetafactory
     private final String implMethodClassName;        // Name of type containing implementation "CC"
     private final String implMethodName;             // Name of implementation method "impl"
     private final String implMethodDesc;             // Type descriptor for implementation methods "(I)Ljava/lang/String;"
-    private final Type[] implMethodArgumentTypes;    // ASM types for implementaion method parameters
-    private final Type implMethodReturnType;         // ASM type for implementaion method return type "Ljava/lang/String;"
+    private final Type[] implMethodArgumentTypes;    // ASM types for implementation method parameters
+    private final Type implMethodReturnType;         // ASM type for implementation method return type "Ljava/lang/String;"
     private final MethodType constructorType;        // Generated class constructor type "(CC)void"
     private final String constructorDesc;            // Type descriptor for constructor "(LCC;)V"
     private final ClassWriter cw;                    // ASM class writer
@@ -259,29 +273,31 @@
 
         final byte[] classBytes = cw.toByteArray();
 
-        /*** Uncomment to dump the generated file
-            System.out.printf("Loaded: %s (%d bytes) %n", lambdaClassName,
-                              classBytes.length);
-            try (FileOutputStream fos = new FileOutputStream(lambdaClassName
-                                            .replace('/', '.') + ".class")) {
-                fos.write(classBytes);
-            } catch (IOException ex) {
-                PlatformLogger.getLogger(InnerClassLambdaMetafactory.class
-                                      .getName()).severe(ex.getMessage(), ex);
-            }
-        ***/
+        // If requested, dump out to a file for debugging purposes
+        if (dumper != null) {
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                @Override
+                public Void run() {
+                    dumper.dumpClass(lambdaClassName, classBytes);
+                    return null;
+                }
+            }, null,
+            new FilePermission("<<ALL FILES>>", "read, write"),
+            // createDirectories may need it
+            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();
-                }
-            }
-        );
+                              ? null
+                              : AccessController.doPrivileged(
+                                      new PrivilegedAction<ProtectionDomain>() {
+                                          @Override
+                                          public ProtectionDomain run() {
+                                              return targetClass.getProtectionDomain();
+                                          }
+                                      }
+                              );
 
         return UNSAFE.defineClass(lambdaClassName,
                                   classBytes, 0, classBytes.length,
--- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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/MethodHandle.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/invoke/MethodHandle.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/MethodHandles.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/invoke/MethodHandles.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.*;
 ...
@@ -1759,6 +1768,12 @@
             if (MethodHandleNatives.refKindIsField(refKind)) {
                 return getDirectFieldNoSecurityManager(refKind, defc, member);
             } else if (MethodHandleNatives.refKindIsMethod(refKind)) {
+                if (defc == MethodHandle.class && refKind == REF_invokeVirtual) {
+                    MethodHandle mh = findVirtualForMH(member.getName(), member.getMethodType());
+                    if (mh != null) {
+                        return mh;
+                    }
+                }
                 return getDirectMethodNoSecurityManager(refKind, defc, member, lookupClass);
             } else if (refKind == REF_newInvokeSpecial) {
                 return getDirectConstructorNoSecurityManager(defc, member);
@@ -2208,7 +2223,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 +2237,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 +2281,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 +2299,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 +2347,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 +2440,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 +2545,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 +2636,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/invoke/MethodType.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/ProxyClassesDumper.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.  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;
+
+import sun.util.logging.PlatformLogger;
+
+import java.io.FilePermission;
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/**
+ * Helper class used by InnerClassLambdaMetafactory to log generated classes
+ *
+ * @implNote
+ * <p> Because this class is called by LambdaMetafactory, make use
+ * of lambda lead to recursive calls cause stack overflow.
+ */
+final class ProxyClassesDumper {
+    private static final char[] HEX = {
+        '0', '1', '2', '3', '4', '5', '6', '7',
+        '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+    };
+    private static final char[] BAD_CHARS = {
+        '\\', ':', '*', '?', '"', '<', '>', '|'
+    };
+    private static final String[] REPLACEMENT = {
+        "%5C", "%3A", "%2A", "%3F", "%22", "%3C", "%3E", "%7C"
+    };
+
+    private final Path dumpDir;
+
+    public static ProxyClassesDumper getInstance(String path) {
+        if (null == path) {
+            return null;
+        }
+        try {
+            path = path.trim();
+            final Path dir = Paths.get(path.length() == 0 ? "." : path);
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                    @Override
+                    public Void run() {
+                        validateDumpDir(dir);
+                        return null;
+                    }
+                }, null, new FilePermission("<<ALL FILES>>", "read, write"));
+            return new ProxyClassesDumper(dir);
+        } catch (InvalidPathException ex) {
+            PlatformLogger.getLogger(ProxyClassesDumper.class.getName())
+                          .warning("Path " + path + " is not valid - dumping disabled", ex);
+        } catch (IllegalArgumentException iae) {
+            PlatformLogger.getLogger(ProxyClassesDumper.class.getName())
+                          .warning(iae.getMessage() + " - dumping disabled");
+        }
+        return null;
+    }
+
+    private ProxyClassesDumper(Path path) {
+        dumpDir = Objects.requireNonNull(path);
+    }
+
+    private static void validateDumpDir(Path path) {
+        if (!Files.exists(path)) {
+            throw new IllegalArgumentException("Directory " + path + " does not exist");
+        } else if (!Files.isDirectory(path)) {
+            throw new IllegalArgumentException("Path " + path + " is not a directory");
+        } else if (!Files.isWritable(path)) {
+            throw new IllegalArgumentException("Directory " + path + " is not writable");
+        }
+    }
+
+    public static String encodeForFilename(String className) {
+        final int len = className.length();
+        StringBuilder sb = new StringBuilder(len);
+
+        for (int i = 0; i < len; i++) {
+            char c = className.charAt(i);
+            // control characters
+            if (c <= 31) {
+                sb.append('%');
+                sb.append(HEX[c >> 4 & 0x0F]);
+                sb.append(HEX[c & 0x0F]);
+            } else {
+                int j = 0;
+                for (; j < BAD_CHARS.length; j++) {
+                    if (c == BAD_CHARS[j]) {
+                        sb.append(REPLACEMENT[j]);
+                        break;
+                    }
+                }
+                if (j >= BAD_CHARS.length) {
+                    sb.append(c);
+                }
+            }
+        }
+
+        return sb.toString();
+    }
+
+    public void dumpClass(String className, final byte[] classBytes) {
+        Path file;
+        try {
+            file = dumpDir.resolve(encodeForFilename(className) + ".class");
+        } catch (InvalidPathException ex) {
+            PlatformLogger.getLogger(ProxyClassesDumper.class.getName())
+                          .warning("Invalid path for class " + className);
+            return;
+        }
+
+        try {
+            Path dir = file.getParent();
+            Files.createDirectories(dir);
+            Files.write(file, classBytes);
+        } catch (Exception ignore) {
+            PlatformLogger.getLogger(ProxyClassesDumper.class.getName())
+                          .warning("Exception writing to path at " + file.toString());
+            // simply don't care if this operation failed
+        }
+    }
+}
--- a/src/share/classes/java/lang/reflect/Array.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/reflect/Array.java	Fri Oct 25 10:39:13 2013 -0700
@@ -55,13 +55,18 @@
      * </pre>
      * </blockquote>
      *
+     * <p>The number of dimensions of the new array must not
+     * exceed 255.
+     *
      * @param componentType the {@code Class} object representing the
      * component type of the new array
      * @param length the length of the new array
      * @return the new array
      * @exception NullPointerException if the specified
      * {@code componentType} parameter is null
-     * @exception IllegalArgumentException if componentType is {@link Void#TYPE}
+     * @exception IllegalArgumentException if componentType is {@link
+     * Void#TYPE} or if the number of dimensions of the requested array
+     * instance exceed 255.
      * @exception NegativeArraySizeException if the specified {@code length}
      * is negative
      */
@@ -85,8 +90,7 @@
      * {@code componentType}.
      *
      * <p>The number of dimensions of the new array must not
-     * exceed the number of array dimensions supported by the
-     * implementation (typically 255).
+     * exceed 255.
      *
      * @param componentType the {@code Class} object representing the component
      * type of the new array
@@ -96,10 +100,9 @@
      * @exception NullPointerException if the specified
      * {@code componentType} argument is null
      * @exception IllegalArgumentException if the specified {@code dimensions}
-     * argument is a zero-dimensional array, or if the number of
-     * requested dimensions exceeds the limit on the number of array dimensions
-     * supported by the implementation (typically 255), or if componentType
-     * is {@link Void#TYPE}.
+     * argument is a zero-dimensional array, if componentType is {@link
+     * Void#TYPE}, or if the number of dimensions of the requested array
+     * instance exceed 255.
      * @exception NegativeArraySizeException if any of the components in
      * the specified {@code dimensions} argument is negative.
      */
--- a/src/share/classes/java/lang/reflect/MalformedParametersException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/reflect/MalformedParametersException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -50,10 +50,22 @@
  */
 public class MalformedParametersException extends RuntimeException {
 
+    /**
+     * Version for serialization.
+     */
     private static final long serialVersionUID = 20130919L;
 
+    /**
+     * Create a {@code MalformedParametersException} with an empty
+     * reason.
+     */
     public MalformedParametersException() {}
 
+    /**
+     * Create a {@code MalformedParametersException}.
+     *
+     * @param reason The reason for the exception.
+     */
     public MalformedParametersException(String reason) {
         super(reason);
     }
--- a/src/share/classes/java/lang/reflect/Proxy.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/lang/reflect/Proxy.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/math/BigDecimal.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/math/BigDecimal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/BigInteger.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/math/BigInteger.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
 import java.io.ObjectStreamField;
 import java.util.Arrays;
 import java.util.Random;
+import java.util.concurrent.ThreadLocalRandom;
 import sun.misc.DoubleConsts;
 import sun.misc.FloatConsts;
 
@@ -918,15 +919,6 @@
         return u;
     }
 
-    private static volatile Random staticRandom;
-
-    private static Random getSecureRandom() {
-        if (staticRandom == null) {
-            staticRandom = new java.security.SecureRandom();
-        }
-        return staticRandom;
-    }
-
     /**
      * Returns true iff this BigInteger passes the specified number of
      * Miller-Rabin tests. This test is taken from the DSA spec (NIST FIPS
@@ -945,7 +937,7 @@
 
         // Do the tests
         if (rnd == null) {
-            rnd = getSecureRandom();
+            rnd = ThreadLocalRandom.current();
         }
         for (int i=0; i < iterations; i++) {
             // Generate a uniform random on (1, this)
--- a/src/share/classes/java/math/RoundingMode.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/math/RoundingMode.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/ContentHandler.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/net/ContentHandler.java	Fri Oct 25 10:39:13 2013 -0700
@@ -96,6 +96,7 @@
      * @exception  IOException  if an I/O error occurs while reading the object.
      * @since 1.3
      */
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
         Object obj = getContent(urlc);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/net/HostPortrange.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.net;
+
+import java.net.*;
+import java.util.Formatter;
+import java.util.Locale;
+import sun.net.util.IPAddressUtil;
+
+/**
+ * Parses a string containing a host/domain name and port range
+ */
+class HostPortrange {
+
+    String hostname;
+    String scheme;
+    int[] portrange;
+
+    boolean wildcard;
+    boolean literal;
+    boolean ipv6, ipv4;
+    static final int PORT_MIN = 0;
+    static final int PORT_MAX = (1 << 16) -1;
+
+    boolean equals(HostPortrange that) {
+        return this.hostname.equals(that.hostname)
+            && this.portrange[0] == that.portrange[0]
+            && this.portrange[1] == that.portrange[1]
+            && this.wildcard == that.wildcard
+            && this.literal == that.literal;
+    }
+
+    public int hashCode() {
+        return hostname.hashCode() + portrange[0] + portrange[1];
+    }
+
+    HostPortrange(String scheme, String str) {
+        // Parse the host name.  A name has up to three components, the
+        // hostname, a port number, or two numbers representing a port
+        // range.   "www.sun.com:8080-9090" is a valid host name.
+
+        // With IPv6 an address can be 2010:836B:4179::836B:4179
+        // An IPv6 address needs to be enclose in []
+        // For ex: [2010:836B:4179::836B:4179]:8080-9090
+        // Refer to RFC 2732 for more information.
+
+        // first separate string into two fields: hoststr, portstr
+        String hoststr, portstr = null;
+        this.scheme = scheme;
+
+        // check for IPv6 address
+        if (str.charAt(0) == '[') {
+            ipv6 = literal = true;
+            int rb = str.indexOf(']');
+            if (rb != -1) {
+                hoststr = str.substring(1, rb);
+            } else {
+                throw new IllegalArgumentException("invalid IPv6 address: " + str);
+            }
+            int sep = str.indexOf(':', rb + 1);
+            if (sep != -1 && str.length() > sep) {
+                portstr = str.substring(sep + 1);
+            }
+            // need to normalize hoststr now
+            byte[] ip = IPAddressUtil.textToNumericFormatV6(hoststr);
+            if (ip == null) {
+                throw new IllegalArgumentException("illegal IPv6 address");
+            }
+            StringBuilder sb = new StringBuilder();
+            Formatter formatter = new Formatter(sb, Locale.US);
+            formatter.format("%02x%02x:%02x%02x:%02x%02x:%02x"
+                    + "%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
+                    ip[0], ip[1], ip[2], ip[3], ip[4], ip[5], ip[6], ip[7], ip[8],
+                    ip[9], ip[10], ip[11], ip[12], ip[13], ip[14], ip[15]);
+            hostname = sb.toString();
+        } else {
+            // not IPv6 therefore ':' is the port separator
+
+            int sep = str.indexOf(':');
+            if (sep != -1 && str.length() > sep) {
+                hoststr = str.substring(0, sep);
+                portstr = str.substring(sep + 1);
+            } else {
+                hoststr = sep == -1 ? str : str.substring(0, sep);
+            }
+            // is this a domain wildcard specification?
+            if (hoststr.lastIndexOf('*') > 0) {
+                throw new IllegalArgumentException("invalid host wildcard specification");
+            } else if (hoststr.startsWith("*")) {
+                wildcard = true;
+                if (hoststr.equals("*")) {
+                    hoststr = "";
+                } else if (hoststr.startsWith("*.")) {
+                    hoststr = hoststr.substring(1).toLowerCase(); // leave the '.' ?
+                } else {
+                    throw new IllegalArgumentException("invalid host wildcard specification");
+                }
+            } else {
+                // check if ipv4 (if rightmost label a number)
+                // The normal way to specify ipv4 is 4 decimal labels
+                // but actually three, two or single label formats valid also
+                // So, we recognise ipv4 by just testing the rightmost label
+                // being a number.
+                int lastdot = hoststr.lastIndexOf('.');
+                if (lastdot != -1 && (hoststr.length() > 1)) {
+                    boolean ipv4 = true;
+
+                    for (int i = lastdot + 1, len = hoststr.length(); i < len; i++) {
+                        char c = hoststr.charAt(i);
+                        if (c < '0' || c > '9') {
+                            ipv4 = false;
+                            break;
+                        }
+                    }
+                    this.ipv4 = this.literal = ipv4;
+                    if (ipv4) {
+                        byte[] ip = IPAddressUtil.textToNumericFormatV4(hoststr);
+                        if (ip == null) {
+                            throw new IllegalArgumentException("illegal IPv4 address");
+                        }
+                        StringBuilder sb = new StringBuilder();
+                        Formatter formatter = new Formatter(sb, Locale.US);
+                        formatter.format("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
+                        hoststr = sb.toString();
+                    } else {
+                        // regular domain name
+                        hoststr = hoststr.toLowerCase();
+                    }
+                }
+            }
+            hostname = hoststr;
+        }
+
+        try {
+            portrange = parsePort(portstr);
+        } catch (Exception e) {
+            throw new IllegalArgumentException("invalid port range: " + portstr);
+        }
+    }
+
+    public boolean literal() {
+        return literal;
+    }
+
+    public boolean ipv4Literal() {
+        return ipv4;
+    }
+
+    public boolean ipv6Literal() {
+        return ipv6;
+    }
+
+    public String hostname() {
+        return hostname;
+    }
+
+    public int[] portrange() {
+        return portrange;
+    }
+
+    /**
+     * returns true if the hostname part started with *
+     * hostname returns the remaining part of the host component
+     * eg "*.foo.com" -> ".foo.com" or "*" -> ""
+     *
+     * @return
+     */
+    public boolean wildcard() {
+        return wildcard;
+    }
+
+    // these shouldn't leak outside the implementation
+    final static int[] HTTP_PORT = {80, 80};
+    final static int[] HTTPS_PORT = {443, 443};
+    final static int[] NO_PORT = {-1, -1};
+
+    int[] defaultPort() {
+        if (scheme.equals("http")) {
+            return HTTP_PORT;
+        } else if (scheme.equals("https")) {
+            return HTTPS_PORT;
+        }
+        return NO_PORT;
+    }
+
+    int[] parsePort(String port)
+    {
+
+        if (port == null || port.equals("")) {
+            return defaultPort();
+        }
+
+        if (port.equals("*")) {
+            return new int[] {PORT_MIN, PORT_MAX};
+        }
+
+        try {
+            int dash = port.indexOf('-');
+
+            if (dash == -1) {
+                int p = Integer.parseInt(port);
+                return new int[] {p, p};
+            } else {
+                String low = port.substring(0, dash);
+                String high = port.substring(dash+1);
+                int l,h;
+
+                if (low.equals("")) {
+                    l = PORT_MIN;
+                } else {
+                    l = Integer.parseInt(low);
+                }
+
+                if (high.equals("")) {
+                    h = PORT_MAX;
+                } else {
+                    h = Integer.parseInt(high);
+                }
+                if (l < 0 || h < 0 || h<l) {
+                    return defaultPort();
+                }
+                return new int[] {l, h};
+             }
+        } catch (IllegalArgumentException e) {
+            return defaultPort();
+        }
+    }
+}
--- a/src/share/classes/java/net/HttpURLConnection.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/net/HttpURLConnection.java	Fri Oct 25 10:39:13 2013 -0700
@@ -57,7 +57,7 @@
  * attempt to open a connection, the caller must possess either:-
  * <ul><li>a "connect" {@link SocketPermission} to the host/port combination of the
  * destination URL or</li>
- * <li>a {@link HttpURLPermission} that permits this request.</li>
+ * <li>a {@link URLPermission} that permits this request.</li>
  * </ul><p>
  * If automatic redirection is enabled, and this request is redirected to another
  * destination, then the caller must also have permission to connect to the
--- a/src/share/classes/java/net/HttpURLPermission.java	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,408 +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.  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.net;
-
-import java.io.ObjectInputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.security.Permission;
-
-/**
- * Represents permission to access a resource or set of resources defined by a
- * given http or https url, and for a given set of user-settable request methods
- * and request headers. The <i>name</i> of the permission is the url string.
- * The <i>actions</i> string is a concatenation of the request methods and headers.
- * The range of method and header names is not restricted by this class.
- * <p><b>The url</b><p>
- * The url string is also used to instantiate a {@link URI} object which is
- * used for comparison with other HttpURLPermission instances. Therefore, any
- * references in this specification to url, mean this URI object.
- * The path component of the url comprises a sequence of path segments, separated
- * by '/' characters. The path is specified in a similar way to the path
- * in {@link java.io.FilePermission}. There are three different ways
- * as the following examples show:
- * <table border>
- * <caption>URL Examples</caption>
- * <tr><th>Example url</th><th>Description</th></tr>
- * <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td>
- *   <td>A url which identifies a specific (single) resource</td>
- * </tr>
- * <tr><td>http://www.oracle.com/a/b/*</td>
- *   <td>The '*' character refers to all resources in the same "directory" - in
- *       other words all resources with the same number of path components, and
- *       which only differ in the final path component, represented by the '*'.
- *   </td>
- * </tr>
- * <tr><td>http://www.oracle.com/a/b/-</td>
- *   <td>The '-' character refers to all resources recursively below the
- *       preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
- *       example).
- *   </td>
- * </tr>
- * </table>
- * <p>
- * The '*' and '-' may only be specified in the final segment of a path and must be
- * the only character in that segment. Any query or fragment components of the
- * url are ignored when constructing HttpURLPermissions.
- * <p>
- * As a special case, urls of the form, "http:*" or "https:*" are accepted to
- * mean any url of the given scheme.
- * <p><b>The actions string</b><p>
- * The actions string of a HttpURLPermission is a concatenation of the <i>method list</i>
- * and the <i>request headers list</i>. These are lists of the permitted HTTP request
- * methods and permitted request headers of the permission (respectively). The two lists
- * are separated by a colon ':' character and elements of each list are comma separated.
- * Some examples are:
- * <pre>
- *         "POST,GET,DELETE"
- *         "GET:X-Foo-Request,X-Bar-Request"
- *         "POST,GET:Header1,Header2"
- * </pre>
- * The first example specifies the methods: POST, GET and DELETE, but no request headers.
- * The second example specifies one request method and two headers. The third
- * example specifies two request methods, and two headers.
- * <p>
- * The colon separator need not be present if the request headers list is empty.
- * No white-space is permitted in the actions string. The action strings supplied to
- * the HttpURLPermission constructors are case-insensitive and are normalized by converting
- * method names to upper-case and header names to the form defines in RFC2616 (lower case
- * with initial letter of each word capitalized). Either list can contain a wild-card '*'
- * character which signifies all request methods or headers respectively.
- * <p>
- * Note. Depending on the context of use, some request methods and headers may be permitted
- * at all times, and others may not be permitted at any time. For example, the
- * HTTP protocol handler might disallow certain headers such as Content-Length
- * from being set by application code, regardless of whether the security policy
- * in force, permits it.
- *
- * @since 1.8
- */
-public final class HttpURLPermission extends Permission {
-
-    private static final long serialVersionUID = -2702463814894478682L;
-
-    private transient URI uri;
-    private transient List<String> methods;
-    private transient List<String> requestHeaders;
-
-    // serialized field
-    private String actions;
-
-    /**
-     * Creates a new HttpURLPermission from a url string and which permits the given
-     * request methods and user-settable request headers.
-     * The name of the permission is its url string. Only the scheme, authority
-     * and path components of the url are used. Any fragment or query
-     * components are ignored. The permissions action string is as specified above.
-     *
-     * @param url the url string
-     *
-     * @param actions the actions string
-     *
-     * @throws    IllegalArgumentException if url does not result in a valid {@link URI},
-     *            its scheme is not http or https, or if actions contains white-space.
-     */
-    public HttpURLPermission(String url, String actions) {
-        super(url);
-        init(actions);
-    }
-
-    private void init(String actions) {
-        URI uri = parseURI(getName());
-        int colon = actions.indexOf(':');
-        if (actions.lastIndexOf(':') != colon) {
-            throw new IllegalArgumentException("invalid actions string");
-        }
-
-        String methods, headers;
-        if (colon == -1) {
-            methods = actions;
-            headers = "";
-        } else {
-            methods = actions.substring(0, colon);
-            headers = actions.substring(colon+1);
-        }
-
-        List<String> l = normalizeMethods(methods);
-        Collections.sort(l);
-        this.methods = Collections.unmodifiableList(l);
-
-        l = normalizeHeaders(headers);
-        Collections.sort(l);
-        this.requestHeaders = Collections.unmodifiableList(l);
-
-        this.actions = actions();
-        this.uri = uri;
-    }
-
-    /**
-     * Creates a HttpURLPermission with the given url string and unrestricted
-     * methods and request headers by invoking the two argument
-     * constructor as follows: HttpURLPermission(url, "*:*")
-     *
-     * @param url the url string
-     *
-     * @throws    IllegalArgumentException if url does not result in a valid {@link URI}
-     */
-    public HttpURLPermission(String url) {
-        this(url, "*:*");
-    }
-
-    /**
-     * Returns the normalized method list and request
-     * header list, in the form:
-     * <pre>
-     *      "method-names : header-names"
-     * </pre>
-     * <p>
-     * where method-names is the list of methods separated by commas
-     * and header-names is the list of permitted headers separated by commas.
-     * There is no white space in the returned String. If header-names is empty
-     * then the colon separator will not be present.
-     */
-    public String getActions() {
-        return actions;
-    }
-
-    /**
-     * Checks if this HttpURLPermission implies the given permission.
-     * Specifically, the following checks are done as if in the
-     * following sequence:
-     * <p><ul>
-     * <li>if 'p' is not an instance of HttpURLPermission 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>
-     * <li>if any of p's headers are not in this's request header list, and if
-     *     this's request header list is not equal to "*", then return false.</li>
-     * <li>if this's url is equal to p's url , then return true</li>
-     * <li>if this's url scheme is not equal to p's url scheme return false</li>
-     * <li>if the scheme specific part of this's url is '*' return true</li>
-     * <li>if this's url authority is not equal to p's url authority
-     *     return false</li>
-     * <li>if the path or paths specified by p's url are contained in the
-     *     set of paths specified by this's url, then return true
-     * <li>otherwise, return false</li>
-     * </ul>
-     * <p>Some examples of how paths are matched are shown below:
-     * <p><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>
-     * <tr><td>/a/b/*</td><td>/a/b/c</td><td>yes</td></tr>
-     * <tr><td>/a/b/*</td><td>/a/b/c/d</td><td>no</td></tr>
-     * <tr><td>/a/b/-</td><td>/a/b/c/d</td><td>yes</td></tr>
-     * <tr><td>/a/b/-</td><td>/a/b/c/d/e</td><td>yes</td></tr>
-     * <tr><td>/a/b/-</td><td>/a/b/c/*</td><td>yes</td></tr>
-     * <tr><td>/a/b/*</td><td>/a/b/c/-</td><td>no</td></tr>
-     * </table>
-     */
-    public boolean implies(Permission p) {
-        if (! (p instanceof HttpURLPermission)) {
-            return false;
-        }
-
-        HttpURLPermission that = (HttpURLPermission)p;
-
-        if (!this.methods.get(0).equals("*") &&
-                Collections.indexOfSubList(this.methods, that.methods) == -1) {
-            return false;
-        }
-
-        if (this.requestHeaders.isEmpty() && !that.requestHeaders.isEmpty()) {
-            return false;
-        }
-
-        if (!this.requestHeaders.isEmpty() &&
-            !this.requestHeaders.get(0).equals("*") &&
-             Collections.indexOfSubList(this.requestHeaders,
-                                        that.requestHeaders) == -1) {
-            return false;
-        }
-
-        if (this.uri.equals(that.uri)) {
-            return true;
-        }
-
-        if (!this.uri.getScheme().equals(that.uri.getScheme())) {
-            return false;
-        }
-
-        if (this.uri.getSchemeSpecificPart().equals("*")) {
-            return true;
-        }
-
-        String thisAuthority = this.uri.getAuthority();
-
-            if (thisAuthority != null &&
-                    !thisAuthority.equals(that.uri.getAuthority())) {
-            return false;
-        }
-
-        String thispath = this.uri.getPath();
-        String thatpath = that.uri.getPath();
-
-        if (thispath.endsWith("/-")) {
-            String thisprefix = thispath.substring(0, thispath.length() - 1);
-            return thatpath.startsWith(thisprefix);
-            }
-
-        if (thispath.endsWith("/*")) {
-            String thisprefix = thispath.substring(0, thispath.length() - 1);
-            if (!thatpath.startsWith(thisprefix)) {
-                return false;
-            }
-            String thatsuffix = thatpath.substring(thisprefix.length());
-            // suffix must not contain '/' chars
-            if (thatsuffix.indexOf('/') != -1) {
-                return false;
-            }
-            if (thatsuffix.equals("-")) {
-                return false;
-            }
-            return true;
-        }
-        return false;
-    }
-
-
-    /**
-     * Returns true if, this.getActions().equals(p.getActions())
-     * and p's url equals this's url.  Returns false otherwise.
-     */
-    public boolean equals(Object p) {
-        if (!(p instanceof HttpURLPermission)) {
-            return false;
-        }
-        HttpURLPermission that = (HttpURLPermission)p;
-        return this.getActions().equals(that.getActions()) &&
-                  this.uri.equals(that.uri);
-    }
-
-    /**
-     * Returns a hashcode calculated from the hashcode of the
-     * actions String and the url
-     */
-    public int hashCode() {
-        return getActions().hashCode() + uri.hashCode();
-    }
-
-
-    private List<String> normalizeMethods(String methods) {
-        List<String> l = new ArrayList<>();
-        StringBuilder b = new StringBuilder();
-        for (int i=0; i<methods.length(); i++) {
-            char c = methods.charAt(i);
-            if (c == ',') {
-                String s = b.toString();
-                if (s.length() > 0)
-                    l.add(s);
-                b = new StringBuilder();
-            } else if (c == ' ' || c == '\t') {
-                throw new IllegalArgumentException("white space not allowed");
-            } else {
-                if (c >= 'a' && c <= 'z') {
-                    c += 'A' - 'a';
-                }
-                b.append(c);
-            }
-        }
-        String s = b.toString();
-        if (s.length() > 0)
-            l.add(s);
-        return l;
-    }
-
-    private List<String> normalizeHeaders(String headers) {
-        List<String> l = new ArrayList<>();
-        StringBuilder b = new StringBuilder();
-        boolean capitalizeNext = true;
-        for (int i=0; i<headers.length(); i++) {
-            char c = headers.charAt(i);
-            if (c >= 'a' && c <= 'z') {
-                if (capitalizeNext) {
-                    c += 'A' - 'a';
-                    capitalizeNext = false;
-                }
-                b.append(c);
-            } else if (c == ' ' || c == '\t') {
-                throw new IllegalArgumentException("white space not allowed");
-            } else if (c == '-') {
-                    capitalizeNext = true;
-                b.append(c);
-            } else if (c == ',') {
-                String s = b.toString();
-                if (s.length() > 0)
-                    l.add(s);
-                b = new StringBuilder();
-                capitalizeNext = true;
-            } else {
-                capitalizeNext = false;
-                b.append(c);
-            }
-        }
-        String s = b.toString();
-        if (s.length() > 0)
-            l.add(s);
-        return l;
-    }
-
-    private URI parseURI(String url) {
-        URI u = URI.create(url);
-        String scheme = u.getScheme();
-        if (!(scheme.equalsIgnoreCase("http") ||
-             scheme.equalsIgnoreCase("https"))) {
-            throw new IllegalArgumentException ("unexpected URL scheme");
-        }
-        if (!u.getSchemeSpecificPart().equals("*")) {
-            u = URI.create(scheme + "://" + u.getRawAuthority() + u.getRawPath());
-        }
-        return u;
-    }
-
-    private String actions() {
-        StringBuilder b = new StringBuilder();
-        for (String s : methods) {
-            b.append(s);
-        }
-        b.append(":");
-        for (String s : requestHeaders) {
-            b.append(s);
-        }
-        return b.toString();
-    }
-    /**
-     * restore the state of this object from stream
-     */
-    private void readObject(ObjectInputStream s)
-        throws IOException, ClassNotFoundException {
-        ObjectInputStream.GetField fields = s.readFields();
-        String actions = (String)fields.get("actions", null);
-
-        init(actions);
-    }
-}
--- a/src/share/classes/java/net/Inet6Address.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/net/Inet6Address.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/net/InetAddress.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/net/URLPermission.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,523 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.net;
+
+import java.io.ObjectInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.security.Permission;
+
+/**
+ * Represents permission to access a resource or set of resources defined by a
+ * given url, and for a given set of user-settable request methods
+ * and request headers. The <i>name</i> of the permission is the url string.
+ * The <i>actions</i> string is a concatenation of the request methods and headers.
+ * The range of method and header names is not restricted by this class.
+ * <p><b>The url</b><p>
+ * The url string has the following expected structure.
+ * <pre>
+ *     scheme : // authority [ / path ]
+ * </pre>
+ * <i>scheme</i> will typically be http or https, but is not restricted by this
+ * class.
+ * <i>authority</i> is specified as:<p>
+ * <pre>
+ *     authority = hostrange [ : portrange ]
+ *     portrange = portnumber | -portnumber | portnumber-[portnumber] | *
+ *     hostrange = ([*.] dnsname) | IPv4address | IPv6address
+ * </pre>
+ * <i>dnsname</i> is a standard DNS host or domain name, ie. one or more labels
+ * separated by ".". <i>IPv4address</i> is a standard literal IPv4 address and
+ * <i>IPv6address</i> is as defined in <a href="http://www.ietf.org/rfc/rfc2732.txt">
+ * RFC 2732</a>. Literal IPv6 addresses must however, be enclosed in '[]' characters.
+ * The <i>dnsname</i> specification can be preceded by "*." which means
+ * the name will match any hostname whose right-most domain labels are the same as
+ * this name. For example, "*.oracle.com" matches "foo.bar.oracle.com"
+ * <p>
+ * <i>portrange</i> is used to specify a port number, or a bounded or unbounded range of ports
+ * that this permission applies to. If portrange is absent or invalid, then a default
+ * port number is assumed if the scheme is {@code http} (default 80) or {@code https}
+ * (default 443). No default is assumed for other schemes. A wildcard may be specified
+ * which means all ports.
+ * <p>
+ * The <i>path</i> component comprises a sequence of path segments,
+ * separated by '/' characters. <i>path</i> may also be empty. The path is specified
+ * in a similar way to the path in {@link java.io.FilePermission}. There are
+ * three different ways as the following examples show:
+ * <table border>
+ * <caption>URL Examples</caption>
+ * <tr><th>Example url</th><th>Description</th></tr>
+ * <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td>
+ *   <td>A url which identifies a specific (single) resource</td>
+ * </tr>
+ * <tr><td>http://www.oracle.com/a/b/*</td>
+ *   <td>The '*' character refers to all resources in the same "directory" - in
+ *       other words all resources with the same number of path components, and
+ *       which only differ in the final path component, represented by the '*'.
+ *   </td>
+ * </tr>
+ * <tr><td>http://www.oracle.com/a/b/-</td>
+ *   <td>The '-' character refers to all resources recursively below the
+ *       preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
+ *       example).
+ *   </td>
+ * </tr>
+ * </table>
+ * <p>
+ * The '*' and '-' may only be specified in the final segment of a path and must be
+ * the only character in that segment. Any query or fragment components of the
+ * url are ignored when constructing URLPermissions.
+ * <p>
+ * As a special case, urls of the form, "scheme:*" are accepted to
+ * mean any url of the given scheme.
+ * <p>
+ * The <i>scheme</i> and <i>authority</i> components of the url string are handled
+ * without regard to case. This means {@link #equals(Object)},
+ * {@link #hashCode()} and {@link #implies(Permission)} are case insensitive with respect
+ * to these components. If the <i>authority</i> contains a literal IP address,
+ * then the address is normalized for comparison. The path component is case sensitive.
+ * <p><b>The actions string</b><p>
+ * The actions string of a URLPermission is a concatenation of the <i>method list</i>
+ * and the <i>request headers list</i>. These are lists of the permitted request
+ * methods and permitted request headers of the permission (respectively). The two lists
+ * are separated by a colon ':' character and elements of each list are comma separated.
+ * Some examples are:
+ * <pre>
+ *         "POST,GET,DELETE"
+ *         "GET:X-Foo-Request,X-Bar-Request"
+ *         "POST,GET:Header1,Header2"
+ * </pre>
+ * The first example specifies the methods: POST, GET and DELETE, but no request headers.
+ * The second example specifies one request method and two headers. The third
+ * example specifies two request methods, and two headers.
+ * <p>
+ * The colon separator need not be present if the request headers list is empty.
+ * No white-space is permitted in the actions string. The action strings supplied to
+ * the URLPermission constructors are case-insensitive and are normalized by converting
+ * method names to upper-case and header names to the form defines in RFC2616 (lower case
+ * with initial letter of each word capitalized). Either list can contain a wild-card '*'
+ * character which signifies all request methods or headers respectively.
+ * <p>
+ * Note. Depending on the context of use, some request methods and headers may be permitted
+ * at all times, and others may not be permitted at any time. For example, the
+ * HTTP protocol handler might disallow certain headers such as Content-Length
+ * from being set by application code, regardless of whether the security policy
+ * in force, permits it.
+ *
+ * @since 1.8
+ */
+public final class URLPermission extends Permission {
+
+    private static final long serialVersionUID = -2702463814894478682L;
+
+    private transient String scheme;
+    private transient String ssp;                 // scheme specific part
+    private transient String path;
+    private transient List<String> methods;
+    private transient List<String> requestHeaders;
+    private transient Authority authority;
+
+    // serialized field
+    private String actions;
+
+    /**
+     * Creates a new URLPermission from a url string and which permits the given
+     * request methods and user-settable request headers.
+     * The name of the permission is the url string it was created with. Only the scheme,
+     * authority and path components of the url are used internally. Any fragment or query
+     * components are ignored. The permissions action string is as specified above.
+     *
+     * @param url the url string
+     *
+     * @param actions the actions string
+     *
+     * @exception IllegalArgumentException if url is invalid or if actions contains white-space.
+     */
+    public URLPermission(String url, String actions) {
+        super(url);
+        init(actions);
+    }
+
+    private void init(String actions) {
+        parseURI(getName());
+        int colon = actions.indexOf(':');
+        if (actions.lastIndexOf(':') != colon) {
+            throw new IllegalArgumentException("invalid actions string");
+        }
+
+        String methods, headers;
+        if (colon == -1) {
+            methods = actions;
+            headers = "";
+        } else {
+            methods = actions.substring(0, colon);
+            headers = actions.substring(colon+1);
+        }
+
+        List<String> l = normalizeMethods(methods);
+        Collections.sort(l);
+        this.methods = Collections.unmodifiableList(l);
+
+        l = normalizeHeaders(headers);
+        Collections.sort(l);
+        this.requestHeaders = Collections.unmodifiableList(l);
+
+        this.actions = actions();
+    }
+
+    /**
+     * Creates a URLPermission with the given url string and unrestricted
+     * methods and request headers by invoking the two argument
+     * constructor as follows: URLPermission(url, "*:*")
+     *
+     * @param url the url string
+     *
+     * @throws    IllegalArgumentException if url does not result in a valid {@link URI}
+     */
+    public URLPermission(String url) {
+        this(url, "*:*");
+    }
+
+    /**
+     * Returns the normalized method list and request
+     * header list, in the form:
+     * <pre>
+     *      "method-names : header-names"
+     * </pre>
+     * <p>
+     * where method-names is the list of methods separated by commas
+     * and header-names is the list of permitted headers separated by commas.
+     * There is no white space in the returned String. If header-names is empty
+     * then the colon separator will not be present.
+     */
+    public String getActions() {
+        return actions;
+    }
+
+    /**
+     * Checks if this URLPermission implies the given permission.
+     * Specifically, the following checks are done as if in the
+     * following sequence:
+     * <p><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>
+     * <li>if any of p's headers are not in this's request header list, and if
+     *     this's request header list is not equal to "*", then return false.</li>
+     * <li>if this's url scheme is not equal to p's url scheme return false</li>
+     * <li>if the scheme specific part of this's url is '*' return true</li>
+     * <li>if the set of hosts defined by p's url hostrange is not a subset of
+     *     this's url hostrange then return false. For example, "*.foo.oracle.com"
+     *     is a subset of "*.oracle.com". "foo.bar.oracle.com" is not
+     *     a subset of "*.foo.oracle.com"</li>
+     * <li>if the portrange defined by p's url is not a subset of the
+     *     portrange defined by this's url then return false.
+     * <li>if the path or paths specified by p's url are contained in the
+     *     set of paths specified by this's url, then return true
+     * <li>otherwise, return false</li>
+     * </ul>
+     * <p>Some examples of how paths are matched are shown below:
+     * <p><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>
+     * <tr><td>/a/b/*</td><td>/a/b/c</td><td>yes</td></tr>
+     * <tr><td>/a/b/*</td><td>/a/b/c/d</td><td>no</td></tr>
+     * <tr><td>/a/b/-</td><td>/a/b/c/d</td><td>yes</td></tr>
+     * <tr><td>/a/b/-</td><td>/a/b/c/d/e</td><td>yes</td></tr>
+     * <tr><td>/a/b/-</td><td>/a/b/c/*</td><td>yes</td></tr>
+     * <tr><td>/a/b/*</td><td>/a/b/c/-</td><td>no</td></tr>
+     * </table>
+     */
+    public boolean implies(Permission p) {
+        if (! (p instanceof URLPermission)) {
+            return false;
+        }
+
+        URLPermission that = (URLPermission)p;
+
+        if (!this.methods.get(0).equals("*") &&
+                Collections.indexOfSubList(this.methods, that.methods) == -1) {
+            return false;
+        }
+
+        if (this.requestHeaders.isEmpty() && !that.requestHeaders.isEmpty()) {
+            return false;
+        }
+
+        if (!this.requestHeaders.isEmpty() &&
+            !this.requestHeaders.get(0).equals("*") &&
+             Collections.indexOfSubList(this.requestHeaders,
+                                        that.requestHeaders) == -1) {
+            return false;
+        }
+
+        if (!this.scheme.equals(that.scheme)) {
+            return false;
+        }
+
+        if (this.ssp.equals("*")) {
+            return true;
+        }
+
+        if (!this.authority.implies(that.authority)) {
+            return false;
+        }
+
+        if (this.path == null) {
+            return that.path == null;
+        }
+        if (that.path == null) {
+            return false;
+        }
+
+        if (this.path.endsWith("/-")) {
+            String thisprefix = this.path.substring(0, this.path.length() - 1);
+            return that.path.startsWith(thisprefix);
+            }
+
+        if (this.path.endsWith("/*")) {
+            String thisprefix = this.path.substring(0, this.path.length() - 1);
+            if (!that.path.startsWith(thisprefix)) {
+                return false;
+            }
+            String thatsuffix = that.path.substring(thisprefix.length());
+            // suffix must not contain '/' chars
+            if (thatsuffix.indexOf('/') != -1) {
+                return false;
+            }
+            if (thatsuffix.equals("-")) {
+                return false;
+            }
+            return true;
+        }
+        return this.path.equals(that.path);
+    }
+
+
+    /**
+     * Returns true if, this.getActions().equals(p.getActions())
+     * and p's url equals this's url.  Returns false otherwise.
+     */
+    public boolean equals(Object p) {
+        if (!(p instanceof URLPermission)) {
+            return false;
+        }
+        URLPermission that = (URLPermission)p;
+        if (!this.scheme.equals(that.scheme)) {
+            return false;
+        }
+        if (!this.getActions().equals(that.getActions())) {
+            return false;
+        }
+        if (!this.authority.equals(that.authority)) {
+            return false;
+        }
+        if (this.path != null) {
+            return this.path.equals(that.path);
+        } else {
+            return that.path == null;
+        }
+    }
+
+    /**
+     * Returns a hashcode calculated from the hashcode of the
+     * actions String and the url string.
+     */
+    public int hashCode() {
+        return getActions().hashCode()
+            + scheme.hashCode()
+            + authority.hashCode()
+            + path == null ? 0 : path.hashCode();
+    }
+
+
+    private List<String> normalizeMethods(String methods) {
+        List<String> l = new ArrayList<>();
+        StringBuilder b = new StringBuilder();
+        for (int i=0; i<methods.length(); i++) {
+            char c = methods.charAt(i);
+            if (c == ',') {
+                String s = b.toString();
+                if (s.length() > 0)
+                    l.add(s);
+                b = new StringBuilder();
+            } else if (c == ' ' || c == '\t') {
+                throw new IllegalArgumentException("white space not allowed");
+            } else {
+                if (c >= 'a' && c <= 'z') {
+                    c += 'A' - 'a';
+                }
+                b.append(c);
+            }
+        }
+        String s = b.toString();
+        if (s.length() > 0)
+            l.add(s);
+        return l;
+    }
+
+    private List<String> normalizeHeaders(String headers) {
+        List<String> l = new ArrayList<>();
+        StringBuilder b = new StringBuilder();
+        boolean capitalizeNext = true;
+        for (int i=0; i<headers.length(); i++) {
+            char c = headers.charAt(i);
+            if (c >= 'a' && c <= 'z') {
+                if (capitalizeNext) {
+                    c += 'A' - 'a';
+                    capitalizeNext = false;
+                }
+                b.append(c);
+            } else if (c == ' ' || c == '\t') {
+                throw new IllegalArgumentException("white space not allowed");
+            } else if (c == '-') {
+                    capitalizeNext = true;
+                b.append(c);
+            } else if (c == ',') {
+                String s = b.toString();
+                if (s.length() > 0)
+                    l.add(s);
+                b = new StringBuilder();
+                capitalizeNext = true;
+            } else {
+                capitalizeNext = false;
+                b.append(c);
+            }
+        }
+        String s = b.toString();
+        if (s.length() > 0)
+            l.add(s);
+        return l;
+    }
+
+    private void parseURI(String url) {
+        int len = url.length();
+        int delim = url.indexOf(':');
+        if (delim == -1 || delim + 1 == len) {
+            throw new IllegalArgumentException("invalid URL string");
+        }
+        scheme = url.substring(0, delim).toLowerCase();
+        this.ssp = url.substring(delim + 1);
+
+        if (!ssp.startsWith("//")) {
+            this.authority = new Authority(scheme, ssp.toLowerCase());
+            return;
+        }
+        String authpath = ssp.substring(2);
+
+        delim = authpath.indexOf('/');
+        String auth;
+        if (delim == -1) {
+            this.path = "";
+            auth = authpath;
+        } else {
+            auth = authpath.substring(0, delim);
+            this.path = authpath.substring(delim);
+        }
+        this.authority = new Authority(scheme, auth.toLowerCase());
+    }
+
+    private String actions() {
+        StringBuilder b = new StringBuilder();
+        for (String s : methods) {
+            b.append(s);
+        }
+        b.append(":");
+        for (String s : requestHeaders) {
+            b.append(s);
+        }
+        return b.toString();
+    }
+
+    /**
+     * restore the state of this object from stream
+     */
+    private void readObject(ObjectInputStream s)
+        throws IOException, ClassNotFoundException {
+        ObjectInputStream.GetField fields = s.readFields();
+        String actions = (String)fields.get("actions", null);
+
+        init(actions);
+    }
+
+    static class Authority {
+        HostPortrange p;
+
+        Authority(String scheme, String authority) {
+            p = new HostPortrange(scheme, authority);
+        }
+
+        boolean implies(Authority other) {
+            return impliesHostrange(other) && impliesPortrange(other);
+        }
+
+        private boolean impliesHostrange(Authority that) {
+            String thishost = this.p.hostname();
+            String thathost = that.p.hostname();
+
+            if (p.wildcard() && thishost.equals("")) {
+                // this "*" implies all others
+                return true;
+            }
+            if (that.p.wildcard() && thathost.equals("")) {
+                // that "*" can only be implied by this "*"
+                return false;
+            }
+            if (thishost.equals(thathost)) {
+                // covers all cases of literal IP addresses and fixed
+                // domain names.
+                return true;
+            }
+            if (this.p.wildcard()) {
+                // this "*.foo.com" implies "bub.bar.foo.com"
+                return thathost.endsWith(thishost);
+            }
+            return false;
+        }
+
+        private boolean impliesPortrange(Authority that) {
+            int[] thisrange = this.p.portrange();
+            int[] thatrange = that.p.portrange();
+            if (thisrange[0] == -1) {
+                /* port not specified non http/s URL */
+                return true;
+            }
+            return thisrange[0] <= thatrange[0] &&
+                        thisrange[1] >= thatrange[1];
+        }
+
+        boolean equals(Authority that) {
+            return this.p.equals(that.p);
+        }
+
+        public int hashCode() {
+            return p.hashCode();
+        }
+    }
+}
--- a/src/share/classes/java/nio/file/Files.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/nio/file/Files.java	Fri Oct 25 10:39:13 2013 -0700
@@ -43,9 +43,10 @@
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.attribute.BasicFileAttributeView;
 import java.nio.file.attribute.BasicFileAttributes;
-import java.nio.file.attribute.DosFileAttributes;
+import java.nio.file.attribute.DosFileAttributes;   // javadoc
 import java.nio.file.attribute.FileAttribute;
 import java.nio.file.attribute.FileAttributeView;
 import java.nio.file.attribute.FileOwnerAttributeView;
@@ -104,8 +105,7 @@
         return () -> {
             try {
                 c.close();
-            }
-            catch (IOException e) {
+            } catch (IOException e) {
                 throw new UncheckedIOException(e);
             }
         };
@@ -2550,7 +2550,7 @@
      *          checkExec} is invoked to check execute access to the file.
      */
     public static boolean isExecutable(Path path) {
-       return isAccessible(path, AccessMode.EXECUTE);
+        return isAccessible(path, AccessMode.EXECUTE);
     }
 
     // -- Recursive operations --
@@ -2783,6 +2783,37 @@
     }
 
     /**
+     * Opens a file for reading, returning a {@code BufferedReader} to read text
+     * from the file in an efficient manner. Bytes from the file are decoded into
+     * characters using the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset
+     * charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.newBufferedReader(path, StandardCharsets.UTF_8)
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     *
+     * @return  a new buffered reader, with default buffer size, to read text
+     *          from the file
+     *
+     * @throws  IOException
+     *          if an I/O error occurs opening the file
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkRead(String) checkRead}
+     *          method is invoked to check read access to the file.
+     *
+     * @since 1.8
+     */
+    public static BufferedReader newBufferedReader(Path path) throws IOException {
+        return newBufferedReader(path, StandardCharsets.UTF_8);
+    }
+
+    /**
      * Opens or creates a file for writing, returning a {@code BufferedWriter}
      * that may be used to write text to the file in an efficient manner.
      * The {@code options} parameter specifies how the the file is created or
@@ -2828,6 +2859,41 @@
     }
 
     /**
+     * Opens or creates a file for writing, returning a {@code BufferedWriter}
+     * to write text to the file in an efficient manner. The text is encoded
+     * into bytes for writing using the {@link StandardCharsets#UTF_8 UTF-8}
+     * {@link Charset charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.newBufferedWriter(path, StandardCharsets.UTF_8, options)
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     * @param   options
+     *          options specifying how the file is opened
+     *
+     * @return  a new buffered writer, with default buffer size, to write text
+     *          to the file
+     *
+     * @throws  IOException
+     *          if an I/O error occurs opening or creating the file
+     * @throws  UnsupportedOperationException
+     *          if an unsupported option is specified
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkWrite(String) checkWrite}
+     *          method is invoked to check write access to the file.
+     *
+     * @since 1.8
+     */
+    public static BufferedWriter newBufferedWriter(Path path, OpenOption... options) throws IOException {
+        return newBufferedWriter(path, StandardCharsets.UTF_8, options);
+    }
+
+    /**
      * Reads all bytes from an input stream and writes them to an output stream.
      */
     private static long copy(InputStream source, OutputStream sink)
@@ -3025,9 +3091,7 @@
      * @throws  OutOfMemoryError
      *          if an array of the required size cannot be allocated
      */
-    private static byte[] read(InputStream source, int initialSize)
-            throws IOException
-    {
+    private static byte[] read(InputStream source, int initialSize) throws IOException {
         int capacity = initialSize;
         byte[] buf = new byte[capacity];
         int nread = 0;
@@ -3131,9 +3195,7 @@
      *
      * @see #newBufferedReader
      */
-    public static List<String> readAllLines(Path path, Charset cs)
-        throws IOException
-    {
+    public static List<String> readAllLines(Path path, Charset cs) throws IOException {
         try (BufferedReader reader = newBufferedReader(path, cs)) {
             List<String> result = new ArrayList<>();
             for (;;) {
@@ -3147,6 +3209,37 @@
     }
 
     /**
+     * Read all lines from a file. Bytes from the file are decoded into characters
+     * using the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.readAllLines(path, StandardCharsets.UTF_8)
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     *
+     * @return  the lines from the file as a {@code List}; whether the {@code
+     *          List} is modifiable or not is implementation dependent and
+     *          therefore not specified
+     *
+     * @throws  IOException
+     *          if an I/O error occurs reading from the file or a malformed or
+     *          unmappable byte sequence is read
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkRead(String) checkRead}
+     *          method is invoked to check read access to the file.
+     *
+     * @since 1.8
+     */
+    public static List<String> readAllLines(Path path) throws IOException {
+        return readAllLines(path, StandardCharsets.UTF_8);
+    }
+
+    /**
      * Writes bytes to a file. The {@code options} parameter specifies how the
      * the file is created or opened. If no options are present then this method
      * works as if the {@link StandardOpenOption#CREATE CREATE}, {@link
@@ -3262,6 +3355,45 @@
         return path;
     }
 
+    /**
+     * Write lines of text to a file. Characters are encoded into bytes using
+     * the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.write(path, lines, StandardCharsets.UTF_8, options);
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     * @param   lines
+     *          an object to iterate over the char sequences
+     * @param   options
+     *          options specifying how the file is opened
+     *
+     * @return  the path
+     *
+     * @throws  IOException
+     *          if an I/O error occurs writing to or creating the file, or the
+     *          text cannot be encoded as {@code UTF-8}
+     * @throws  UnsupportedOperationException
+     *          if an unsupported option is specified
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkWrite(String) checkWrite}
+     *          method is invoked to check write access to the file.
+     *
+     * @since 1.8
+     */
+    public static Path write(Path path,
+                             Iterable<? extends CharSequence> lines,
+                             OpenOption... options)
+        throws IOException
+    {
+        return write(path, lines, StandardCharsets.UTF_8, options);
+    }
+
     // -- Stream APIs --
 
     /**
@@ -3431,9 +3563,11 @@
      *          if an I/O error is thrown when accessing the starting file.
      * @since   1.8
      */
-    public static Stream<Path> walk(Path start, int maxDepth,
+    public static Stream<Path> walk(Path start,
+                                    int maxDepth,
                                     FileVisitOption... options)
-            throws IOException {
+        throws IOException
+    {
         FileTreeIterator iterator = new FileTreeIterator(start, maxDepth, options);
         try {
             return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT), false)
@@ -3484,9 +3618,7 @@
      * @see     #walk(Path, int, FileVisitOption...)
      * @since   1.8
      */
-    public static Stream<Path> walk(Path start,
-                                    FileVisitOption... options)
-            throws IOException {
+    public static Stream<Path> walk(Path start, FileVisitOption... options) throws IOException {
         return walk(start, Integer.MAX_VALUE, options);
     }
 
@@ -3547,7 +3679,8 @@
                                     int maxDepth,
                                     BiPredicate<Path, BasicFileAttributes> matcher,
                                     FileVisitOption... options)
-            throws IOException {
+        throws IOException
+    {
         FileTreeIterator iterator = new FileTreeIterator(start, maxDepth, options);
         try {
             return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT), false)
@@ -3561,7 +3694,7 @@
     }
 
     /**
-     * Read all lines from a file as a {@code Stream}.  Unlike {@link
+     * Read all lines from a file as a {@code Stream}. Unlike {@link
      * #readAllLines(Path, Charset) readAllLines}, this method does not read
      * all lines into a {@code List}, but instead populates lazily as the stream
      * is consumed.
@@ -3619,4 +3752,33 @@
             throw e;
         }
     }
+
+    /**
+     * Read all lines from a file as a {@code Stream}. Bytes from the file are
+     * decoded into characters using the {@link StandardCharsets#UTF_8 UTF-8}
+     * {@link Charset charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.lines(path, StandardCharsets.UTF_8)
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     *
+     * @return  the lines from the file as a {@code Stream}
+     *
+     * @throws  IOException
+     *          if an I/O error occurs opening the file
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkRead(String) checkRead}
+     *          method is invoked to check read access to the file.
+     *
+     * @since 1.8
+     */
+    public static Stream<String> lines(Path path) throws IOException {
+        return lines(path, StandardCharsets.UTF_8);
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/security/DomainLoadStoreParameter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.  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.security;
+
+import java.net.URI;
+import java.util.*;
+import static java.security.KeyStore.*;
+
+/**
+ * Configuration data that specifies the keystores in a keystore domain.
+ * A keystore domain is a collection of keystores that are presented as a
+ * single logical keystore. The configuration data is used during
+ * {@code KeyStore}
+ * {@link KeyStore#load(KeyStore.LoadStoreParameter) load} and
+ * {@link KeyStore#store(KeyStore.LoadStoreParameter) store} operations.
+ * <p>
+ * The following syntax is supported for configuration data:
+ * <pre>{@code
+ *     domain <domainName> [<property> ...] {
+ *         keystore <keystoreName> [<property> ...] ;
+ *         ...
+ *     };
+ *     ...
+ * }</pre>
+ * where {@code domainName} and {@code keystoreName} are identifiers
+ * and {@code property} is a key/value pairing. The key and value are
+ * separated by an 'equals' symbol and the value is enclosed in double
+ * quotes. A property value may be either a printable string or a binary
+ * string of colon-separated pairs of hexadecimal digits. Multi-valued
+ * properties are represented as a comma-separated list of values,
+ * enclosed in square brackets.
+ * See {@link Arrays#toString(java.lang.Object[])}.
+ * <p>
+ * To ensure that keystore entries are uniquely identified, each
+ * entry's alias is prefixed by its {@code keystoreName} followed
+ * by the entry name separator and each {@code keystoreName} must be
+ * unique within its domain. Entry name prefixes are omitted when
+ * storing a keystore.
+ * <p>
+ * Properties are context-sensitive: properties that apply to
+ * all the keystores in a domain are located in the domain clause,
+ * and properties that apply only to a specific keystore are located
+ * in that keystore's clause.
+ * Unless otherwise specified, a property in a keystore clause overrides
+ * a property of the same name in the domain clause. All property names
+ * are case-insensitive. The following properties are supported:
+ * <dl>
+ * <dt> {@code keystoreType="<type>"} </dt>
+ *     <dd> The keystore type. </dd>
+ * <dt> {@code keystoreURI="<url>"} </dt>
+ *     <dd> The keystore location. </dd>
+ * <dt> {@code keystoreProviderName="<name>"} </dt>
+ *     <dd> The name of the keystore's JCE provider. </dd>
+ * <dt> {@code keystorePasswordEnv="<environment-variable>"} </dt>
+ *     <dd> The environment variable that stores a keystore password.
+ *          Alternatively, passwords may be supplied to the constructor
+ *          method in a {@code Map<String, ProtectionParameter>}. </dd>
+ * <dt> {@code entryNameSeparator="<separator>"} </dt>
+ *     <dd> The separator between a keystore name prefix and an entry name.
+ *          When specified, it applies to all the entries in a domain.
+ *          Its default value is a space. </dd>
+ * </dl>
+ * <p>
+ * For example, configuration data for a simple keystore domain
+ * comprising three keystores is shown below:
+ * <pre>
+ *
+ * domain app1 {
+ *     keystore app1-truststore
+ *         keystoreURI="file:///app1/etc/truststore.jks";
+ *
+ *     keystore system-truststore
+ *         keystoreURI="${java.home}/lib/security/cacerts";
+ *
+ *     keystore app1-keystore
+ *         keystoreType="PKCS12"
+ *         keystoreURI="file:///app1/etc/keystore.p12";
+ * };
+ *
+ * </pre>
+ * @since 1.8
+ */
+public final class DomainLoadStoreParameter implements LoadStoreParameter {
+
+    private final URI configuration;
+    private final Map<String,ProtectionParameter> protectionParams;
+
+    /**
+     * Constructs a DomainLoadStoreParameter for a keystore domain with
+     * the parameters used to protect keystore data.
+     *
+     * @param configuration identifier for the domain configuration data.
+     *     The name of the target domain should be specified in the
+     *     {@code java.net.URI} fragment component when it is necessary
+     *     to distinguish between several domain configurations at the
+     *     same location.
+     *
+     * @param protectionParams the map from keystore name to the parameter
+     *     used to protect keystore data.
+     *     A {@code java.util.Collections.EMPTY_MAP} should be used
+     *     when protection parameters are not required or when they have
+     *     been specified by properties in the domain configuration data.
+     *     It is cloned to prevent subsequent modification.
+     *
+     * @exception NullPointerException if {@code configuration} or
+     *     {@code protectionParams} is {@code null}
+     */
+    public DomainLoadStoreParameter(URI configuration,
+        Map<String,ProtectionParameter> protectionParams) {
+        if (configuration == null || protectionParams == null) {
+            throw new NullPointerException("invalid null input");
+        }
+        this.configuration = configuration;
+        this.protectionParams =
+            Collections.unmodifiableMap(new HashMap<>(protectionParams));
+    }
+
+    /**
+     * Gets the identifier for the domain configuration data.
+     *
+     * @return the identifier for the configuration data
+     */
+    public URI getConfiguration() {
+        return configuration;
+    }
+
+    /**
+     * Gets the keystore protection parameters for keystores in this
+     * domain.
+     *
+     * @return an unmodifiable map of keystore names to protection
+     *     parameters
+     */
+    public Map<String,ProtectionParameter> getProtectionParams() {
+        return protectionParams;
+    }
+
+    /**
+     * Gets the keystore protection parameters for this domain.
+     * Keystore domains do not support a protection parameter.
+     *
+     * @return always returns {@code null}
+     */
+    @Override
+    public KeyStore.ProtectionParameter getProtectionParameter() {
+        return null;
+    }
+}
--- a/src/share/classes/java/security/KeyStore.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/security/KeyStore.java	Fri Oct 25 10:39:13 2013 -0700
@@ -219,148 +219,6 @@
     }
 
     /**
-     * Configuration data that specifies the keystores in a keystore domain.
-     * A keystore domain is a collection of keystores that are presented as a
-     * single logical keystore. The configuration data is used during
-     * {@code KeyStore}
-     * {@link #load(KeyStore.LoadStoreParameter) load} and
-     * {@link #store(KeyStore.LoadStoreParameter) store} operations.
-     * <p>
-     * The following syntax is supported for configuration data:
-     * <pre>{@code
-     *     domain <domainName> [<property> ...] {
-     *         keystore <keystoreName> [<property> ...] ;
-     *         ...
-     *     };
-     *     ...
-     * }</pre>
-     * where {@code domainName} and {@code keystoreName} are identifiers
-     * and {@code property} is a key/value pairing. The key and value are
-     * separated by an 'equals' symbol and the value is enclosed in double
-     * quotes. A property value may be either a printable string or a binary
-     * string of colon-separated pairs of hexadecimal digits. Multi-valued
-     * properties are represented as a comma-separated list of values,
-     * enclosed in square brackets.
-     * See {@link Arrays#toString(java.lang.Object[])}.
-     * <p>
-     * To ensure that keystore entries are uniquely identified, each
-     * entry's alias is prefixed by its {@code keystoreName} followed
-     * by the entry name separator and each {@code keystoreName} must be
-     * unique within its domain. Entry name prefixes are omitted when
-     * storing a keystore.
-     * <p>
-     * Properties are context-sensitive: properties that apply to
-     * all the keystores in a domain are located in the domain clause,
-     * and properties that apply only to a specific keystore are located
-     * in that keystore's clause.
-     * Unless otherwise specified, a property in a keystore clause overrides
-     * a property of the same name in the domain clause. All property names
-     * are case-insensitive. The following properties are supported:
-     * <dl>
-     * <dt> {@code keystoreType="<type>"} </dt>
-     *     <dd> The keystore type. </dd>
-     * <dt> {@code keystoreURI="<url>"} </dt>
-     *     <dd> The keystore location. </dd>
-     * <dt> {@code keystoreProviderName="<name>"} </dt>
-     *     <dd> The name of the keystore's JCE provider. </dd>
-     * <dt> {@code keystorePasswordEnv="<environment-variable>"} </dt>
-     *     <dd> The environment variable that stores a keystore password.
-     *          Alternatively, passwords may be supplied to the constructor
-     *          method in a {@code Map<String, ProtectionParameter>}. </dd>
-     * <dt> {@code entryNameSeparator="<separator>"} </dt>
-     *     <dd> The separator between a keystore name prefix and an entry name.
-     *          When specified, it applies to all the entries in a domain.
-     *          Its default value is a space. </dd>
-     * </dl>
-     * <p>
-     * For example, configuration data for a simple keystore domain
-     * comprising three keystores is shown below:
-     * <pre>
-     *
-     * domain app1 {
-     *     keystore app1-truststore
-     *         keystoreURI="file:///app1/etc/truststore.jks"
-     *
-     *     keystore system-truststore
-     *         keystoreURI="${java.home}/lib/security/cacerts"
-     *
-     *     keystore app1-keystore
-     *         keystoreType="PKCS12"
-     *         keystoreURI="file:///app1/etc/keystore.p12"
-     * };
-     *
-     * </pre>
-     * @since 1.8
-     */
-    public static final class DomainLoadStoreParameter
-        implements LoadStoreParameter {
-
-        private final URI configuration;
-        private final Map<String,ProtectionParameter> protectionParams;
-
-        /**
-         * Constructs a DomainLoadStoreParameter for a keystore domain with
-         * the parameters used to protect keystore data.
-         *
-         * @param configuration identifier for the domain configuration data.
-         *     The name of the target domain should be specified in the
-         *     {@code java.net.URI} fragment component when it is necessary
-         *     to distinguish between several domain configurations at the
-         *     same location.
-         *
-         * @param protectionParams the map from keystore name to the parameter
-         *     used to protect keystore data.
-         *     A {@code java.util.Collections.EMPTY_MAP} should be used
-         *     when protection parameters are not required or when they have
-         *     been specified by properties in the domain configuration data.
-         *     It is cloned to prevent subsequent modification.
-         *
-         * @exception NullPointerException if {@code configuration} or
-         *     {@code protectionParams} is {@code null}
-         */
-        public DomainLoadStoreParameter(URI configuration,
-            Map<String,ProtectionParameter> protectionParams) {
-            if (configuration == null || protectionParams == null) {
-                throw new NullPointerException("invalid null input");
-            }
-            this.configuration = configuration;
-            this.protectionParams =
-                Collections.unmodifiableMap(new HashMap<>(protectionParams));
-        }
-
-        /**
-         * Gets the identifier for the domain configuration data.
-         *
-         * @return the identifier for the configuration data
-         */
-        public URI getConfiguration() {
-            return configuration;
-        }
-
-        /**
-         * Gets the keystore protection parameters for keystores in this
-         * domain.
-         *
-         * @return an unmodifiable map of keystore names to protection
-         *     parameters
-         */
-        public Map<String,ProtectionParameter> getProtectionParams() {
-            return protectionParams;
-        }
-
-        /**
-         * Gets the keystore protection parameters for this domain.
-         * Keystore domains do not support a protection parameter.
-         *
-         * @return always returns {@code null}
-         */
-        @Override
-        public KeyStore.ProtectionParameter getProtectionParameter() {
-            return null;
-        }
-    }
-
-    /**
      * A marker interface for keystore protection parameters.
      *
      * <p> The information stored in a {@code ProtectionParameter}
--- a/src/share/classes/java/sql/CallableStatement.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/CallableStatement.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/Connection.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/DatabaseMetaData.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/ResultSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/SQLException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/SQLFeatureNotSupportedException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/SQLPermission.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/SQLWarning.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/SQLXML.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/sql/Statement.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/time/DayOfWeek.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/DayOfWeek.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -187,7 +188,12 @@
         if (temporal instanceof DayOfWeek) {
             return (DayOfWeek) temporal;
         }
-        return of(temporal.get(DAY_OF_WEEK));
+        try {
+            return of(temporal.get(DAY_OF_WEEK));
+        } catch (DateTimeException ex) {
+            throw new DateTimeException("Unable to obtain DayOfWeek from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
+        }
     }
 
     //-----------------------------------------------------------------------
@@ -398,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/Instant.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/Instant.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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
@@ -366,9 +366,14 @@
             return (Instant) temporal;
         }
         Objects.requireNonNull(temporal, "temporal");
-        long instantSecs = temporal.getLong(INSTANT_SECONDS);
-        int nanoOfSecond = temporal.get(NANO_OF_SECOND);
-        return Instant.ofEpochSecond(instantSecs, nanoOfSecond);
+        try {
+            long instantSecs = temporal.getLong(INSTANT_SECONDS);
+            int nanoOfSecond = temporal.get(NANO_OF_SECOND);
+            return Instant.ofEpochSecond(instantSecs, nanoOfSecond);
+        } catch (DateTimeException ex) {
+            throw new DateTimeException("Unable to obtain Instant from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName());
+        }
     }
 
     //-----------------------------------------------------------------------
@@ -1045,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/LocalDate.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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,9 +354,10 @@
      */
     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.getClass());
+            throw new DateTimeException("Unable to obtain LocalDate from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName());
         }
         return date;
     }
@@ -1500,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/LocalDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -449,7 +449,8 @@
             LocalTime time = LocalTime.from(temporal);
             return new LocalDateTime(date, time);
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to obtain LocalDateTime from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain LocalDateTime from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -1578,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);
@@ -1940,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/LocalTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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,9 +395,10 @@
      */
     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.getClass());
+            throw new DateTimeException("Unable to obtain LocalTime from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName());
         }
         return time;
     }
@@ -1280,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
@@ -1553,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/Month.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -217,7 +218,8 @@
             }
             return of(temporal.get(MONTH_OF_YEAR));
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to obtain Month from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain Month from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -559,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/MonthDay.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -266,7 +266,8 @@
             }
             return of(temporal.get(MONTH_OF_YEAR), temporal.get(DAY_OF_MONTH));
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to obtain MonthDay from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain MonthDay from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -581,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/OffsetDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -347,8 +347,8 @@
         if (temporal instanceof OffsetDateTime) {
             return (OffsetDateTime) temporal;
         }
-        ZoneOffset offset = ZoneOffset.from(temporal);
         try {
+            ZoneOffset offset = ZoneOffset.from(temporal);
             try {
                 LocalDateTime ldt = LocalDateTime.from(temporal);
                 return OffsetDateTime.of(ldt, offset);
@@ -357,7 +357,8 @@
                 return OffsetDateTime.ofInstant(instant, offset);
             }
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to obtain OffsetDateTime from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain OffsetDateTime from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -1526,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
@@ -1879,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.
      *
--- a/src/share/classes/java/time/OffsetTime.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/OffsetTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -284,7 +284,8 @@
             ZoneOffset offset = ZoneOffset.from(temporal);
             return new OffsetTime(time, offset);
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to obtain OffsetTime from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain OffsetTime from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -1067,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
@@ -1350,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.
      *
--- a/src/share/classes/java/time/Period.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/Period.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/Year.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -249,7 +249,8 @@
             }
             return of(temporal.get(YEAR));
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to obtain Year from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain Year from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -811,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/YearMonth.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -252,7 +252,8 @@
             }
             return of(temporal.get(YEAR), temporal.get(MONTH_OF_YEAR));
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to obtain YearMonth from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain YearMonth from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -944,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/ZoneId.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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}.
@@ -179,7 +180,7 @@
      * This is in line with versions of TZDB before 2005r.
      * <p>
      * This maps as follows:
-     * <p><ul>
+     * <ul>
      * <li>EST - America/New_York</li>
      * <li>MST - America/Denver</li>
      * <li>HST - Pacific/Honolulu</li>
@@ -208,7 +209,7 @@
      * <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> OLD_SHORT_IDS;
@@ -224,7 +225,7 @@
      * This is in line with TZDB 2005r and later.
      * <p>
      * This maps as follows:
-     * <p><ul>
+     * <ul>
      * <li>EST - -05:00</li>
      * <li>HST - -10:00</li>
      * <li>MST - -07:00</li>
@@ -253,7 +254,7 @@
      * <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;
@@ -492,7 +493,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,9 +503,10 @@
      * @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.getClass());
+            throw new DateTimeException("Unable to obtain ZoneId from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName());
         }
         return obj;
     }
@@ -557,7 +559,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
      */
@@ -574,7 +576,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/ZoneOffset.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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,9 +334,10 @@
      */
     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.getClass());
+            throw new DateTimeException("Unable to obtain ZoneOffset from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName());
         }
         return offset;
     }
@@ -470,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
      */
@@ -641,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/ZonedDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.
@@ -553,7 +553,8 @@
                 return of(ldt, zone);
             }
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to create ZonedDateTime from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain ZonedDateTime from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -1698,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.
      *
@@ -1939,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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/ChronoLocalDate.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/ChronoLocalDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/ChronoPeriodImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/Chronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/Era.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/HijrahChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/IsoChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/IsoEra.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/JapaneseChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/MinguoChronology.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/MinguoChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/MinguoEra.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/Ser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/chrono/ThaiBuddhistEra.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/format/DateTimeFormatter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Fri Oct 25 10:39:13 2013 -0700
@@ -78,9 +78,11 @@
 import java.text.ParsePosition;
 import java.time.DateTimeException;
 import java.time.Instant;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
+import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Chronology;
 import java.time.chrono.IsoChronology;
 import java.time.format.DateTimeTextProvider.LocaleStore;
@@ -88,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;
@@ -122,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>
@@ -135,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}
@@ -153,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);
     };
 
@@ -499,51 +502,16 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Appends the reduced value of a date-time field with fixed width to the formatter.
-     * <p>
-     * This is typically used for formatting and parsing a two digit year.
-     * The {@code width} is the printed and parsed width.
-     * The {@code baseValue} is used during parsing to determine the valid range.
-     * <p>
-     * For formatting, the width is used to determine the number of characters to format.
-     * The rightmost characters are output to match the width, left padding with zero.
-     * <p>
-     * For strict parsing, the number of characters allowed by the width are parsed.
-     * For lenient parsing, the number of characters must be at least 1 and less than 10.
-     * If the number of digits parsed is equal to {@code width} and the value is positive,
-     * the value of the field is computed to be the first number greater than
-     * or equal to the {@code baseValue} with the same least significant characters,
-     * otherwise the value parsed is the field value.
-     * This allows a reduced value to be entered for values in range of the baseValue
-     * and width and absolute values can be entered for values outside the range.
+     * Appends the reduced value of a date-time field to the formatter.
      * <p>
-     * For example, a base value of {@code 1980} and a width of {@code 2} will have
-     * valid values from {@code 1980} to {@code 2079}.
-     * During parsing, the text {@code "12"} will result in the value {@code 2012} as that
-     * is the value within the range where the last two characters are "12".
-     * Compare with lenient parsing the text {@code "1915"} that will result in the
-     * value {@code 1915}.
-     *
-     * @param field  the field to append, not null
-     * @param width  the field width of the printed and parsed field, from 1 to 10
-     * @param baseValue  the base value of the range of valid values
-     * @return this, for chaining, not null
-     * @throws IllegalArgumentException if the width or base value is invalid
-     * @see #appendValueReduced(java.time.temporal.TemporalField, int, int, int)
-     */
-    public DateTimeFormatterBuilder appendValueReduced(TemporalField field,
-            int width, int baseValue) {
-        return appendValueReduced(field, width, width, baseValue);
-    }
-
-    /**
-     * Appends the reduced value of a date-time field with a flexible width to the formatter.
-     * <p>
-     * This is typically used for formatting and parsing a two digit year
-     * but allowing for the year value to be up to maxWidth.
+     * Since fields such as year vary by chronology, it is recommended to use the
+     * {@link #appendValueReduced(TemporalField, int, int, ChronoLocalDate)} date}
+     * variant of this method in most cases. This variant is suitable for
+     * simple fields or working with only the ISO chronology.
      * <p>
      * For formatting, the {@code width} and {@code maxWidth} are used to
      * determine the number of characters to format.
+     * If they are equal then the format is fixed width.
      * If the value of the field is within the range of the {@code baseValue} using
      * {@code width} characters then the reduced value is formatted otherwise the value is
      * truncated to fit {@code maxWidth}.
@@ -562,8 +530,7 @@
      * valid values from {@code 1980} to {@code 2079}.
      * During parsing, the text {@code "12"} will result in the value {@code 2012} as that
      * is the value within the range where the last two characters are "12".
-     * Compare with parsing the text {@code "1915"} that will result in the
-     * value {@code 1915}.
+     * By contrast, parsing the text {@code "1915"} will result in the value {@code 1915}.
      *
      * @param field  the field to append, not null
      * @param width  the field width of the printed and parsed field, from 1 to 10
@@ -575,7 +542,67 @@
     public DateTimeFormatterBuilder appendValueReduced(TemporalField field,
             int width, int maxWidth, int baseValue) {
         Objects.requireNonNull(field, "field");
-        ReducedPrinterParser pp = new ReducedPrinterParser(field, width, maxWidth, baseValue);
+        ReducedPrinterParser pp = new ReducedPrinterParser(field, width, maxWidth, baseValue, null);
+        appendValue(pp);
+        return this;
+    }
+
+    /**
+     * Appends the reduced value of a date-time field to the formatter.
+     * <p>
+     * This is typically used for formatting and parsing a two digit year.
+     * <p>
+     * The base date is used to calculate the full value during parsing.
+     * For example, if the base date is 1950-01-01 then parsed values for
+     * 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
+     * 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
+     * effective chronology. Then extract the specified field from the
+     * chronology-specific base date and use it to determine the
+     * {@code baseValue} used below.
+     * <p>
+     * For formatting, the {@code width} and {@code maxWidth} are used to
+     * determine the number of characters to format.
+     * If they are equal then the format is fixed width.
+     * If the value of the field is within the range of the {@code baseValue} using
+     * {@code width} characters then the reduced value is formatted otherwise the value is
+     * truncated to fit {@code maxWidth}.
+     * The rightmost characters are output to match the width, left padding with zero.
+     * <p>
+     * For strict parsing, the number of characters allowed by {@code width} to {@code maxWidth} are parsed.
+     * For lenient parsing, the number of characters must be at least 1 and less than 10.
+     * If the number of digits parsed is equal to {@code width} and the value is positive,
+     * the value of the field is computed to be the first number greater than
+     * or equal to the {@code baseValue} with the same least significant characters,
+     * otherwise the value parsed is the field value.
+     * This allows a reduced value to be entered for values in range of the baseValue
+     * and width and absolute values can be entered for values outside the range.
+     * <p>
+     * For example, a base value of {@code 1980} and a width of {@code 2} will have
+     * valid values from {@code 1980} to {@code 2079}.
+     * During parsing, the text {@code "12"} will result in the value {@code 2012} as that
+     * is the value within the range where the last two characters are "12".
+     * By contrast, parsing the text {@code "1915"} will result in the value {@code 1915}.
+     *
+     * @param field  the field to append, not null
+     * @param width  the field width of the printed and parsed field, from 1 to 10
+     * @param maxWidth  the maximum field width of the printed field, from 1 to 10
+     * @param baseDate  the base date used to calculate the base value for the range
+     *  of valid values in the parsed chronology, not null
+     * @return this, for chaining, not null
+     * @throws IllegalArgumentException if the width or base value is invalid
+     */
+    public DateTimeFormatterBuilder appendValueReduced(
+            TemporalField field, int width, int maxWidth, ChronoLocalDate baseDate) {
+        Objects.requireNonNull(field, "field");
+        Objects.requireNonNull(baseDate, "baseDate");
+        ReducedPrinterParser pp = new ReducedPrinterParser(field, width, maxWidth, 0, baseDate);
         appendValue(pp);
         return this;
     }
@@ -851,7 +878,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.
@@ -862,7 +889,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
@@ -872,7 +899,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'.
@@ -894,17 +921,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>
@@ -936,7 +963,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.
@@ -974,7 +1001,7 @@
      * @see #appendZoneRegionId()
      */
     public DateTimeFormatterBuilder appendZoneId() {
-        appendInternal(new ZoneIdPrinterParser(TemporalQuery.zoneId(), "ZoneId()"));
+        appendInternal(new ZoneIdPrinterParser(TemporalQueries.zoneId(), "ZoneId()"));
         return this;
     }
 
@@ -986,7 +1013,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
@@ -1045,7 +1072,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.
@@ -1086,7 +1113,7 @@
      * @see #appendZoneId()
      */
     public DateTimeFormatterBuilder appendZoneOrOffsetId() {
-        appendInternal(new ZoneIdPrinterParser(TemporalQuery.zone(), "ZoneOrOffsetId()"));
+        appendInternal(new ZoneIdPrinterParser(TemporalQueries.zone(), "ZoneOrOffsetId()"));
         return this;
     }
 
@@ -1097,7 +1124,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
@@ -1133,7 +1160,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
@@ -1176,7 +1203,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.
@@ -1217,12 +1244,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)}.
@@ -1682,7 +1709,7 @@
             case 'u':
             case 'y':
                 if (count == 2) {
-                    appendValueReduced(field, 2, 2000);
+                    appendValueReduced(field, 2, 2, ReducedPrinterParser.BASE_DATE);
                 } else if (count < 4) {
                     appendValue(field, count, 19, SignStyle.NORMAL);
                 } else {
@@ -2516,7 +2543,7 @@
             if (valueLong == null) {
                 return false;
             }
-            long value = getValue(valueLong);
+            long value = getValue(context, valueLong);
             DecimalStyle decimalStyle = context.getDecimalStyle();
             String str = (value == Long.MIN_VALUE ? "9223372036854775808" : Long.toString(Math.abs(value)));
             if (str.length() > maxWidth) {
@@ -2560,10 +2587,11 @@
         /**
          * Gets the value to output.
          *
-         * @param value  the base value of the field, not null
+         * @param context  the context
+         * @param value  the value of the field, not null
          * @return the value
          */
-        long getValue(long value) {
+        long getValue(DateTimePrintContext context, long value) {
             return value;
         }
 
@@ -2703,7 +2731,13 @@
      * Prints and parses a reduced numeric date-time field.
      */
     static final class ReducedPrinterParser extends NumberPrinterParser {
+        /**
+         * The base date for reduced value parsing.
+         */
+        static final LocalDate BASE_DATE = LocalDate.of(2000, 1, 1);
+
         private final int baseValue;
+        private final ChronoLocalDate baseDate;
 
         /**
          * Constructor.
@@ -2712,10 +2746,11 @@
          * @param minWidth  the minimum field width, from 1 to 10
          * @param maxWidth  the maximum field width, from 1 to 10
          * @param baseValue  the base value
+         * @param baseDate  the base date
          */
         ReducedPrinterParser(TemporalField field, int minWidth, int maxWidth,
-                int baseValue) {
-            this(field, minWidth, maxWidth, baseValue, 0);
+                int baseValue, ChronoLocalDate baseDate) {
+            this(field, minWidth, maxWidth, baseValue, baseDate, 0);
             if (minWidth < 1 || minWidth > 10) {
                 throw new IllegalArgumentException("The minWidth must be from 1 to 10 inclusive but was " + minWidth);
             }
@@ -2726,11 +2761,13 @@
                 throw new IllegalArgumentException("Maximum width must exceed or equal the minimum width but " +
                         maxWidth + " < " + minWidth);
             }
-            if (field.range().isValidValue(baseValue) == false) {
-                throw new IllegalArgumentException("The base value must be within the range of the field");
-            }
-            if ((((long) baseValue) + EXCEED_POINTS[maxWidth]) > Integer.MAX_VALUE) {
-                throw new DateTimeException("Unable to add printer-parser as the range exceeds the capacity of an int");
+            if (baseDate == null) {
+                if (field.range().isValidValue(baseValue) == false) {
+                    throw new IllegalArgumentException("The base value must be within the range of the field");
+                }
+                if ((((long) baseValue) + EXCEED_POINTS[maxWidth]) > Integer.MAX_VALUE) {
+                    throw new DateTimeException("Unable to add printer-parser as the range exceeds the capacity of an int");
+                }
             }
         }
 
@@ -2742,17 +2779,24 @@
          * @param minWidth  the minimum field width, from 1 to 10
          * @param maxWidth  the maximum field width, from 1 to 10
          * @param baseValue  the base value
+         * @param baseDate  the base date
          * @param subsequentWidth the subsequentWidth for this instance
          */
         private ReducedPrinterParser(TemporalField field, int minWidth, int maxWidth,
-                int baseValue, int subsequentWidth) {
+                int baseValue, ChronoLocalDate baseDate, int subsequentWidth) {
             super(field, minWidth, maxWidth, SignStyle.NOT_NEGATIVE, subsequentWidth);
             this.baseValue = baseValue;
+            this.baseDate = baseDate;
         }
 
         @Override
-        long getValue(long value) {
+        long getValue(DateTimePrintContext context, long value) {
             long absValue = Math.abs(value);
+            int baseValue = this.baseValue;
+            if (baseDate != null) {
+                Chronology chrono = Chronology.from(context.getTemporal());
+                baseValue = chrono.date(baseDate).get(field);
+            }
             if (value >= baseValue && value < baseValue + EXCEED_POINTS[minWidth]) {
                 // Use the reduced value if it fits in minWidth
                 return absValue % EXCEED_POINTS[minWidth];
@@ -2763,6 +2807,12 @@
 
         @Override
         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);
+            }
             int parseLen = successPos - errorPos;
             if (parseLen == minWidth && value >= 0) {
                 long range = EXCEED_POINTS[minWidth];
@@ -2773,7 +2823,7 @@
                 } else {
                     value = basePart - value;
                 }
-                if (basePart != 0 && value < baseValue) {
+                if (value < baseValue) {
                     value += range;
                 }
             }
@@ -2790,7 +2840,7 @@
             if (subsequentWidth == -1) {
                 return this;
             }
-            return new ReducedPrinterParser(field, minWidth, maxWidth, baseValue, -1);
+            return new ReducedPrinterParser(field, minWidth, maxWidth, baseValue, baseDate, -1);
         }
 
         /**
@@ -2801,13 +2851,13 @@
          */
         @Override
         ReducedPrinterParser withSubsequentWidth(int subsequentWidth) {
-            return new ReducedPrinterParser(field, minWidth, maxWidth, baseValue,
+            return new ReducedPrinterParser(field, minWidth, maxWidth, baseValue, baseDate,
                     this.subsequentWidth + subsequentWidth);
         }
 
         @Override
         public String toString() {
-            return "ReducedValue(" + field + "," + minWidth + "," + maxWidth + "," + baseValue + ")";
+            return "ReducedValue(" + field + "," + minWidth + "," + maxWidth + "," + (baseDate != null ? baseDate : baseValue) + ")";
         }
     }
 
@@ -3013,7 +3063,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 {
@@ -3541,7 +3591,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<>();
@@ -3598,7 +3648,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;
             }
@@ -4179,7 +4229,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;
             }
@@ -4351,7 +4401,7 @@
                 case 'Y':
                     field = weekDef.weekBasedYear();
                     if (count == 2) {
-                        return new ReducedPrinterParser(field, 2, 2, 2000, 0);
+                        return new ReducedPrinterParser(field, 2, 2, 0, ReducedPrinterParser.BASE_DATE, 0);
                     } else {
                         return new NumberPrinterParser(field, count, 19,
                                 (count < 4) ? SignStyle.NORMAL : SignStyle.EXCEEDS_PAD, -1);
@@ -4380,7 +4430,7 @@
                 if (count == 1) {
                     sb.append("WeekBasedYear");
                 } else if (count == 2) {
-                    sb.append("ReducedValue(WeekBasedYear,2,2000)");
+                    sb.append("ReducedValue(WeekBasedYear,2,2,2000-01-01)");
                 } else {
                     sb.append("WeekBasedYear,").append(count).append(",")
                             .append(19).append(",")
--- a/src/share/classes/java/time/format/DateTimePrintContext.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/format/DateTimePrintContext.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/format/Parsed.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -588,11 +589,23 @@
     //-----------------------------------------------------------------------
     @Override
     public String toString() {
-        String str = fieldValues.toString() + "," + chrono + "," + zone;
+        StringBuilder buf = new StringBuilder(64);
+        buf.append(fieldValues).append(',').append(chrono);
+        if (zone != null) {
+            buf.append(',').append(zone);
+        }
         if (date != null || time != null) {
-            str += " resolved to " + date + "," + time;
+            buf.append(" resolved to ");
+            if (date != null) {
+                buf.append(date);
+                if (time != null) {
+                    buf.append('T').append(time);
+                }
+            } else {
+                buf.append(time);
+            }
         }
-        return str;
+        return buf.toString();
     }
 
 }
--- a/src/share/classes/java/time/temporal/IsoFields.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/IsoFields.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/JulianFields.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/Temporal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/TemporalAccessor.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/TemporalAdjuster.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/TemporalAdjusters.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/TemporalAmount.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/TemporalField.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/TemporalQueries.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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,6 +128,216 @@
     }
 
     //-----------------------------------------------------------------------
+    // 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}.
      */
--- a/src/share/classes/java/time/temporal/TemporalQuery.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/TemporalQuery.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/WeekFields.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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>
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/temporal/package-info.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/ZoneOffsetTransitionRule.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/time/zone/ZoneRules.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/DoubleSummaryStatistics.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/DoubleSummaryStatistics.java	Fri Oct 25 10:39:13 2013 -0700
@@ -111,12 +111,24 @@
 
     /**
      * Returns the sum of values recorded, or zero if no values have been
-     * recorded. The sum returned can vary depending upon the order in which
-     * values are recorded. This is due to accumulated rounding error in
-     * addition of values of differing magnitudes. Values sorted by increasing
-     * absolute magnitude tend to yield more accurate results.  If any recorded
-     * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
-     * sum will be {@code NaN}.
+     * recorded.
+     *
+     * If any recorded value is a NaN or the sum is at any point a NaN
+     * then the sum will be NaN.
+     *
+     * <p> The value of a floating-point sum is a function both of the
+     * input values as well as the order of addition operations. The
+     * order of addition operations of this method is intentionally
+     * not defined to allow for implementation flexibility to improve
+     * the speed and accuracy of the computed result.
+     *
+     * In particular, this method may be implemented using compensated
+     * summation or other technique to reduce the error bound in the
+     * numerical sum compared to a simple summation of {@code double}
+     * values.
+     *
+     * @apiNote Sorting values by increasing absolute magnitude tends to yield
+     * more accurate results.
      *
      * @return the sum of values, or zero if none
      */
@@ -153,13 +165,21 @@
     }
 
     /**
-     * Returns the arithmetic mean of values recorded, or zero if no values have been
-     * recorded. The average returned can vary depending upon the order in
-     * which values are recorded. This is due to accumulated rounding error in
-     * addition of values of differing magnitudes. Values sorted by increasing
-     * absolute magnitude tend to yield more accurate results. If any recorded
-     * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
-     * average will be {@code NaN}.
+     * Returns the arithmetic mean of values recorded, or zero if no
+     * values have been recorded.
+     *
+     * If any recorded value is a NaN or the sum is at any point a NaN
+     * then the average will be code NaN.
+     *
+     * <p>The average returned can vary depending upon the order in
+     * which values are recorded.
+     *
+     * This method may be implemented using compensated summation or
+     * other technique to reduce the error bound in the {@link #getSum
+     * numerical sum} used to compute the average.
+     *
+     * @apiNote Values sorted by increasing absolute magnitude tend to yield
+     * more accurate results.
      *
      * @return the arithmetic mean of values, or zero if none
      */
--- a/src/share/classes/java/util/Formatter.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/Formatter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -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/HashSet.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/HashSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -25,6 +25,8 @@
 
 package java.util;
 
+import java.io.InvalidObjectException;
+
 /**
  * This class implements the <tt>Set</tt> interface, backed by a hash table
  * (actually a <tt>HashMap</tt> instance).  It makes no guarantees as to the
@@ -294,16 +296,37 @@
         // Read in any hidden serialization magic
         s.defaultReadObject();
 
-        // Read in HashMap capacity and load factor and create backing HashMap
+        // Read capacity and verify non-negative.
         int capacity = s.readInt();
+        if (capacity < 0) {
+            throw new InvalidObjectException("Illegal capacity: " +
+                                             capacity);
+        }
+
+        // Read load factor and verify positive and non NaN.
         float loadFactor = s.readFloat();
+        if (loadFactor <= 0 || Float.isNaN(loadFactor)) {
+            throw new InvalidObjectException("Illegal load factor: " +
+                                             loadFactor);
+        }
+
+        // Read size and verify non-negative.
+        int size = s.readInt();
+        if (size < 0) {
+            throw new InvalidObjectException("Illegal size: " +
+                                             size);
+        }
+
+        // Set the capacity according to the size and load factor ensuring that
+        // the HashMap is at least 25% full but clamping to maximum capacity.
+        capacity = (int) Math.min(size * Math.min(1 / loadFactor, 4.0f),
+                HashMap.MAXIMUM_CAPACITY);
+
+        // Create backing HashMap
         map = (((HashSet<?>)this) instanceof LinkedHashSet ?
                new LinkedHashMap<E,Object>(capacity, loadFactor) :
                new HashMap<E,Object>(capacity, loadFactor));
 
-        // Read in size
-        int size = s.readInt();
-
         // Read in all elements in the proper order.
         for (int i=0; i<size; i++) {
             @SuppressWarnings("unchecked")
--- a/src/share/classes/java/util/Map.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/Map.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.
+     *
+     * <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>)
+     * @since 1.8
+     */
     default V getOrDefault(Object key, V defaultValue) {
         V v;
         return (((v = get(key)) != null) || containsKey(key))
--- a/src/share/classes/java/util/ResourceBundle.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/ResourceBundle.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.
--- a/src/share/classes/java/util/ServiceLoader.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/ServiceLoader.java	Fri Oct 25 10:39:13 2013 -0700
@@ -453,6 +453,12 @@
      * Invoking its {@link java.util.Iterator#remove() remove} method will
      * cause an {@link UnsupportedOperationException} to be thrown.
      *
+     * @implNote When adding providers to the cache, the {@link #iterator
+     * Iterator} processes resources in the order that the {@link
+     * java.lang.ClassLoader#getResources(java.lang.String)
+     * ClassLoader.getResources(String)} method finds the service configuration
+     * files.
+     *
      * @return  An iterator that lazily loads providers for this loader's
      *          service
      */
--- a/src/share/classes/java/util/Spliterator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/Spliterator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -414,13 +414,19 @@
      * #ORDERED}, {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED},
      * {@link #NONNULL}, {@link #IMMUTABLE}, {@link #CONCURRENT},
      * {@link #SUBSIZED}.  Repeated calls to {@code characteristics()} on
-     * a given spliterator should always return the same result.
+     * a given spliterator, prior to or in-between calls to {@code trySplit},
+     * should always return the same result.
      *
      * <p>If a Spliterator reports an inconsistent set of
      * characteristics (either those returned from a single invocation
      * or across multiple invocations), no guarantees can be made
      * about any computation using this Spliterator.
      *
+     * @apiNote The characteristics of a given spliterator before splitting
+     * may differ from the characteristics after splitting.  For specific
+     * examples see the characteristic values {@link #SIZED}, {@link #SUBSIZED}
+     * and {@link #CONCURRENT}.
+     *
      * @return a representation of characteristics
      */
     int characteristics();
--- a/src/share/classes/java/util/TimeZone.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/TimeZone.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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;
@@ -596,11 +592,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.
+     *
+     * <p><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 +622,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 +684,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/TreeMap.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/TreeMap.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1269,6 +1269,15 @@
         public K next() {
             return prevEntry().key;
         }
+        public void remove() {
+            if (lastReturned == null)
+                throw new IllegalStateException();
+            if (modCount != expectedModCount)
+                throw new ConcurrentModificationException();
+            deleteEntry(lastReturned);
+            lastReturned = null;
+            expectedModCount = modCount;
+        }
     }
 
     // Little utilities
--- a/src/share/classes/java/util/concurrent/ForkJoinTask.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/concurrent/ForkJoinTask.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/locks/AbstractQueuedLongSynchronizer.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java	Fri Oct 25 10:39:13 2013 -0700
@@ -489,7 +489,8 @@
         /*
          * Try to signal next queued node if:
          *   Propagation was indicated by caller,
-         *     or was recorded (as h.waitStatus) by a previous operation
+         *     or was recorded (as h.waitStatus either before
+         *     or after setHead) by a previous operation
          *     (note: this uses sign-check of waitStatus because
          *      PROPAGATE status may transition to SIGNAL.)
          * and
@@ -501,7 +502,8 @@
          * racing acquires/releases, so most need signals now or soon
          * anyway.
          */
-        if (propagate > 0 || h == null || h.waitStatus < 0) {
+        if (propagate > 0 || h == null || h.waitStatus < 0 ||
+            (h = head) == null || h.waitStatus < 0) {
             Node s = node.next;
             if (s == null || s.isShared())
                 doReleaseShared();
--- a/src/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java	Fri Oct 25 10:39:13 2013 -0700
@@ -711,7 +711,8 @@
         /*
          * Try to signal next queued node if:
          *   Propagation was indicated by caller,
-         *     or was recorded (as h.waitStatus) by a previous operation
+         *     or was recorded (as h.waitStatus either before
+         *     or after setHead) by a previous operation
          *     (note: this uses sign-check of waitStatus because
          *      PROPAGATE status may transition to SIGNAL.)
          * and
@@ -723,7 +724,8 @@
          * racing acquires/releases, so most need signals now or soon
          * anyway.
          */
-        if (propagate > 0 || h == null || h.waitStatus < 0) {
+        if (propagate > 0 || h == null || h.waitStatus < 0 ||
+            (h = head) == null || h.waitStatus < 0) {
             Node s = node.next;
             if (s == null || s.isShared())
                 doReleaseShared();
--- a/src/share/classes/java/util/logging/Level.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/logging/Level.java	Fri Oct 25 10:39:13 2013 -0700
@@ -204,6 +204,12 @@
      * @throws NullPointerException if the name is null
      */
     protected Level(String name, int value, String resourceBundleName) {
+        this(name, value, resourceBundleName, true);
+    }
+
+    // private constructor to specify whether this instance should be added
+    // to the KnownLevel list from which Level.parse method does its look up
+    private Level(String name, int value, String resourceBundleName, boolean visible) {
         if (name == null) {
             throw new NullPointerException();
         }
@@ -212,7 +218,9 @@
         this.resourceBundleName = resourceBundleName;
         this.localizedLevelName = resourceBundleName == null ? name : null;
         this.cachedLocale = null;
-        KnownLevel.add(this);
+        if (visible) {
+            KnownLevel.add(this);
+        }
     }
 
     /**
@@ -465,7 +473,7 @@
         // Finally, look for a known level with the given localized name,
         // in the current default locale.
         // This is relatively expensive, but not excessively so.
-        level = KnownLevel.findByLocalizedName(name);
+        level = KnownLevel.findByLocalizedLevelName(name);
         if (level != null) {
             return level.levelObject;
         }
@@ -521,13 +529,14 @@
         private static Map<String, List<KnownLevel>> nameToLevels = new HashMap<>();
         private static Map<Integer, List<KnownLevel>> intToLevels = new HashMap<>();
         final Level levelObject;     // instance of Level class or Level subclass
-        final Level mirroredLevel;   // instance of Level class
+        final Level mirroredLevel;   // mirror of the custom Level
         KnownLevel(Level l) {
             this.levelObject = l;
             if (l.getClass() == Level.class) {
                 this.mirroredLevel = l;
             } else {
-                this.mirroredLevel = new Level(l.name, l.value, l.resourceBundleName);
+                // this mirrored level object is hidden
+                this.mirroredLevel = new Level(l.name, l.value, l.resourceBundleName, false);
             }
         }
 
@@ -585,20 +594,6 @@
             return null;
         }
 
-        // Returns a KnownLevel with the given localized name matching
-        // by calling the Level.getLocalizedName() method
-        static synchronized KnownLevel findByLocalizedName(String name) {
-            for (List<KnownLevel> levels : nameToLevels.values()) {
-                for (KnownLevel l : levels) {
-                    String lname = l.levelObject.getLocalizedName();
-                    if (name.equals(lname)) {
-                        return l;
-                    }
-                }
-            }
-            return null;
-        }
-
         static synchronized KnownLevel matches(Level l) {
             List<KnownLevel> list = nameToLevels.get(l.name);
             if (list != null) {
--- a/src/share/classes/java/util/logging/Logger.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/logging/Logger.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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><a name="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);
                 }
@@ -579,11 +606,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 +625,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;
@@ -665,10 +705,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 +1041,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 +1069,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 +1104,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 +1141,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 +1159,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 +1217,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 +1234,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.
@@ -1610,6 +1749,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 +1790,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 +1881,45 @@
     }
 
     /**
+     * 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 and if
+     *         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.
@@ -1813,7 +1995,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 +2077,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/stream/DoublePipeline.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/stream/DoublePipeline.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/stream/DoubleStream.java	Fri Oct 25 10:39:13 2013 -0700
@@ -289,6 +289,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 +311,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.
@@ -502,22 +511,42 @@
                   BiConsumer<R, R> combiner);
 
     /**
-     * Returns the sum of elements in this stream.  The sum returned can vary
-     * depending upon the order in which elements are encountered.  This is due
-     * to accumulated rounding error in addition of values of differing
-     * magnitudes. Elements sorted by increasing absolute magnitude tend to
-     * yield more accurate results.  If any stream element is a {@code NaN} or
-     * the sum is at any point a {@code NaN} then the sum will be {@code NaN}.
-     * This is a special case of a
-     * <a href="package-summary.html#Reduction">reduction</a> and is
+     * Returns the sum of elements in this stream.
+     *
+     * Summation is a special case of a <a
+     * href="package-summary.html#Reduction">reduction</a>. If
+     * floating-point summation were exact, this method would be
      * equivalent to:
+     *
      * <pre>{@code
      *     return reduce(0, Double::sum);
      * }</pre>
      *
+     * However, since floating-point summation is not exact, the above
+     * code is not necessarily equivalent to the summation computation
+     * done by this method.
+     *
+     * <p>If any stream element is a NaN or the sum is at any point a NaN
+     * then the sum will be NaN.
+     *
+     * The value of a floating-point sum is a function both
+     * of the input values as well as the order of addition
+     * operations. The order of addition operations of this method is
+     * intentionally not defined to allow for implementation
+     * flexibility to improve the speed and accuracy of the computed
+     * result.
+     *
+     * In particular, this method may be implemented using compensated
+     * summation or other technique to reduce the error bound in the
+     * numerical sum compared to a simple summation of {@code double}
+     * values.
+     *
      * <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.
+     *
      * @return the sum of elements in this stream
      */
     double sum();
@@ -578,19 +607,29 @@
     long count();
 
     /**
-     * Returns an {@code OptionalDouble} describing the arithmetic mean of elements of
-     * this stream, or an empty optional if this stream is empty.  The average
-     * returned can vary depending upon the order in which elements are
-     * encountered. This is due to accumulated rounding error in addition of
-     * elements of differing magnitudes. Elements sorted by increasing absolute
-     * magnitude tend to yield more accurate results. If any recorded value is
-     * a {@code NaN} or the sum is at any point a {@code NaN} then the average
-     * will be {@code NaN}. This is a special case of a
-     * <a href="package-summary.html#Reduction">reduction</a>.
+     * Returns an {@code OptionalDouble} describing the arithmetic
+     * mean of elements of this stream, or an empty optional if this
+     * stream is empty.
+     *
+     * If any recorded value is a NaN or the sum is at any point a NaN
+     * then the average will be NaN.
+     *
+     * <p>The average returned can vary depending upon the order in
+     * which values are recorded.
+     *
+     * This method may be implemented using compensated summation or
+     * other technique to reduce the error bound in the {@link #sum
+     * numerical sum} used to compute the average.
+     *
+     *  <p>The average is a special case of a <a
+     *  href="package-summary.html#Reduction">reduction</a>.
      *
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
+     * @apiNote Elements sorted by increasing absolute magnitude tend
+     * to yield more accurate results.
+     *
      * @return an {@code OptionalDouble} containing the average element of this
      * stream, or an empty optional if the stream is empty
      */
--- a/src/share/classes/java/util/stream/IntPipeline.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/stream/IntPipeline.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/stream/IntStream.java	Fri Oct 25 10:39:13 2013 -0700
@@ -287,6 +287,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 +309,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.
--- a/src/share/classes/java/util/stream/LongPipeline.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/stream/LongPipeline.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/stream/LongStream.java	Fri Oct 25 10:39:13 2013 -0700
@@ -287,6 +287,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 +309,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.
--- a/src/share/classes/java/util/stream/ReferencePipeline.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/stream/ReferencePipeline.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/Stream.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/java/util/stream/Stream.java	Fri Oct 25 10:39:13 2013 -0700
@@ -365,6 +365,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 +387,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.
--- a/src/share/classes/javax/crypto/CipherSpi.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/crypto/CipherSpi.java	Fri Oct 25 10:39:13 2013 -0700
@@ -786,7 +786,9 @@
             int total = 0;
             do {
                 int chunk = Math.min(inLen, inArray.length);
-                input.get(inArray, 0, chunk);
+                if (chunk > 0) {
+                    input.get(inArray, 0, chunk);
+                }
                 int n;
                 if (isUpdate || (inLen != chunk)) {
                     n = engineUpdate(inArray, 0, chunk, outArray, outOfs);
@@ -814,8 +816,9 @@
             int total = 0;
             boolean resized = false;
             do {
-                int chunk = Math.min(inLen, outSize);
-                if ((a1 == false) && (resized == false)) {
+                int chunk =
+                    Math.min(inLen, (outSize == 0? inArray.length : outSize));
+                if (!a1 && !resized && chunk > 0) {
                     input.get(inArray, 0, chunk);
                     inOfs = 0;
                 }
@@ -829,8 +832,10 @@
                     resized = false;
                     inOfs += chunk;
                     inLen -= chunk;
-                    output.put(outArray, 0, n);
-                    total += n;
+                    if (n > 0) {
+                        output.put(outArray, 0, n);
+                        total += n;
+                    }
                 } catch (ShortBufferException e) {
                     if (resized) {
                         // we just resized the output buffer, but it still
@@ -840,11 +845,13 @@
                     }
                     // output buffer is too small, realloc and try again
                     resized = true;
-                    int newOut = engineGetOutputSize(chunk);
-                    outArray = new byte[newOut];
+                    outSize = engineGetOutputSize(chunk);
+                    outArray = new byte[outSize];
                 }
             } while (inLen > 0);
-            input.position(inLimit);
+            if (a1) {
+                input.position(inLimit);
+            }
             return total;
         }
     }
--- a/src/share/classes/javax/crypto/JceSecurityManager.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/crypto/JceSecurityManager.java	Fri Oct 25 10:39:13 2013 -0700
@@ -230,7 +230,7 @@
     // See  bug 4341369 & 4334690 for more info.
     boolean isCallerTrusted() {
         // Get the caller and its codebase.
-        Class[] context = getClassContext();
+        Class<?>[] context = getClassContext();
         URL callerCodeBase = null;
         int i;
         for (i=0; i<context.length; i++) {
--- a/src/share/classes/javax/management/BadAttributeValueExpException.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/BadAttributeValueExpException.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/MBeanNotificationInfo.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/MBeanTrustPermission.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/remote/JMXPrincipal.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/remote/JMXServiceURL.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/remote/NotificationResult.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/remote/TargetedNotification.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/RMIConnector.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/management/remote/rmi/RMIConnector.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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/security/auth/Subject.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/security/auth/Subject.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/security/auth/kerberos/KeyTab.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/CommonDataSource.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/RowSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/BaseRowSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/CachedRowSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/FilteredRowSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/JdbcRowSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/JoinRowSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/Joinable.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/Predicate.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/WebRowSet.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/spi/SyncProvider.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/sql/rowset/spi/SyncResolver.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/swing/JTable.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/swing/UIDefaults.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/swing/text/DefaultFormatter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/swing/text/NumberFormatter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/javax/swing/text/html/ObjectView.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/sun/awt/AppContext.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/awt/AppContext.java	Fri Oct 25 10:39:13 2013 -0700
@@ -844,6 +844,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.
@@ -891,7 +900,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/font/FontUtilities.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/font/GlyphLayout.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/instrument/InstrumentationImpl.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/instrument/InstrumentationImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -170,11 +170,13 @@
         redefineClasses0(mNativeAgent, definitions);
     }
 
+    @SuppressWarnings("rawtypes")
     public Class[]
     getAllLoadedClasses() {
         return getAllLoadedClasses0(mNativeAgent);
     }
 
+    @SuppressWarnings("rawtypes")
     public Class[]
     getInitiatedClasses(ClassLoader loader) {
         return getInitiatedClasses0(mNativeAgent, loader);
@@ -255,9 +257,11 @@
     redefineClasses0(long nativeAgent, ClassDefinition[]  definitions)
         throws  ClassNotFoundException;
 
+    @SuppressWarnings("rawtypes")
     private native Class[]
     getAllLoadedClasses0(long nativeAgent);
 
+    @SuppressWarnings("rawtypes")
     private native Class[]
     getInitiatedClasses0(long nativeAgent, ClassLoader loader);
 
--- a/src/share/classes/sun/invoke/util/VerifyAccess.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/invoke/util/VerifyAccess.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/java2d/Disposer.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/management/HotSpotDiagnostic.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/management/HotSpotDiagnostic.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/misc/JavaLangAccess.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/misc/JavaLangAccess.java	Fri Oct 25 10:39:13 2013 -0700
@@ -27,6 +27,8 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Executable;
+import java.security.AccessControlContext;
+
 import sun.reflect.ConstantPool;
 import sun.reflect.annotation.AnnotationType;
 import sun.nio.ch.Interruptible;
@@ -113,4 +115,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/content/image/gif.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/net/www/content/image/gif.java	Fri Oct 25 10:39:13 2013 -0700
@@ -37,6 +37,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/src/share/classes/sun/net/www/content/image/jpeg.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/net/www/content/image/jpeg.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,6 +36,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/src/share/classes/sun/net/www/content/image/png.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/net/www/content/image/png.java	Fri Oct 25 10:39:13 2013 -0700
@@ -36,6 +36,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/src/share/classes/sun/net/www/content/image/x_xbitmap.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/net/www/content/image/x_xbitmap.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/src/share/classes/sun/net/www/content/image/x_xpixmap.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/net/www/content/image/x_xpixmap.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
         return new URLImageSource(urlc);
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException {
         Class<?>[] cls = classes;
         for (int i = 0; i < cls.length; i++) {
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Fri Oct 25 10:39:13 2013 -0700
@@ -46,7 +46,7 @@
 import java.net.CacheResponse;
 import java.net.SecureCacheResponse;
 import java.net.CacheRequest;
-import java.net.HttpURLPermission;
+import java.net.URLPermission;
 import java.net.Authenticator.RequestorType;
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
@@ -389,7 +389,7 @@
     private int connectTimeout = NetworkClient.DEFAULT_CONNECT_TIMEOUT;
     private int readTimeout = NetworkClient.DEFAULT_READ_TIMEOUT;
 
-    /* A permission converted from a HttpURLPermission */
+    /* A permission converted from a URLPermission */
     private SocketPermission socketPermission;
 
     /* Logging support */
@@ -930,8 +930,7 @@
                             plainConnect0();
                             return null;
                         }
-                    }
-//                    }, null, p -- replace line above, when limited doPriv ready
+                    }, null, p
                 );
             } catch (PrivilegedActionException e) {
                     throw (IOException) e.getException();
@@ -943,7 +942,7 @@
     }
 
     /**
-     *  if the caller has a HttpURLPermission for connecting to the
+     *  if the caller has a URLPermission for connecting to the
      *  given URL, then return a SocketPermission which permits
      *  access to that destination. Return null otherwise. The permission
      *  is cached in a field (which can only be changed by redirects)
@@ -969,7 +968,10 @@
         String actions = getRequestMethod()+":" +
                 getUserSetHeaders().getHeaderNamesInList();
 
-        HttpURLPermission p = new HttpURLPermission(url.toString(), actions);
+        String urlstring = url.getProtocol() + "://" + url.getAuthority()
+                + url.getPath();
+
+        URLPermission p = new URLPermission(urlstring, actions);
         try {
             sm.checkPermission(p);
             socketPermission = newPerm;
@@ -1188,8 +1190,7 @@
                         public OutputStream run() throws IOException {
                             return getOutputStream0();
                         }
-                    }
-//                    }, null, p -- replace line above, when limited doPriv ready
+                    }, null, p
                 );
             } catch (PrivilegedActionException e) {
                 throw (IOException) e.getException();
@@ -1372,8 +1373,7 @@
                         public InputStream run() throws IOException {
                             return getInputStream0();
                         }
-                    }
-//                    }, null, p -- replace line above, when limited doPriv ready
+                    }, null, p
                 );
             } catch (PrivilegedActionException e) {
                 throw (IOException) e.getException();
@@ -2507,8 +2507,7 @@
                         public Boolean run() throws IOException {
                             return followRedirect0(loc, stat, locUrl0);
                         }
-                    }
-//                    }, null, p -- replace line above, when limited doPriv ready
+                    }, null, p
                 );
             } catch (PrivilegedActionException e) {
                 throw (IOException) e.getException();
--- a/src/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -434,6 +434,7 @@
         return delegate.getContent();
     }
 
+    @SuppressWarnings("rawtypes")
     public Object getContent(Class[] classes) throws IOException {
         return delegate.getContent(classes);
     }
--- a/src/share/classes/sun/reflect/AccessorGenerator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/reflect/AccessorGenerator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -379,6 +379,10 @@
         return Modifier.isStatic(modifiers);
     }
 
+    protected boolean isPrivate() {
+        return Modifier.isPrivate(modifiers);
+    }
+
     /** Returns class name in "internal" form (i.e., '/' separators
         instead of '.') */
     protected static String getClassName
--- a/src/share/classes/sun/reflect/MethodAccessorGenerator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/reflect/MethodAccessorGenerator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -639,10 +639,14 @@
                                     typeSizeInStackSlots(returnType));
             } else {
                 if (isInterface()) {
-                    cb.opc_invokeinterface(targetMethodRef,
-                                           count,
-                                           count,
-                                           typeSizeInStackSlots(returnType));
+                    if (isPrivate()) {
+                        cb.opc_invokespecial(targetMethodRef, count, 0);
+                    } else {
+                        cb.opc_invokeinterface(targetMethodRef,
+                                               count,
+                                               count,
+                                               typeSizeInStackSlots(returnType));
+                    }
                 } else {
                     cb.opc_invokevirtual(targetMethodRef,
                                          count,
--- a/src/share/classes/sun/reflect/Reflection.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/reflect/Reflection.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,7 +65,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/misc/MethodUtil.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/reflect/misc/MethodUtil.java	Fri Oct 25 10:39:13 2013 -0700
@@ -217,7 +217,7 @@
      */
     private static class Signature {
         private String methodName;
-        private Class[] argClasses;
+        private Class<?>[] argClasses;
 
         private volatile int hashCode = 0;
 
@@ -299,7 +299,7 @@
                 new PrivilegedExceptionAction<Method>() {
                     public Method run() throws Exception {
                         Class<?> t = getTrampolineClass();
-                        Class[] types = {
+                        Class<?>[] types = {
                             Method.class, Object.class, Object[].class
                         };
                         Method b = t.getDeclaredMethod("invoke", types);
--- a/src/share/classes/sun/reflect/misc/ReflectUtil.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/reflect/misc/ReflectUtil.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/security/ec/ECPrivateKeyImpl.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/jgss/GSSCredentialImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/jgss/krb5/InitialToken.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/krb5/KdcComm.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/krb5/KrbCred.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/krb5/internal/NetClient.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/pkcs/PKCS8Key.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/pkcs11/P11Key.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/pkcs11/P11KeyPairGenerator.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,20 +70,67 @@
     // for RSA, selected or default value of public exponent, always valid
     private BigInteger rsaPublicExponent = RSAKeyGenParameterSpec.F4;
 
+    // the supported keysize range of the native PKCS11 library
+    // if the value cannot be retrieved or unspecified, -1 is used.
+    private final int minKeySize;
+    private final int maxKeySize;
+
     // SecureRandom instance, if specified in init
     private SecureRandom random;
 
     P11KeyPairGenerator(Token token, String algorithm, long mechanism)
             throws PKCS11Exception {
         super();
+        int minKeyLen = -1;
+        int maxKeyLen = -1;
+        try {
+            CK_MECHANISM_INFO mechInfo = token.getMechanismInfo(mechanism);
+            if (mechInfo != null) {
+                minKeyLen = (int) mechInfo.ulMinKeySize;
+                maxKeyLen = (int) mechInfo.ulMaxKeySize;
+            }
+        } catch (PKCS11Exception p11e) {
+            // Should never happen
+            throw new ProviderException
+                        ("Unexpected error while getting mechanism info", p11e);
+        }
+        // set default key sizes and apply our own algorithm-specific limits
+        // override lower limit to disallow unsecure keys being generated
+        // override upper limit to deter DOS attack
+        if (algorithm.equals("EC")) {
+            keySize = 256;
+            if ((minKeyLen == -1) || (minKeyLen < 112)) {
+                minKeyLen = 112;
+            }
+            if ((maxKeyLen == -1) || (maxKeyLen > 2048)) {
+                maxKeyLen = 2048;
+            }
+        } else {
+            // RSA, DH, and DSA
+            keySize = 1024;
+            if ((minKeyLen == -1) || (minKeyLen < 512)) {
+                minKeyLen = 512;
+            }
+            if (algorithm.equals("RSA")) {
+                if ((maxKeyLen == -1) || (maxKeyLen > 64 * 1024)) {
+                    maxKeyLen = 64 * 1024;
+                }
+            }
+        }
+
+        // auto-adjust default keysize in case it's out-of-range
+        if ((minKeyLen != -1) && (keySize < minKeyLen)) {
+            keySize = minKeyLen;
+        }
+        if ((maxKeyLen != -1) && (keySize > maxKeyLen)) {
+            keySize = maxKeyLen;
+        }
         this.token = token;
         this.algorithm = algorithm;
         this.mechanism = mechanism;
-        if (algorithm.equals("EC")) {
-            initialize(256, null);
-        } else {
-            initialize(1024, null);
-        }
+        this.minKeySize = minKeyLen;
+        this.maxKeySize = maxKeyLen;
+        initialize(keySize, null);
     }
 
     // see JCA spec
@@ -94,9 +141,7 @@
         } catch (InvalidAlgorithmParameterException e) {
             throw new InvalidParameterException(e.getMessage());
         }
-        this.keySize = keySize;
         this.params = null;
-        this.random = random;
         if (algorithm.equals("EC")) {
             params = P11ECKeyFactory.getECParameterSpec(keySize);
             if (params == null) {
@@ -105,33 +150,35 @@
                     + keySize + " bits");
             }
         }
+        this.keySize = keySize;
+        this.random = random;
     }
 
     // see JCA spec
     public void initialize(AlgorithmParameterSpec params, SecureRandom random)
             throws InvalidAlgorithmParameterException {
         token.ensureValid();
+        int tmpKeySize;
         if (algorithm.equals("DH")) {
             if (params instanceof DHParameterSpec == false) {
                 throw new InvalidAlgorithmParameterException
                         ("DHParameterSpec required for Diffie-Hellman");
             }
-            DHParameterSpec dhParams = (DHParameterSpec)params;
-            int tmpKeySize = dhParams.getP().bitLength();
-            checkKeySize(tmpKeySize, dhParams);
-            this.keySize = tmpKeySize;
-            this.params = dhParams;
+            DHParameterSpec dhParams = (DHParameterSpec) params;
+            tmpKeySize = dhParams.getP().bitLength();
+            checkKeySize(tmpKeySize, null);
             // XXX sanity check params
         } else if (algorithm.equals("RSA")) {
             if (params instanceof RSAKeyGenParameterSpec == false) {
                 throw new InvalidAlgorithmParameterException
                         ("RSAKeyGenParameterSpec required for RSA");
             }
-            RSAKeyGenParameterSpec rsaParams = (RSAKeyGenParameterSpec)params;
-            int tmpKeySize = rsaParams.getKeysize();
+            RSAKeyGenParameterSpec rsaParams =
+                (RSAKeyGenParameterSpec) params;
+            tmpKeySize = rsaParams.getKeysize();
             checkKeySize(tmpKeySize, rsaParams);
-            this.keySize = tmpKeySize;
-            this.params = null;
+            // override the supplied params to null
+            params = null;
             this.rsaPublicExponent = rsaParams.getPublicExponent();
             // XXX sanity check params
         } else if (algorithm.equals("DSA")) {
@@ -139,11 +186,9 @@
                 throw new InvalidAlgorithmParameterException
                         ("DSAParameterSpec required for DSA");
             }
-            DSAParameterSpec dsaParams = (DSAParameterSpec)params;
-            int tmpKeySize = dsaParams.getP().bitLength();
-            checkKeySize(tmpKeySize, dsaParams);
-            this.keySize = tmpKeySize;
-            this.params = dsaParams;
+            DSAParameterSpec dsaParams = (DSAParameterSpec) params;
+            tmpKeySize = dsaParams.getP().bitLength();
+            checkKeySize(tmpKeySize, null);
             // XXX sanity check params
         } else if (algorithm.equals("EC")) {
             ECParameterSpec ecParams;
@@ -155,28 +200,42 @@
                         ("Unsupported curve: " + params);
                 }
             } else if (params instanceof ECGenParameterSpec) {
-                String name = ((ECGenParameterSpec)params).getName();
+                String name = ((ECGenParameterSpec) params).getName();
                 ecParams = P11ECKeyFactory.getECParameterSpec(name);
                 if (ecParams == null) {
                     throw new InvalidAlgorithmParameterException
                         ("Unknown curve name: " + name);
                 }
+                // override the supplied params with the derived one
+                params = ecParams;
             } else {
                 throw new InvalidAlgorithmParameterException
                     ("ECParameterSpec or ECGenParameterSpec required for EC");
             }
-            int tmpKeySize = ecParams.getCurve().getField().getFieldSize();
-            checkKeySize(tmpKeySize, ecParams);
-            this.keySize = tmpKeySize;
-            this.params = ecParams;
+            tmpKeySize = ecParams.getCurve().getField().getFieldSize();
+            checkKeySize(tmpKeySize, null);
         } else {
             throw new ProviderException("Unknown algorithm: " + algorithm);
         }
+        this.keySize = tmpKeySize;
+        this.params = params;
         this.random = random;
     }
 
-    private void checkKeySize(int keySize, AlgorithmParameterSpec params)
-            throws InvalidAlgorithmParameterException {
+    // NOTE: 'params' is only used for checking RSA keys currently.
+    private void checkKeySize(int keySize, RSAKeyGenParameterSpec params)
+        throws InvalidAlgorithmParameterException {
+        // check native range first
+        if ((minKeySize != -1) && (keySize < minKeySize)) {
+            throw new InvalidAlgorithmParameterException(algorithm +
+                " key must be at least " + minKeySize + " bits");
+        }
+        if ((maxKeySize != -1) && (keySize > maxKeySize)) {
+            throw new InvalidAlgorithmParameterException(algorithm +
+                " key must be at most " + maxKeySize + " bits");
+        }
+
+        // check our own algorithm-specific limits also
         if (algorithm.equals("EC")) {
             if (keySize < 112) {
                 throw new InvalidAlgorithmParameterException
@@ -187,41 +246,45 @@
                 throw new InvalidAlgorithmParameterException
                     ("Key size must be at most 2048 bit");
             }
-            return;
-        } else if (algorithm.equals("RSA")) {
-            BigInteger tmpExponent = rsaPublicExponent;
-            if (params != null) {
-                // Already tested for instanceof RSAKeyGenParameterSpec above
-                tmpExponent =
-                    ((RSAKeyGenParameterSpec)params).getPublicExponent();
-            }
-            try {
-                // This provider supports 64K or less.
-                RSAKeyFactory.checkKeyLengths(keySize, tmpExponent,
-                    512, 64 * 1024);
-            } catch (InvalidKeyException e) {
-                throw new InvalidAlgorithmParameterException(e.getMessage());
+        } else {
+            // RSA, DH, DSA
+            if (keySize < 512) {
+                throw new InvalidAlgorithmParameterException
+                    ("Key size must be at least 512 bit");
             }
-            return;
-        }
-
-        if (keySize < 512) {
-            throw new InvalidAlgorithmParameterException
-                ("Key size must be at least 512 bit");
-        }
-        if (algorithm.equals("DH") && (params != null)) {
-            // sanity check, nobody really wants keys this large
-            if (keySize > 64 * 1024) {
-                throw new InvalidAlgorithmParameterException
-                    ("Key size must be at most 65536 bit");
-            }
-        } else {
-            // this restriction is in the spec for DSA
-            // since we currently use DSA parameters for DH as well,
-            // it also applies to DH if no parameters are specified
-            if ((keySize > 1024) || ((keySize & 0x3f) != 0)) {
-                throw new InvalidAlgorithmParameterException
-                    ("Key size must be a multiple of 64 and at most 1024 bit");
+            if (algorithm.equals("RSA")) {
+                BigInteger tmpExponent = rsaPublicExponent;
+                if (params != null) {
+                    tmpExponent = params.getPublicExponent();
+                }
+                try {
+                    // Reuse the checking in SunRsaSign provider.
+                    // If maxKeySize is -1, then replace it with
+                    // Integer.MAX_VALUE to indicate no limit.
+                    RSAKeyFactory.checkKeyLengths(keySize, tmpExponent,
+                        minKeySize,
+                        (maxKeySize==-1? Integer.MAX_VALUE:maxKeySize));
+                } catch (InvalidKeyException e) {
+                    throw new InvalidAlgorithmParameterException(e.getMessage());
+                }
+            } else {
+                if (algorithm.equals("DH") && (params != null)) {
+                    // sanity check, nobody really wants keys this large
+                    if (keySize > 64 * 1024) {
+                        throw new InvalidAlgorithmParameterException
+                            ("Key size must be at most 65536 bit");
+                    }
+                } else {
+                    // this restriction is in the spec for DSA
+                    // since we currently use DSA parameters for DH as well,
+                    // it also applies to DH if no parameters are specified
+                    if ((keySize != 2048) &&
+                        ((keySize > 1024) || ((keySize & 0x3f) != 0))) {
+                        throw new InvalidAlgorithmParameterException(algorithm +
+                            " key must be multiples of 64 if less than 1024 bits" +
+                            ", or 2048 bits");
+                    }
+                }
             }
         }
     }
@@ -325,5 +388,4 @@
             token.releaseSession(session);
         }
     }
-
 }
--- a/src/share/classes/sun/security/provider/AuthPolicyFile.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/provider/AuthPolicyFile.java	Fri Oct 25 10:39:13 2013 -0700
@@ -91,7 +91,7 @@
     private boolean ignoreIdentityScope = true;
 
     // for use with the reflection API
-    private static final Class[] PARAMS = { String.class, String.class};
+    private static final Class<?>[] PARAMS = { String.class, String.class};
 
     /**
      * Initializes the Policy object and reads the default policy
--- a/src/share/classes/sun/security/provider/DSAPrivateKey.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/provider/DSAPrivateKey.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/DomainKeyStore.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/provider/DomainKeyStore.java	Fri Oct 25 10:39:13 2013 -0700
@@ -41,7 +41,7 @@
  * This class provides the domain keystore type identified as "DKS".
  * DKS presents a collection of separate keystores as a single logical keystore.
  * The collection of keystores is specified in a domain configuration file which
- * is passed to DKS in a {@link KeyStore.DomainLoadStoreParameter}.
+ * is passed to DKS in a {@link DomainLoadStoreParameter}.
  * <p>
  * The following properties are supported:
  * <dl>
@@ -622,17 +622,16 @@
         }
 
         throw new UnsupportedOperationException(
-            "This keystore must be stored using a " +
-            "KeyStore.DomainLoadStoreParameter");
+            "This keystore must be stored using a DomainLoadStoreParameter");
     }
 
     @Override
     public void engineStore(KeyStore.LoadStoreParameter param)
         throws IOException, NoSuchAlgorithmException, CertificateException
     {
-        if (param instanceof KeyStore.DomainLoadStoreParameter) {
-            KeyStore.DomainLoadStoreParameter domainParameter =
-                (KeyStore.DomainLoadStoreParameter) param;
+        if (param instanceof DomainLoadStoreParameter) {
+            DomainLoadStoreParameter domainParameter =
+                (DomainLoadStoreParameter) param;
             List<KeyStoreBuilderComponents> builders = getBuilders(
                 domainParameter.getConfiguration(),
                     domainParameter.getProtectionParams());
@@ -645,7 +644,7 @@
                     if (!(pp instanceof KeyStore.PasswordProtection)) {
                         throw new KeyStoreException(
                             new IllegalArgumentException("ProtectionParameter" +
-                                " must be a KeyStore.PasswordPartection"));
+                                " must be a KeyStore.PasswordProtection"));
                     }
                     char[] password =
                         ((KeyStore.PasswordProtection) builder.protection)
@@ -653,9 +652,12 @@
 
                     // Store the keystores
                     KeyStore keystore = keystores.get(builder.name);
-                    keystore.store(new FileOutputStream(builder.file),
-                        password);
 
+                    try (FileOutputStream stream =
+                        new FileOutputStream(builder.file)) {
+
+                        keystore.store(stream, password);
+                    }
                 } catch (KeyStoreException e) {
                     throw new IOException(e);
                 }
@@ -663,7 +665,7 @@
         } else {
             throw new UnsupportedOperationException(
                 "This keystore must be stored using a " +
-                "KeyStore.DomainLoadStoreParameter");
+                "DomainLoadStoreParameter");
         }
     }
 
@@ -710,7 +712,7 @@
         } catch (Exception e) {
             throw new UnsupportedOperationException(
                 "This keystore must be loaded using a " +
-                "KeyStore.DomainLoadStoreParameter");
+                "DomainLoadStoreParameter");
         }
     }
 
@@ -718,9 +720,9 @@
     public void engineLoad(KeyStore.LoadStoreParameter param)
         throws IOException, NoSuchAlgorithmException, CertificateException
     {
-        if (param instanceof KeyStore.DomainLoadStoreParameter) {
-            KeyStore.DomainLoadStoreParameter domainParameter =
-                (KeyStore.DomainLoadStoreParameter) param;
+        if (param instanceof DomainLoadStoreParameter) {
+            DomainLoadStoreParameter domainParameter =
+                (DomainLoadStoreParameter) param;
             List<KeyStoreBuilderComponents> builders = getBuilders(
                 domainParameter.getConfiguration(),
                     domainParameter.getProtectionParams());
@@ -748,7 +750,7 @@
         } else {
             throw new UnsupportedOperationException(
                 "This keystore must be loaded using a " +
-                "KeyStore.DomainLoadStoreParameter");
+                "DomainLoadStoreParameter");
         }
     }
 
--- a/src/share/classes/sun/security/provider/SubjectCodeSource.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/provider/SubjectCodeSource.java	Fri Oct 25 10:39:13 2013 -0700
@@ -58,7 +58,7 @@
 
     private Subject subject;
     private LinkedList<PrincipalEntry> principals;
-    private static final Class[] PARAMS = { String.class };
+    private static final Class<?>[] PARAMS = { String.class };
     private static final sun.security.util.Debug debug =
         sun.security.util.Debug.getInstance("auth", "\t[Auth Access]");
     private ClassLoader sysClassLoader;
--- a/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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/Main.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/tools/jarsigner/Main.java	Fri Oct 25 10:39:13 2013 -0700
@@ -93,7 +93,7 @@
     // prefix for new signature-related files in META-INF directory
     private static final String SIG_PREFIX = META_INF + "SIG-";
 
-    private static final Class[] PARAM_STRING = { String.class };
+    private static final Class<?>[] PARAM_STRING = { String.class };
 
     private static final String NONE = "NONE";
     private static final String P11KEYSTORE = "PKCS11";
--- a/src/share/classes/sun/security/tools/keytool/Main.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/tools/keytool/Main.java	Fri Oct 25 10:39:13 2013 -0700
@@ -309,7 +309,7 @@
         }
     };
 
-    private static final Class[] PARAM_STRING = { String.class };
+    private static final Class<?>[] PARAM_STRING = { String.class };
 
     private static final String NONE = "NONE";
     private static final String P11KEYSTORE = "PKCS11";
--- a/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -77,9 +103,9 @@
     boolean modified = false;
 
     private static final boolean testing = false;
-    private static final Class[] TWOPARAMS = { String.class, String.class };
-    private static final Class[] ONEPARAMS = { String.class };
-    private static final Class[] NOPARAMS  = {};
+    private static final Class<?>[] TWOPARAMS = { String.class, String.class };
+    private static final Class<?>[] ONEPARAMS = { String.class };
+    private static final Class<?>[] NOPARAMS  = {};
     /*
      * All of the policy entries are read in from the
      * policy file and stored here.  Updates to the policy entries
@@ -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);
+        addMenuItem(menu, OPEN_POLICY_FILE, actionListener);
+        addMenuItem(menu, SAVE_POLICY_FILE, actionListener);
+        addMenuItem(menu, SAVE_AS_POLICY_FILE, actionListener);
+        addMenuItem(menu, VIEW_WARNINGS, actionListener);
+        addMenuItem(menu, QUIT, actionListener);
         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);
         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,68 @@
     }
 
 
+    // Platform specific modifier (control / command).
+    private int shortCutModifier = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+
+    private void addMenuItem(JMenu menu, String key, ActionListener actionListener) {
+        JMenuItem menuItem = new JMenuItem();
+        configureButton(menuItem, key);
+
+        if (PolicyTool.rb.containsKey(key + ".accelerator")) {
+            String accelerator = PolicyTool.getMessage(key + ".accelerator");
+            if (accelerator != null && !accelerator.isEmpty()) {
+                KeyStroke keyStroke;
+                if (accelerator.matches("^control .$")) {
+                    // Map "control" key to "command" on MacOS
+                    keyStroke = KeyStroke.getKeyStroke(KeyEvent.getExtendedKeyCodeForChar(accelerator.charAt(8)),
+                                                       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 +1300,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 +1315,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 +1328,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 +1341,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 +1365,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 +1406,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 +1438,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 +1478,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 +1510,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 +1526,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 +1541,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 +1564,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 +1666,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;
@@ -1447,7 +1685,7 @@
         PERM_ARRAY.add(new AWTPerm());
         PERM_ARRAY.add(new DelegationPerm());
         PERM_ARRAY.add(new FilePerm());
-        PERM_ARRAY.add(new HttpURLPerm());
+        PERM_ARRAY.add(new URLPerm());
         PERM_ARRAY.add(new InqSecContextPerm());
         PERM_ARRAY.add(new LogPerm());
         PERM_ARRAY.add(new MgmtPerm());
@@ -1480,6 +1718,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 +1792,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 +1834,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 +1935,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 +1965,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 +1984,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 +2002,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 +2010,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 +2028,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 +2136,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 +2215,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 +2252,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 +2356,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 +2376,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 +2392,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 +2434,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 +2458,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 +2470,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 +2493,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 +2513,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 +2541,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 +2556,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 +2568,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 +2579,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 +2594,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 +2617,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 +2635,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 +2653,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 +2693,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 +2733,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 +2750,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 +2771,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 +2834,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 +2848,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 +2864,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 +2878,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 +2910,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 +2922,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 +2952,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 +2967,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 +2998,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 +3009,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 +3020,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 +3030,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 +3046,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 +3066,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 +3096,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 +3120,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 +3138,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 +3181,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 +3191,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 +3232,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 +3249,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 +3345,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 +3406,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 +3463,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 +3498,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 +3516,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 +3540,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 +3562,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 +3580,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 +3610,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 +3628,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 +3660,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 +3691,7 @@
 
                 Perm inputPerm = ToolDialog.getPerm(permField.getText(), true);
                 if (inputPerm != null) {
-                    perms.select(inputPerm.CLASS);
+                    perms.setSelectedItem(inputPerm.CLASS);
                 }
             }
             return;
@@ -3382,15 +3731,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 +3760,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 +3895,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 +3908,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 +3990,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 +4024,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 +4135,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);
@@ -3843,16 +4196,16 @@
     }
 }
 
-class HttpURLPerm extends Perm {
-    public HttpURLPerm() {
-        super("HttpURLPermission",
-                "java.net.HttpURLPermission",
+class URLPerm extends Perm {
+    public URLPerm() {
+        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 +4370,7 @@
                 "setSecurityManager",
                 "createSecurityManager",
                 "getenv.<" +
-                    PolicyTool.rb.getString("environment.variable.name") + ">",
+                    PolicyTool.getMessage("environment.variable.name") + ">",
                 "exitVM",
                 "shutdownHooks",
                 "setFactory",
@@ -4029,11 +4382,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 +4409,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 +4425,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/security/tools/policytool/Resources.java	Fri Oct 25 10:39:13 2013 -0700
@@ -44,16 +44,19 @@
         {"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"},
+        {"New.accelerator", "control N"},
+        {"Open", "&Open..."},
+        {"Open.accelerator", "control O"},
+        {"Save", "&Save"},
+        {"Save.accelerator", "control S"},
+        {"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 +69,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 +92,25 @@
         {"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"},
+
+        // Policy Entry Dialog
+        {"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 Edit Dialog
+        {"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 +130,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/swing/SwingLazyValue.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/swing/SwingUtilities2.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/jstat/RowClosure.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/tools/jstat/RowClosure.java	Fri Oct 25 10:39:13 2013 -0700
@@ -62,6 +62,9 @@
             double d = ((Number)value).doubleValue();
             double scaledValue = c.getScale().scale(d);
             DecimalFormat df = new DecimalFormat(c.getFormat());
+            DecimalFormatSymbols syms = df.getDecimalFormatSymbols();
+            syms.setNaN("-");
+            df.setDecimalFormatSymbols(syms);
             s = df.format(scaledValue);
         }
 
--- a/src/share/classes/sun/tools/tree/Node.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/tools/tree/Node.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/locale/LocaleEquivalentMaps.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/locale/LocaleEquivalentMaps.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/logging/PlatformLogger.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/TimeZoneNames.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/TimeZoneNames_ko.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/TimeZoneNames_sv.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/demo/jvmti/hprof/hprof_class.c	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/demo/jvmti/hprof/hprof_class.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/demo/jvmti/hprof/hprof_event.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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/lib/security/java.security-macosx	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/lib/security/java.security-macosx	Fri Oct 25 10:39:13 2013 -0700
@@ -205,12 +205,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
@@ -250,12 +250,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/native/com/sun/java/util/jar/pack/zip.cpp	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/com/sun/java/util/jar/pack/zip.cpp	Fri Oct 25 10:39:13 2013 -0700
@@ -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
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/java/lang/Class.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/java/net/Inet6Address.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/java/net/net_util.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/java/net/net_util.h	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/sun/awt/image/awt_parseImage.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/sun/awt/image/awt_parseImage.h	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/sun/awt/medialib/awt_ImagingLib.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/sun/font/layout/SunLayoutEngine.cpp	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/sun/java2d/cmm/lcms/cmsio0.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/share/native/sun/management/HotSpotDiagnostic.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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/solaris/bin/java_md_solinux.c	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/solaris/bin/java_md_solinux.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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/com/sun/management/OSMBeanFactory.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/solaris/classes/com/sun/management/OSMBeanFactory.java	Fri Oct 25 10:39:13 2013 -0700
@@ -35,6 +35,7 @@
  * public API and its API may change in incompatable ways between dot dot
  * releases and even patch releases. You should not rely on this class.
  */
+@jdk.Exported(false)
 public class OSMBeanFactory {
     /* static factory class */
     private OSMBeanFactory() {};
--- a/src/solaris/doc/sun/man/man1/ja/javaws.1	Fri Oct 25 19:51:54 2013 +0400
+++ /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	Fri Oct 25 19:51:54 2013 +0400
+++ /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/lang/java_props_md.c	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/solaris/native/java/lang/java_props_md.c	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -158,6 +158,9 @@
 
     temp = malloc(strlen(lc) + 1);
     if (temp == NULL) {
+#ifdef MACOSX
+        free(lc); // malloced memory
+#endif
         JNU_ThrowOutOfMemoryError(env, NULL);
         return 0;
     }
@@ -172,7 +175,6 @@
          * the encoding - without it, we wouldn't get ISO-8859-15.
          * Therefore, this code section is Solaris-specific.
          */
-        lc = strdup(lc);    /* keep a copy, setlocale trashes original. */
         strcpy(temp, lc);
         p = strstr(temp, "@euro");
         if (p != NULL) {
--- a/src/solaris/native/java/net/Inet4AddressImpl.c	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/solaris/native/java/net/Inet4AddressImpl.c	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,7 +51,27 @@
 #define HAS_GLIBC_GETHOSTBY_R   1
 #endif
 
+static jclass ni_iacls;
+static jclass ni_ia4cls;
+static jmethodID ni_ia4ctrID;
+
+static void initializeInetClasses(JNIEnv *env)
+{
+    static int initialized = 0;
+    if (!initialized) {
+        ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
+        ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
+        ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
+        ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
+        ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
+        initialized = 1;
+    }
+}
+
+
 #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
@@ -99,14 +119,6 @@
     return (*env)->NewStringUTF(env, hostname);
 }
 
-static jclass ni_iacls;
-static jclass ni_ia4cls;
-static jmethodID ni_ia4ctrID;
-static jfieldID ni_iaaddressID;
-static jfieldID ni_iahostID;
-static jfieldID ni_iafamilyID;
-static int initialized = 0;
-
 /*
  * Find an internet address for a given hostname.  Note that this
  * code only works for addresses of type INET. The translation
@@ -129,14 +141,7 @@
     int error=0;
     struct addrinfo hints, *res, *resNew = NULL;
 
-    if (!initialized) {
-      ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
-      ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
-      ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
-      ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
-      ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
-      initialized = 1;
-    }
+    initializeInetClasses(env);
 
     if (IS_NULL(host)) {
         JNU_ThrowNullPointerException(env, "host is null");
@@ -160,12 +165,22 @@
         return NULL;
     }
 
+#ifdef MACOSX
+    /* If we're looking up the local machine, bypass DNS lookups and get
+     * address from getifaddrs.
+     */
+    ret = lookupIfLocalhost(env, hostname, JNI_FALSE);
+    if (ret != NULL || (*env)->ExceptionCheck(env)) {
+        JNU_ReleaseStringPlatformChars(env, host, hostname);
+        return ret;
+    }
+#endif
+
     error = getaddrinfo(hostname, NULL, &hints, &res);
 
     if (error) {
         /* report error */
-        JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException",
-                        (char *)hostname);
+        ThrowUnknownHostExceptionWithGaiError(env, hostname, error);
         JNU_ReleaseStringPlatformChars(env, host, hostname);
         return NULL;
     } else {
@@ -365,11 +380,6 @@
     return (*env)->NewStringUTF(env, hostname);
 }
 
-static jclass ni_iacls;
-static jclass ni_ia4cls;
-static jmethodID ni_ia4ctrID;
-static int initialized = 0;
-
 /*
  * Find an internet address for a given hostname.  Note that this
  * code only works for addresses of type INET. The translation
@@ -390,14 +400,7 @@
     int error = 0;
     struct addrinfo hints, *res, *resNew = NULL;
 
-    if (!initialized) {
-      ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
-      ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
-      ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
-      ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
-      ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
-      initialized = 1;
-    }
+    initializeInetClasses(env);
 
     if (IS_NULL(host)) {
         JNU_ThrowNullPointerException(env, "host is null");
--- a/src/solaris/native/java/net/Inet6AddressImpl.c	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/solaris/native/java/net/Inet6AddressImpl.c	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
 #include <strings.h>
 #include <stdlib.h>
 #include <ctype.h>
-#ifdef _ALLBSD_SOURCE
+#ifdef MACOSX
+#include <ifaddrs.h>
+#include <net/if.h>
 #include <unistd.h> /* gethostname */
 #endif
 
@@ -120,8 +122,146 @@
 static jclass ni_ia6cls;
 static jmethodID ni_ia4ctrID;
 static jmethodID ni_ia6ctrID;
-static jfieldID ni_ia6ipaddressID;
-static int initialized = 0;
+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");
+        ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
+        ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
+        ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
+        ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address");
+        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_preferIPv6AddressID =
+            (*env)->GetStaticFieldID(env, ni_iacls, "preferIPv6Address", "Z");
+        preferIPv6Address =
+            (*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID);
+        initialized = 1;
+    }
+}
+
+#ifdef MACOSX
+/* also called from Inet4AddressImpl.c */
+__private_extern__ jobjectArray
+lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6)
+{
+    jobjectArray result = NULL;
+    char myhostname[NI_MAXHOST+1];
+    struct ifaddrs *ifa = NULL;
+    int familyOrder = 0;
+    int count = 0, i, j;
+    int addrs4 = 0, addrs6 = 0, numV4Loopbacks = 0, numV6Loopbacks = 0;
+    jboolean includeLoopback = JNI_FALSE;
+    jobject name;
+
+    // Make sure static variables we need are set.
+    initializeInetClasses(env);
+
+    /* 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
+     * the name (if the name actually matches something in DNS etc.
+     */
+    myhostname[0] = '\0';
+    if (JVM_GetHostName(myhostname, NI_MAXHOST)) {
+        /* Something went wrong, maybe networking is not setup? */
+        return NULL;
+    }
+    myhostname[NI_MAXHOST] = '\0';
+
+    if (strcmp(myhostname, hostname) != 0) {
+        // Non-self lookup
+        return NULL;
+    }
+
+    if (getifaddrs(&ifa) != 0) {
+        NET_ThrowNew(env, errno, "Can't get local interface addresses");
+        return NULL;
+    }
+
+    name = (*env)->NewStringUTF(env, hostname);
+
+    /* Iterate over the interfaces, and total up the number of IPv4 and IPv6
+     * addresses we have. Also keep a count of loopback addresses. We need to
+     * exclude them in the normal case, but return them if we don't get an IP
+     * address.
+     */
+    struct ifaddrs *iter = ifa;
+    while (iter) {
+        int family = iter->ifa_addr->sa_family;
+        if (iter->ifa_name[0] != '\0'  &&  iter->ifa_addr)
+        {
+            jboolean isLoopback = iter->ifa_flags & IFF_LOOPBACK;
+            if (family == AF_INET) {
+                addrs4++;
+                if (isLoopback) numV4Loopbacks++;
+            } else if (family == AF_INET6 && includeV6) {
+                addrs6++;
+                if (isLoopback) numV6Loopbacks++;
+            } else {
+                /* We don't care e.g. AF_LINK */
+            }
+        }
+        iter = iter->ifa_next;
+    }
+
+    if (addrs4 == numV4Loopbacks && addrs6 == numV6Loopbacks) {
+        // We don't have a real IP address, just loopback. We need to include
+        // loopback in our results.
+        includeLoopback = JNI_TRUE;
+    }
+
+    /* Create and fill the Java array. */
+    int arraySize = addrs4 + addrs6 -
+        (includeLoopback ? 0 : (numV4Loopbacks + numV6Loopbacks));
+    result = (*env)->NewObjectArray(env, arraySize, ni_iacls, NULL);
+    if (!result) goto done;
+
+    if (preferIPv6Address) {
+        i = includeLoopback ? addrs6 : (addrs6 - numV6Loopbacks);
+        j = 0;
+    } else {
+        i = 0;
+        j = includeLoopback ? addrs4 : (addrs4 - numV4Loopbacks);
+    }
+
+    // Now loop around the ifaddrs
+    iter = ifa;
+    while (iter != NULL) {
+        jboolean isLoopback = iter->ifa_flags & IFF_LOOPBACK;
+        int family = iter->ifa_addr->sa_family;
+
+        if (iter->ifa_name[0] != '\0'  &&  iter->ifa_addr
+            && (family == AF_INET || (family == AF_INET6 && includeV6))
+            && (!isLoopback || includeLoopback))
+        {
+            int port;
+            int index = (family == AF_INET) ? i++ : j++;
+            jobject o = NET_SockaddrToInetAddress(env, iter->ifa_addr, &port);
+            if (!o) {
+                freeifaddrs(ifa);
+                if (!(*env)->ExceptionCheck(env))
+                    JNU_ThrowOutOfMemoryError(env, "Object allocation failed");
+                return NULL;
+            }
+            setInetAddress_hostName(env, o, name);
+            (*env)->SetObjectArrayElement(env, result, index, o);
+            (*env)->DeleteLocalRef(env, o);
+        }
+        iter = iter->ifa_next;
+    }
+
+  done:
+    freeifaddrs(ifa);
+
+    return result;
+}
+#endif
 
 /*
  * Find an internet address for a given hostname.  Note that this
@@ -140,25 +280,13 @@
     const char *hostname;
     jobjectArray ret = 0;
     int retLen = 0;
-    jboolean preferIPv6Address;
 
     int error=0;
 #ifdef AF_INET6
     struct addrinfo hints, *res, *resNew = NULL;
 #endif /* AF_INET6 */
 
-    if (!initialized) {
-      ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
-      ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
-      ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
-      ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
-      ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address");
-      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;
-    }
+    initializeInetClasses(env);
 
     if (IS_NULL(host)) {
         JNU_ThrowNullPointerException(env, "host is null");
@@ -167,23 +295,20 @@
     hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
     CHECK_NULL_RETURN(hostname, NULL);
 
+#ifdef MACOSX
+    /*
+     * 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.
+     */
+    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;
@@ -303,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)) {
@@ -315,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/solaris/native/java/net/NetworkInterface.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -193,7 +192,6 @@
     ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
     ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
     ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "<init>", "()V");
-    ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
     ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;");
     ni_ib4broadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;");
     ni_ib4maskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S");
@@ -332,11 +330,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 +664,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/solaris/native/java/net/net_util_md.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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/windows/native/java/net/Inet4AddressImpl.c	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/windows/native/java/net/Inet4AddressImpl.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/windows/native/java/net/Inet6AddressImpl.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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)) {
@@ -133,7 +131,13 @@
 
     error = getaddrinfo(hostname, NULL, &hints, &res);
 
-    if (error) {
+    if (WSAGetLastError() == WSATRY_AGAIN) {
+        NET_ThrowByNameWithLastError(env,
+                                     JNU_JAVANETPKG "UnknownHostException",
+                                     hostname);
+        JNU_ReleaseStringPlatformChars(env, host, hostname);
+        return NULL;
+    } else if (error) {
         /* report error */
         JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException",
                         (char *)hostname);
@@ -242,26 +246,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/windows/native/java/net/NetworkInterface.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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() */
@@ -520,7 +518,6 @@
     ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address");
     ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls);
     ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
-    ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
 
     ni_ibcls = (*env)->FindClass(env, "java/net/InterfaceAddress");
     ni_ibcls = (*env)->NewGlobalRef(env, ni_ibcls);
@@ -621,19 +618,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/windows/native/java/net/NetworkInterface_winXP.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/windows/native/java/net/TwoStacksPlainSocketImpl.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/src/windows/native/java/net/net_util_md.c	Fri Oct 25 10:39:13 2013 -0700
@@ -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/test/Makefile	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/Makefile	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/ProblemList.txt	Fri Oct 25 10:39:13 2013 -0700
@@ -138,6 +138,9 @@
 java/lang/instrument/RetransformBigClass.sh                     generic-all
 java/lang/instrument/RedefineBigClass.sh                        generic-all
 
+# 8026502
+java/lang/invoke/MethodHandleConstants.java                     generic-all
+
 ############################################################################
 
 # jdk_management
@@ -322,18 +325,6 @@
 # 8007410
 tools/launcher/FXLauncherTest.java                              linux-all
 
-# 8025427
-sun/tools/jstat/jstatLineCounts1.sh                                 generic-all
-sun/tools/jstat/jstatLineCounts2.sh                                 generic-all
-sun/tools/jstat/jstatLineCounts3.sh                                 generic-all
-sun/tools/jstat/jstatTimeStamp1.sh                                  generic-all
-sun/tools/jstat/jstatGcCauseOutput1.sh                              generic-all
-sun/tools/jstat/jstatLineCounts4.sh                                 generic-all
-sun/tools/jstatd/jstatdDefaults.sh                                  generic-all
-sun/tools/jstatd/jstatdExternalRegistry.sh                          generic-all
-sun/tools/jstatd/jstatdPort.sh                                      generic-all
-sun/tools/jstatd/jstatdServerName.sh                                generic-all
-
 ############################################################################
 
 # jdk_jdi
--- a/test/TEST.groups	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/TEST.groups	Fri Oct 25 10:39:13 2013 -0700
@@ -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 \
@@ -358,8 +355,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 +526,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 +537,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 +548,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  \
--- a/test/com/oracle/security/ucrypto/TestAES.java	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug     7088989
- * @summary Ensure the AES ciphers of OracleUcrypto provider works correctly
- */
-import java.io.*;
-import java.security.*;
-import java.security.spec.*;
-import java.util.*;
-import javax.crypto.*;
-import javax.crypto.spec.*;
-
-public class TestAES extends UcryptoTest {
-
-    private static final String[] PADDEDCIPHER_ALGOS = {
-        "AES/ECB/PKCS5Padding",
-        "AES/CBC/PKCS5Padding",
-        "AES/CFB128/PKCS5Padding"
-    };
-
-    private static final String[] CIPHER_ALGOS = {
-        "AES/ECB/NoPadding",
-        "AES/CBC/NoPadding",
-        "AES/CFB128/NoPadding",
-        "AES/CTR/NoPadding",
-    };
-
-    private static final SecretKey CIPHER_KEY =
-        new SecretKeySpec(new byte[16], "AES");
-
-    public static void main(String[] args) throws Exception {
-        main(new TestAES(), null);
-    }
-
-    public void doTest(Provider prov) throws Exception {
-        // Provider for testing Interoperability
-        Provider sunJCEProv = Security.getProvider("SunJCE");
-
-        testCipherInterop(CIPHER_ALGOS, CIPHER_KEY, prov, sunJCEProv);
-        testCipherInterop(PADDEDCIPHER_ALGOS, CIPHER_KEY, prov, sunJCEProv);
-
-        testCipherOffset(CIPHER_ALGOS, CIPHER_KEY, prov);
-        testCipherOffset(PADDEDCIPHER_ALGOS, CIPHER_KEY, prov);
-
-        testCipherKeyWrapping(PADDEDCIPHER_ALGOS, CIPHER_KEY, prov, sunJCEProv);
-        testCipherGCM(CIPHER_KEY, prov);
-    }
-
-    private static void testCipherInterop(String[] algos, SecretKey key,
-                                          Provider p,
-                                          Provider interopP) {
-        boolean testPassed = true;
-        byte[] in = new byte[32];
-        (new SecureRandom()).nextBytes(in);
-
-        for (String algo : algos) {
-            try {
-                // check ENC
-                Cipher c;
-                try {
-                    c = Cipher.getInstance(algo, p);
-                } catch (NoSuchAlgorithmException nsae) {
-                    System.out.println("Skipping Unsupported CIP algo: " + algo);
-                    continue;
-                }
-                c.init(Cipher.ENCRYPT_MODE, key, (AlgorithmParameters)null, null);
-                byte[] eout = c.doFinal(in, 0, in.length);
-
-                AlgorithmParameters params = c.getParameters();
-                Cipher c2 = Cipher.getInstance(algo, interopP);
-                c2.init(Cipher.ENCRYPT_MODE, key, params, null);
-                byte[] eout2 = c2.doFinal(in, 0, in.length);
-
-                if (!Arrays.equals(eout, eout2)) {
-                    System.out.println(algo + ": DIFF FAILED");
-                    testPassed = false;
-                } else {
-                    System.out.println(algo + ": ENC Passed");
-                }
-
-                // check DEC
-                c.init(Cipher.DECRYPT_MODE, key, params, null);
-                byte[] dout = c.doFinal(eout);
-                c2.init(Cipher.DECRYPT_MODE, key, params, null);
-                byte[] dout2 = c2.doFinal(eout2);
-
-                if (!Arrays.equals(dout, dout2)) {
-                    System.out.println(algo + ": DIFF FAILED");
-                    testPassed = false;
-                } else {
-                    System.out.println(algo + ": DEC Passed");
-                }
-            } catch(Exception ex) {
-                System.out.println("Unexpected Exception: " + algo);
-                ex.printStackTrace();
-                testPassed = false;
-            }
-        }
-
-        if (!testPassed) {
-            throw new RuntimeException("One or more CIPHER test failed!");
-        } else {
-            System.out.println("CIPHER Interop Tests Passed");
-        }
-    }
-
-    private static void testCipherOffset(String[] algos, SecretKey key,
-                                         Provider p) {
-        boolean testPassed = true;
-        byte[] in = new byte[16];
-        (new SecureRandom()).nextBytes(in);
-        int blockSize = 16;
-
-        for (int j = 1; j < (in.length - 1); j++) {
-            System.out.println("Input offset size: " + j);
-            for (int i = 0; i < algos.length; i++) {
-                try {
-                    // check ENC
-                    Cipher c;
-                    try {
-                        c = Cipher.getInstance(algos[i], p);
-                    } catch (NoSuchAlgorithmException nsae) {
-                        System.out.println("Skip Unsupported CIP algo: " + algos[i]);
-                        continue;
-                    }
-                    c.init(Cipher.ENCRYPT_MODE, key, (AlgorithmParameters)null, null);
-                    byte[] eout = new byte[c.getOutputSize(in.length)];
-                    int firstPartLen = in.length - j - 1;
-                    //System.out.print("1st UPDATE: " + firstPartLen);
-                    int k = c.update(in, 0, firstPartLen, eout, 0);
-                    k += c.update(in, firstPartLen, 1, eout, k);
-                    k += c.doFinal(in, firstPartLen+1, j, eout, k);
-
-                    AlgorithmParameters params = c.getParameters();
-
-                    Cipher c2 = Cipher.getInstance(algos[i], p);
-                    c2.init(Cipher.ENCRYPT_MODE, key, params, null);
-                    byte[] eout2 = new byte[c2.getOutputSize(in.length)];
-                    int k2 = c2.update(in, 0, j, eout2, 0);
-                    k2 += c2.update(in, j, 1, eout2, k2);
-                    k2 += c2.doFinal(in, j+1, firstPartLen, eout2, k2);
-
-                    if (!checkArrays(eout, k, eout2, k2)) testPassed = false;
-
-                    // check DEC
-                    c.init(Cipher.DECRYPT_MODE, key, params, null);
-                    byte[] dout = new byte[c.getOutputSize(eout.length)];
-                    k = c.update(eout, 0, firstPartLen, dout, 0);
-                    k += c.update(eout, firstPartLen, 1, dout, k);
-                    k += c.doFinal(eout, firstPartLen+1, eout.length - firstPartLen - 1, dout, k);
-                    if (!checkArrays(in, in.length, dout, k)) testPassed = false;
-                } catch(Exception ex) {
-                    System.out.println("Unexpected Exception: " + algos[i]);
-                    ex.printStackTrace();
-                    testPassed = false;
-                }
-            }
-        }
-        if (!testPassed) {
-            throw new RuntimeException("One or more CIPHER test failed!");
-        } else {
-            System.out.println("CIPHER Offset Tests Passed");
-        }
-    }
-
-    private static void testCipherKeyWrapping(String[] algos, SecretKey key,
-                                              Provider p, Provider interopP)
-        throws NoSuchAlgorithmException {
-        boolean testPassed = true;
-
-        // Test SecretKey, PrivateKey and PublicKey
-        Key[] tbwKeys = new Key[3];
-        int[] tbwKeyTypes = { Cipher.SECRET_KEY, Cipher.PRIVATE_KEY, Cipher.PUBLIC_KEY };
-        tbwKeys[0] = new SecretKeySpec(new byte[20], "Blowfish");
-        KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
-        kpg.initialize(1024);
-        KeyPair kp = kpg.generateKeyPair();
-        tbwKeys[1] = kp.getPrivate();
-        tbwKeys[2] = kp.getPublic();
-
-        for (int i = 0; i < algos.length; i++) {
-            try {
-                System.out.println(algos[i] + " - Native WRAP/Java UNWRAP");
-
-                Cipher c1;
-                try {
-                    c1 = Cipher.getInstance(algos[i], p);
-                } catch (NoSuchAlgorithmException nsae) {
-                    System.out.println("Skipping Unsupported CIP algo: " + algos[i]);
-                    continue;
-                }
-                c1.init(Cipher.WRAP_MODE, key, (AlgorithmParameters)null, null);
-                AlgorithmParameters params = c1.getParameters();
-                Cipher c2 = Cipher.getInstance(algos[i], interopP);
-                c2.init(Cipher.UNWRAP_MODE, key, params, null);
-
-                for (int j = 0; j < tbwKeys.length ; j++) {
-                    byte[] wrappedKey = c1.wrap(tbwKeys[j]);
-                    Key recovered = c2.unwrap(wrappedKey,
-                                              tbwKeys[j].getAlgorithm(), tbwKeyTypes[j]);
-                    if (!checkKeys(tbwKeys[j], recovered)) testPassed = false;
-                }
-
-                System.out.println(algos[i] + " - Java WRAP/Native UNWRAP");
-                c1 = Cipher.getInstance(algos[i], interopP);
-                c1.init(Cipher.WRAP_MODE, key, (AlgorithmParameters)null, null);
-                params = c1.getParameters();
-                c2 = Cipher.getInstance(algos[i], p);
-                c2.init(Cipher.UNWRAP_MODE, key, params, null);
-
-                for (int j = 0; j < tbwKeys.length ; j++) {
-                    byte[] wrappedKey = c1.wrap(tbwKeys[j]);
-                    Key recovered = c2.unwrap(wrappedKey,
-                                              tbwKeys[j].getAlgorithm(), tbwKeyTypes[j]);
-                    if (!checkKeys(tbwKeys[j], recovered)) testPassed = false;
-                }
-
-            } catch(Exception ex) {
-                System.out.println("Unexpected Exception: " + algos[i]);
-                ex.printStackTrace();
-                testPassed = false;
-            }
-        }
-        if (!testPassed) {
-            throw new RuntimeException("One or more CIPHER test failed!");
-        } else {
-            System.out.println("CIPHER KeyWrapping Tests Passed");
-        }
-    }
-
-
-    private static void testCipherGCM(SecretKey key,
-                                      Provider p) {
-        boolean testPassed = true;
-        byte[] in = new byte[16];
-        (new SecureRandom()).nextBytes(in);
-
-        byte[] iv = new byte[16];
-        (new SecureRandom()).nextBytes(iv);
-
-
-        String algo = "AES/GCM/NoPadding";
-        int tagLen[] = { 128, 120, 112, 104, 96, 64, 32 };
-
-        try {
-            Cipher c;
-            try {
-                c = Cipher.getInstance(algo, p);
-            } catch (NoSuchAlgorithmException nsae) {
-                System.out.println("Skipping Unsupported CIP algo: " + algo);
-                return;
-            }
-            for (int i = 0; i < tagLen.length; i++) {
-                AlgorithmParameterSpec paramSpec = new GCMParameterSpec(tagLen[i], iv);
-                // check ENC
-                c.init(Cipher.ENCRYPT_MODE, key, paramSpec, null);
-                c.updateAAD(iv);
-                byte[] eout = c.doFinal(in, 0, in.length);
-
-                AlgorithmParameters param = c.getParameters();
-                // check DEC
-                c.init(Cipher.DECRYPT_MODE, key, param, null);
-                c.updateAAD(iv);
-                byte[] dout = c.doFinal(eout, 0, eout.length);
-
-                if (!Arrays.equals(dout, in)) {
-                    System.out.println(algo + ": PT and RT DIFF FAILED");
-                    testPassed = false;
-                } else {
-                    System.out.println(algo + ": tagLen " + tagLen[i] + " done");
-                }
-            }
-        } catch(Exception ex) {
-            System.out.println("Unexpected Exception: " + algo);
-            ex.printStackTrace();
-            testPassed = false;
-        }
-        if (!testPassed) {
-            throw new RuntimeException("One or more CIPHER test failed!");
-        } else {
-            System.out.println("CIPHER GCM Tests Passed");
-        }
-    }
-
-    private static boolean checkArrays(byte[] a1, int a1Len, byte[] a2, int a2Len) {
-        boolean equal = true;
-        if (a1Len != a2Len) {
-            System.out.println("DIFFERENT OUT LENGTH");
-            equal = false;
-        } else {
-            for (int p = 0; p < a1Len; p++) {
-                if (a1[p] != a2[p]) {
-                    System.out.println("DIFF FAILED");
-                    equal = false;
-                    break;
-                }
-            }
-        }
-        return equal;
-    }
-
-    private static boolean checkKeys(Key k1, Key k2) {
-        boolean equal = true;
-        if (!k1.getAlgorithm().equalsIgnoreCase(k2.getAlgorithm())) {
-            System.out.println("DIFFERENT Key Algorithm");
-            equal = false;
-        } else if (!k1.getFormat().equalsIgnoreCase(k2.getFormat())) {
-            System.out.println("DIFFERENT Key Format");
-            equal = false;
-        } else if (!Arrays.equals(k1.getEncoded(), k2.getEncoded())) {
-            System.out.println("DIFFERENT Key Encoding");
-            equal = false;
-        }
-        return equal;
-    }
-}
--- a/test/com/oracle/security/ucrypto/TestDigest.java	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug     7088989
- * @summary Ensure the various message digests works correctly
- */
-import java.io.*;
-import java.security.*;
-import java.security.spec.*;
-import java.util.*;
-import javax.crypto.*;
-import javax.crypto.spec.*;
-
-public class TestDigest extends UcryptoTest {
-
-    private static final String[] MD_ALGOS = {
-        "MD5",
-        "SHA",
-        "SHA-256",
-        "SHA-384",
-        "SHA-512"
-    };
-
-    public static void main(String[] args) throws Exception {
-        main(new TestDigest(), null);
-    }
-
-    public void doTest(Provider p) {
-        boolean testPassed = true;
-        byte[] msg = new byte[200];
-        (new SecureRandom()).nextBytes(msg);
-        String interopProvName = "SUN";
-
-        for (String a : MD_ALGOS) {
-            try {
-                MessageDigest md, md2;
-                try {
-                    md = MessageDigest.getInstance(a, p);
-                } catch (NoSuchAlgorithmException nsae) {
-                    System.out.println("Skipping Unsupported MD algo: " + a);
-                    continue;
-                }
-                md2 = MessageDigest.getInstance(a, interopProvName);
-                // Test Interoperability for update+digest calls
-                for (int i = 0; i < 3; i++) {
-                    md.update(msg);
-                    byte[] digest = md.digest();
-                    md2.update(msg);
-                    byte[] digest2 = md2.digest();
-                    if (!Arrays.equals(digest, digest2)) {
-                        System.out.println("DIFF1 FAILED for: " + a + " at iter " + i);
-                        testPassed = false;
-                    }
-                }
-
-                // Test Interoperability for digest calls
-                md = MessageDigest.getInstance(a, p);
-                md2 = MessageDigest.getInstance(a, interopProvName);
-
-                for (int i = 0; i < 3; i++) {
-                    byte[] digest = md.digest();
-                    byte[] digest2 = md2.digest();
-                    if (!Arrays.equals(digest, digest2)) {
-                        System.out.println("DIFF2 FAILED for: " + a + " at iter " + i);
-                        testPassed = false;
-                    }
-                }
-
-                // Test Cloning functionality
-                md = MessageDigest.getInstance(a, p);
-                md2 = (MessageDigest) md.clone(); // clone right after construction
-                byte[] digest = md.digest();
-                byte[] digest2 = md2.digest();
-                if (!Arrays.equals(digest, digest2)) {
-                    System.out.println("DIFF-3.1 FAILED for: " + a);
-                    testPassed = false;
-                }
-                md.update(msg);
-                md2 = (MessageDigest) md.clone(); // clone again after update call
-                digest = md.digest();
-                digest2 = md2.digest();
-                if (!Arrays.equals(digest, digest2)) {
-                    System.out.println("DIFF-3.2 FAILED for: " + a);
-                    testPassed = false;
-                }
-                md2 = (MessageDigest) md.clone(); // clone after digest
-                digest = md.digest();
-                digest2 = md2.digest();
-                if (!Arrays.equals(digest, digest2)) {
-                    System.out.println("DIFF-3.3 FAILED for: " + a);
-                    testPassed = false;
-                }
-            } catch(Exception ex) {
-                System.out.println("Unexpected Exception: " + a);
-                ex.printStackTrace();
-                testPassed = false;
-            }
-        }
-        if (!testPassed) {
-            throw new RuntimeException("One or more MD test failed!");
-        } else {
-            System.out.println("MD Tests Passed");
-        }
-    }
-}
--- a/test/com/oracle/security/ucrypto/TestRSA.java	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,421 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug     7088989
- * @summary Ensure the RSA ciphers and signatures works correctly
- */
-import java.io.*;
-import java.security.*;
-import java.security.spec.*;
-import java.util.*;
-import java.math.*;
-import javax.crypto.*;
-
-public class TestRSA extends UcryptoTest {
-
-    // KAT
-    private static final byte PLAINTEXT[] = Arrays.copyOf
-        (new String("Known plaintext message utilized" +
-                    "for RSA Encryption &  Decryption" +
-                    "block, SHA1, SHA256, SHA384  and" +
-                    "SHA512 RSA Signature KAT tests.").getBytes(), 128);
-
-    private static final byte MOD[] = {
-        (byte)0xd5, (byte)0x84, (byte)0x95, (byte)0x07, (byte)0xf4, (byte)0xd0,
-        (byte)0x1f, (byte)0x82, (byte)0xf3, (byte)0x79, (byte)0xf4, (byte)0x99,
-        (byte)0x48, (byte)0x10, (byte)0xe1, (byte)0x71, (byte)0xa5, (byte)0x62,
-        (byte)0x22, (byte)0xa3, (byte)0x4b, (byte)0x00, (byte)0xe3, (byte)0x5b,
-        (byte)0x3a, (byte)0xcc, (byte)0x10, (byte)0x83, (byte)0xe0, (byte)0xaf,
-        (byte)0x61, (byte)0x13, (byte)0x54, (byte)0x6a, (byte)0xa2, (byte)0x6a,
-        (byte)0x2c, (byte)0x5e, (byte)0xb3, (byte)0xcc, (byte)0xa3, (byte)0x71,
-        (byte)0x9a, (byte)0xb2, (byte)0x3e, (byte)0x78, (byte)0xec, (byte)0xb5,
-        (byte)0x0e, (byte)0x6e, (byte)0x31, (byte)0x3b, (byte)0x77, (byte)0x1f,
-        (byte)0x6e, (byte)0x94, (byte)0x41, (byte)0x60, (byte)0xd5, (byte)0x6e,
-        (byte)0xd9, (byte)0xc6, (byte)0xf9, (byte)0x29, (byte)0xc3, (byte)0x40,
-        (byte)0x36, (byte)0x25, (byte)0xdb, (byte)0xea, (byte)0x0b, (byte)0x07,
-        (byte)0xae, (byte)0x76, (byte)0xfd, (byte)0x99, (byte)0x29, (byte)0xf4,
-        (byte)0x22, (byte)0xc1, (byte)0x1a, (byte)0x8f, (byte)0x05, (byte)0xfe,
-        (byte)0x98, (byte)0x09, (byte)0x07, (byte)0x05, (byte)0xc2, (byte)0x0f,
-        (byte)0x0b, (byte)0x11, (byte)0x83, (byte)0x39, (byte)0xca, (byte)0xc7,
-        (byte)0x43, (byte)0x63, (byte)0xff, (byte)0x33, (byte)0x80, (byte)0xe7,
-        (byte)0xc3, (byte)0x78, (byte)0xae, (byte)0xf1, (byte)0x73, (byte)0x52,
-        (byte)0x98, (byte)0x1d, (byte)0xde, (byte)0x5c, (byte)0x53, (byte)0x6e,
-        (byte)0x01, (byte)0x73, (byte)0x0d, (byte)0x12, (byte)0x7e, (byte)0x77,
-        (byte)0x03, (byte)0xf1, (byte)0xef, (byte)0x1b, (byte)0xc8, (byte)0xa8,
-        (byte)0x0f, (byte)0x97
-    };
-
-    private static final byte PUB_EXP[] = {(byte)0x01, (byte)0x00, (byte)0x01};
-
-    private static final byte PRIV_EXP[] = {
-        (byte)0x85, (byte)0x27, (byte)0x47, (byte)0x61, (byte)0x4c, (byte)0xd4,
-        (byte)0xb5, (byte)0xb2, (byte)0x0e, (byte)0x70, (byte)0x91, (byte)0x8f,
-        (byte)0x3d, (byte)0x97, (byte)0xf9, (byte)0x5f, (byte)0xcc, (byte)0x09,
-        (byte)0x65, (byte)0x1c, (byte)0x7c, (byte)0x5b, (byte)0xb3, (byte)0x6d,
-        (byte)0x63, (byte)0x3f, (byte)0x7b, (byte)0x55, (byte)0x22, (byte)0xbb,
-        (byte)0x7c, (byte)0x48, (byte)0x77, (byte)0xae, (byte)0x80, (byte)0x56,
-        (byte)0xc2, (byte)0x10, (byte)0xd5, (byte)0x03, (byte)0xdb, (byte)0x31,
-        (byte)0xaf, (byte)0x8d, (byte)0x54, (byte)0xd4, (byte)0x48, (byte)0x99,
-        (byte)0xa8, (byte)0xc4, (byte)0x23, (byte)0x43, (byte)0xb8, (byte)0x48,
-        (byte)0x0b, (byte)0xc7, (byte)0xbc, (byte)0xf5, (byte)0xcc, (byte)0x64,
-        (byte)0x72, (byte)0xbf, (byte)0x59, (byte)0x06, (byte)0x04, (byte)0x1c,
-        (byte)0x32, (byte)0xf5, (byte)0x14, (byte)0x2e, (byte)0x6e, (byte)0xe2,
-        (byte)0x0f, (byte)0x5c, (byte)0xde, (byte)0x36, (byte)0x3c, (byte)0x6e,
-        (byte)0x7c, (byte)0x4d, (byte)0xcc, (byte)0xd3, (byte)0x00, (byte)0x6e,
-        (byte)0xe5, (byte)0x45, (byte)0x46, (byte)0xef, (byte)0x4d, (byte)0x25,
-        (byte)0x46, (byte)0x6d, (byte)0x7f, (byte)0xed, (byte)0xbb, (byte)0x4f,
-        (byte)0x4d, (byte)0x9f, (byte)0xda, (byte)0x87, (byte)0x47, (byte)0x8f,
-        (byte)0x74, (byte)0x44, (byte)0xb7, (byte)0xbe, (byte)0x9d, (byte)0xf5,
-        (byte)0xdd, (byte)0xd2, (byte)0x4c, (byte)0xa5, (byte)0xab, (byte)0x74,
-        (byte)0xe5, (byte)0x29, (byte)0xa1, (byte)0xd2, (byte)0x45, (byte)0x3b,
-        (byte)0x33, (byte)0xde, (byte)0xd5, (byte)0xae, (byte)0xf7, (byte)0x03,
-        (byte)0x10, (byte)0x21
-    };
-
-    private static final byte PRIME_P[] = {
-        (byte)0xf9, (byte)0x74, (byte)0x8f, (byte)0x16, (byte)0x02, (byte)0x6b,
-        (byte)0xa0, (byte)0xee, (byte)0x7f, (byte)0x28, (byte)0x97, (byte)0x91,
-        (byte)0xdc, (byte)0xec, (byte)0xc0, (byte)0x7c, (byte)0x49, (byte)0xc2,
-        (byte)0x85, (byte)0x76, (byte)0xee, (byte)0x66, (byte)0x74, (byte)0x2d,
-        (byte)0x1a, (byte)0xb8, (byte)0xf7, (byte)0x2f, (byte)0x11, (byte)0x5b,
-        (byte)0x36, (byte)0xd8, (byte)0x46, (byte)0x33, (byte)0x3b, (byte)0xd8,
-        (byte)0xf3, (byte)0x2d, (byte)0xa1, (byte)0x03, (byte)0x83, (byte)0x2b,
-        (byte)0xec, (byte)0x35, (byte)0x43, (byte)0x32, (byte)0xff, (byte)0xdd,
-        (byte)0x81, (byte)0x7c, (byte)0xfd, (byte)0x65, (byte)0x13, (byte)0x04,
-        (byte)0x7c, (byte)0xfc, (byte)0x03, (byte)0x97, (byte)0xf0, (byte)0xd5,
-        (byte)0x62, (byte)0xdc, (byte)0x0d, (byte)0xbf
-    };
-
-    private static final byte PRIME_Q[] = {
-        (byte)0xdb, (byte)0x1e, (byte)0xa7, (byte)0x3d, (byte)0xe7, (byte)0xfa,
-        (byte)0x8b, (byte)0x04, (byte)0x83, (byte)0x48, (byte)0xf3, (byte)0xa5,
-        (byte)0x31, (byte)0x9d, (byte)0x35, (byte)0x5e, (byte)0x4d, (byte)0x54,
-        (byte)0x77, (byte)0xcc, (byte)0x84, (byte)0x09, (byte)0xf3, (byte)0x11,
-        (byte)0x0d, (byte)0x54, (byte)0xed, (byte)0x85, (byte)0x39, (byte)0xa9,
-        (byte)0xca, (byte)0xa8, (byte)0xea, (byte)0xae, (byte)0x19, (byte)0x9c,
-        (byte)0x75, (byte)0xdb, (byte)0x88, (byte)0xb8, (byte)0x04, (byte)0x8d,
-        (byte)0x54, (byte)0xc6, (byte)0xa4, (byte)0x80, (byte)0xf8, (byte)0x93,
-        (byte)0xf0, (byte)0xdb, (byte)0x19, (byte)0xef, (byte)0xd7, (byte)0x87,
-        (byte)0x8a, (byte)0x8f, (byte)0x5a, (byte)0x09, (byte)0x2e, (byte)0x54,
-        (byte)0xf3, (byte)0x45, (byte)0x24, (byte)0x29
-    };
-
-    private static final byte EXP_P[] = {
-        (byte)0x6a, (byte)0xd1, (byte)0x25, (byte)0x80, (byte)0x18, (byte)0x33,
-        (byte)0x3c, (byte)0x2b, (byte)0x44, (byte)0x19, (byte)0xfe, (byte)0xa5,
-        (byte)0x40, (byte)0x03, (byte)0xc4, (byte)0xfc, (byte)0xb3, (byte)0x9c,
-        (byte)0xef, (byte)0x07, (byte)0x99, (byte)0x58, (byte)0x17, (byte)0xc1,
-        (byte)0x44, (byte)0xa3, (byte)0x15, (byte)0x7d, (byte)0x7b, (byte)0x22,
-        (byte)0x22, (byte)0xdf, (byte)0x03, (byte)0x58, (byte)0x66, (byte)0xf5,
-        (byte)0x24, (byte)0x54, (byte)0x52, (byte)0x91, (byte)0x2d, (byte)0x76,
-        (byte)0xfe, (byte)0x63, (byte)0x64, (byte)0x4e, (byte)0x0f, (byte)0x50,
-        (byte)0x2b, (byte)0x65, (byte)0x79, (byte)0x1f, (byte)0xf1, (byte)0xbf,
-        (byte)0xc7, (byte)0x41, (byte)0x26, (byte)0xcc, (byte)0xc6, (byte)0x1c,
-        (byte)0xa9, (byte)0x83, (byte)0x6f, (byte)0x03
-    };
-
-    private static final byte EXP_Q[] = {
-        (byte)0x12, (byte)0x84, (byte)0x1a, (byte)0x99, (byte)0xce, (byte)0x9a,
-        (byte)0x8b, (byte)0x58, (byte)0xcc, (byte)0x47, (byte)0x43, (byte)0xdf,
-        (byte)0x77, (byte)0xbb, (byte)0xd3, (byte)0x20, (byte)0xae, (byte)0xe4,
-        (byte)0x2e, (byte)0x63, (byte)0x67, (byte)0xdc, (byte)0xf7, (byte)0x5f,
-        (byte)0x3f, (byte)0x83, (byte)0x27, (byte)0xb7, (byte)0x14, (byte)0x52,
-        (byte)0x56, (byte)0xbf, (byte)0xc3, (byte)0x65, (byte)0x06, (byte)0xe1,
-        (byte)0x03, (byte)0xcc, (byte)0x93, (byte)0x57, (byte)0x09, (byte)0x7b,
-        (byte)0x6f, (byte)0xe8, (byte)0x81, (byte)0x4a, (byte)0x2c, (byte)0xb7,
-        (byte)0x43, (byte)0xa9, (byte)0x20, (byte)0x1d, (byte)0xf6, (byte)0x56,
-        (byte)0x8b, (byte)0xcc, (byte)0xe5, (byte)0x4c, (byte)0xd5, (byte)0x4f,
-        (byte)0x74, (byte)0x67, (byte)0x29, (byte)0x51
-    };
-
-    private static final byte CRT_COEFF[] = {
-        (byte)0x23, (byte)0xab, (byte)0xf4, (byte)0x03, (byte)0x2f, (byte)0x29,
-        (byte)0x95, (byte)0x74, (byte)0xac, (byte)0x1a, (byte)0x33, (byte)0x96,
-        (byte)0x62, (byte)0xed, (byte)0xf7, (byte)0xf6, (byte)0xae, (byte)0x07,
-        (byte)0x2a, (byte)0x2e, (byte)0xe8, (byte)0xab, (byte)0xfb, (byte)0x1e,
-        (byte)0xb9, (byte)0xb2, (byte)0x88, (byte)0x1e, (byte)0x85, (byte)0x05,
-        (byte)0x42, (byte)0x64, (byte)0x03, (byte)0xb2, (byte)0x8b, (byte)0xc1,
-        (byte)0x81, (byte)0x75, (byte)0xd7, (byte)0xba, (byte)0xaa, (byte)0xd4,
-        (byte)0x31, (byte)0x3c, (byte)0x8a, (byte)0x96, (byte)0x23, (byte)0x9d,
-        (byte)0x3f, (byte)0x06, (byte)0x3e, (byte)0x44, (byte)0xa9, (byte)0x62,
-        (byte)0x2f, (byte)0x61, (byte)0x5a, (byte)0x51, (byte)0x82, (byte)0x2c,
-        (byte)0x04, (byte)0x85, (byte)0x73, (byte)0xd1
-    };
-
-    private static KeyPair genRSAKey(int keyLength) throws Exception {
-        KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
-        kpg.initialize(keyLength);
-        return kpg.generateKeyPair();
-    }
-
-    private static KeyPair genPredefinedRSAKeyPair() throws Exception {
-        KeyFactory kf = KeyFactory.getInstance("RSA");
-        BigInteger mod = new BigInteger(MOD);
-        BigInteger pub = new BigInteger(PUB_EXP);
-
-        PrivateKey privKey = kf.generatePrivate
-            (new RSAPrivateCrtKeySpec
-             (mod, pub, new BigInteger(PRIV_EXP),
-              new BigInteger(PRIME_P), new BigInteger(PRIME_Q),
-              new BigInteger(EXP_P), new BigInteger(EXP_Q),
-              new BigInteger(CRT_COEFF)));
-        PublicKey pubKey = kf.generatePublic(new RSAPublicKeySpec(mod, pub));
-        return new KeyPair(pubKey, privKey);
-    }
-
-    private static final String CIP_ALGOS[] = {
-        "RSA/ECB/NoPadding",
-        "RSA/ECB/PKCS1Padding"
-    };
-    private static final int INPUT_SIZE_REDUCTION[] = {
-        0,
-        11,
-    };
-    private static final String SIG_ALGOS[] = {
-        "MD5WithRSA",
-        "SHA1WithRSA",
-        "SHA256WithRSA",
-        "SHA384WithRSA",
-        "SHA512WithRSA"
-    };
-
-    private static KeyPair kp[] = null;
-
-    public static void main(String argv[]) throws Exception {
-        main(new TestRSA(), null);
-    }
-
-    public void doTest(Provider prov) throws Exception {
-        // first test w/ predefine KeyPair
-        KeyPair pkp = genPredefinedRSAKeyPair();
-        System.out.println("Test against Predefined RSA Key Pair");
-        testCipher(pkp, 128, true, prov);
-        testSignature(pkp, true, prov);
-
-        for (int i = 0; i < 10; i++) {
-            // then test w/ various key lengths
-            int keyLens[] = { 1024, 2048 };
-            kp = new KeyPair[keyLens.length];
-
-            testCipher(keyLens, false, prov);
-            testSignature(keyLens, false, prov);
-        }
-    }
-
-
-    private static void testCipher(KeyPair kp, int inputSizeInBytes,
-                                   boolean checkInterop, Provider prov)
-        throws Exception {
-        Cipher c1, c2;
-        for (int i = 0; i < CIP_ALGOS.length; i++) {
-            String algo = CIP_ALGOS[i];
-            try {
-                c1 = Cipher.getInstance(algo, prov);
-            } catch (NoSuchAlgorithmException nsae) {
-                System.out.println("Skip unsupported Cipher algo: " + algo);
-                continue;
-            }
-
-            if (checkInterop) {
-                c2 = Cipher.getInstance(algo, "SunJCE");
-            } else {
-                c2 = Cipher.getInstance(algo, prov);
-            }
-            byte[] data = Arrays.copyOf
-                 (PLAINTEXT, inputSizeInBytes - INPUT_SIZE_REDUCTION[i]);
-
-            testEncryption(c1, c2, kp, data);
-        }
-    }
-
-    private static void testCipher(int keyLens[], boolean checkInterop,
-                                   Provider prov)
-        throws Exception {
-        // RSA CipherText will always differ due to the random nonce in padding
-        // so we check whether both
-        // 1) Java Encrypt/C Decrypt
-        // 2) C Encrypt/Java Decrypt
-        // works
-        Cipher c1, c2;
-        for (int i = 0; i < CIP_ALGOS.length; i++) {
-            String algo = CIP_ALGOS[i];
-            try {
-                c1 = Cipher.getInstance(algo, prov);
-            } catch (NoSuchAlgorithmException nsae) {
-                System.out.println("Skip unsupported Cipher algo: " + algo);
-                continue;
-            }
-
-            if (checkInterop) {
-                c2 = Cipher.getInstance(algo, "SunJCE");
-            } else {
-                c2 = Cipher.getInstance(algo, prov);
-            }
-
-            for (int h = 0; h < keyLens.length; h++) {
-                // Defer key pair generation until now when it'll soon be used.
-                if (kp[h] == null) {
-                    kp[h] = genRSAKey(keyLens[h]);
-                }
-                System.out.println("\tTesting Cipher " + algo + " w/ KeySize " + keyLens[h]);
-                byte[] data = Arrays.copyOf
-                    (PLAINTEXT, keyLens[h]/8 - INPUT_SIZE_REDUCTION[i]);
-                testEncryption(c1, c2, kp[h], data);
-            }
-        }
-    }
-
-    private static void testEncryption(Cipher c1, Cipher c2, KeyPair kp, byte[] data)
-        throws Exception {
-        // C1 Encrypt + C2 Decrypt
-        byte[] out1 = null;
-        byte[] recoveredText = null;
-        try {
-            c1.init(Cipher.ENCRYPT_MODE, kp.getPublic());
-            out1 = c1.doFinal(data);
-            c2.init(Cipher.DECRYPT_MODE, kp.getPrivate());
-            recoveredText = c2.doFinal(out1);
-        } catch (Exception ex) {
-            System.out.println("\tDEC ERROR: unexpected exception");
-            ex.printStackTrace();
-            throw ex;
-        }
-        if(!Arrays.equals(recoveredText, data)) {
-            throw new RuntimeException("\tDEC ERROR: different PT bytes!");
-        }
-        // C2 Encrypt + C1 Decrypt
-        byte[] cipherText = null;
-        try {
-            c2.init(Cipher.ENCRYPT_MODE, kp.getPublic());
-            cipherText = c2.doFinal(data);
-            c1.init(Cipher.DECRYPT_MODE, kp.getPrivate());
-            try {
-                out1 = c1.doFinal(cipherText);
-            } catch (Exception ex) {
-                System.out.println("\tENC ERROR: invalid encrypted output");
-                ex.printStackTrace();
-                throw ex;
-            }
-        } catch (Exception ex) {
-            System.out.println("\tENC ERROR: unexpected exception");
-            ex.printStackTrace();
-            throw ex;
-        }
-        if (!Arrays.equals(out1, data)) {
-            throw new RuntimeException("\tENC ERROR: Decrypted result DIFF!");
-        }
-        System.out.println("\t=> PASS");
-    }
-
-    private static void testSignature(KeyPair kp, boolean checkInterop,
-                                      Provider prov) throws Exception {
-        byte[] data = PLAINTEXT;
-        Signature sig1, sig2;
-        for (int i = 0; i < SIG_ALGOS.length; i++) {
-            String algo = SIG_ALGOS[i];
-            try {
-                sig1 = Signature.getInstance(algo, prov);
-            } catch (NoSuchAlgorithmException nsae) {
-                System.out.println("Skip unsupported Signature algo: " + algo);
-                continue;
-            }
-
-            if (checkInterop) {
-                sig2 = Signature.getInstance(algo, "SunRsaSign");
-            } else {
-                sig2 = Signature.getInstance(algo, prov);
-            }
-            testSigning(sig1, sig2, kp, data);
-        }
-    }
-
-    private static void testSignature(int keyLens[], boolean checkInterop,
-                                      Provider prov) throws Exception {
-        byte[] data = PLAINTEXT;
-        Signature sig1, sig2;
-        for (int i = 0; i < SIG_ALGOS.length; i++) {
-            String algo = SIG_ALGOS[i];
-            try {
-                sig1 = Signature.getInstance(algo, prov);
-            } catch (NoSuchAlgorithmException nsae) {
-                System.out.println("Skip unsupported Signature algo: " + algo);
-                continue;
-            }
-
-            if (checkInterop) {
-                sig2 = Signature.getInstance(algo, "SunRsaSign");
-            } else {
-                sig2 = Signature.getInstance(algo, prov);
-            }
-
-            for (int h = 0; h < keyLens.length; h++) {
-                // Defer key pair generation until now when it'll soon be used.
-                if (kp[h] == null) {
-                    kp[h] = genRSAKey(keyLens[h]);
-                }
-                System.out.println("\tTesting Signature " + algo + " w/ KeySize " + keyLens[h]);
-
-                testSigning(sig1, sig2, kp[h], data);
-            }
-        }
-    }
-
-    private static void testSigning(Signature sig1, Signature sig2, KeyPair kp, byte[] data)
-            throws Exception {
-        boolean sameSig = false;
-        byte[] out = null;
-        try {
-            sig1.initSign(kp.getPrivate());
-            sig1.update(data);
-            out = sig1.sign();
-        } catch (Exception ex) {
-            System.out.println("\tSIGN ERROR: unexpected exception!");
-            ex.printStackTrace();
-        }
-
-        sig2.initSign(kp.getPrivate());
-        sig2.update(data);
-        byte[] out2 = sig2.sign();
-        if (!Arrays.equals(out2, out)) {
-            throw new RuntimeException("\tSIGN ERROR: Signature DIFF!");
-        }
-
-        boolean verify = false;
-        try {
-            System.out.println("\tVERIFY1 using native out");
-            sig1.initVerify(kp.getPublic());
-            sig1.update(data);
-            verify = sig1.verify(out);
-            if (!verify) {
-                throw new RuntimeException("VERIFY1 FAIL!");
-            }
-        } catch (Exception ex) {
-            System.out.println("\tVERIFY1 ERROR: unexpected exception!");
-            ex.printStackTrace();
-            throw ex;
-        }
-        System.out.println("\t=> PASS");
-    }
-}
--- a/test/com/oracle/security/ucrypto/UcryptoTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-// common infrastructure for OracleUcrypto provider tests
-
-import java.io.*;
-import java.util.*;
-import java.lang.reflect.*;
-
-import java.security.*;
-
-public abstract class UcryptoTest {
-
-    protected static final boolean hasUcrypto;
-    static {
-        hasUcrypto = (Security.getProvider("OracleUcrypto") != null);
-    }
-
-    private static Provider getCustomizedUcrypto(String config) throws Exception {
-        Class clazz = Class.forName("com.oracle.security.ucrypto.OracleUcrypto");
-        Constructor cons = clazz.getConstructor(new Class[] {String.class});
-        Object obj = cons.newInstance(new Object[] {config});
-        return (Provider)obj;
-    }
-
-    public abstract void doTest(Provider p) throws Exception;
-
-    public static void main(UcryptoTest test, String config) throws Exception {
-        Provider prov = null;
-        if (hasUcrypto) {
-            if (config != null) {
-                prov = getCustomizedUcrypto(config);
-            } else {
-                prov = Security.getProvider("OracleUcrypto");
-            }
-        }
-        if (prov == null) {
-            // un-available, skip testing...
-            System.out.println("No OracleUcrypto provider found, skipping test");
-            return;
-        }
-        test.doTest(prov);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,105 @@
+/*
+ * 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
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8012900
+ * @library ../UTIL
+ * @build TestUtil
+ * @run main TestCICOWithGCMAndAAD
+ * @summary Test CipherInputStream/OutputStream with AES GCM mode with AAD.
+ * @author Valerie Peng
+ */
+import java.io.*;
+import java.security.*;
+import java.util.*;
+import javax.crypto.*;
+
+public class TestCICOWithGCMAndAAD {
+    public static void main(String[] args) throws Exception {
+        //init Secret Key
+        KeyGenerator kg = KeyGenerator.getInstance("AES", "SunJCE");
+        kg.init(128);
+        SecretKey key = kg.generateKey();
+
+        //Do initialization of the plainText
+        byte[] plainText = new byte[700];
+        Random rdm = new Random();
+        rdm.nextBytes(plainText);
+
+        byte[] aad = new byte[128];
+        rdm.nextBytes(aad);
+        byte[] aad2 = aad.clone();
+        aad2[50]++;
+
+        Cipher encCipher = Cipher.getInstance("AES/GCM/NoPadding", "SunJCE");
+        encCipher.init(Cipher.ENCRYPT_MODE, key);
+        encCipher.updateAAD(aad);
+        Cipher decCipher = Cipher.getInstance("AES/GCM/NoPadding", "SunJCE");
+        decCipher.init(Cipher.DECRYPT_MODE, key, encCipher.getParameters());
+        decCipher.updateAAD(aad);
+
+        byte[] recovered = test(encCipher, decCipher, plainText);
+        if (!Arrays.equals(plainText, recovered)) {
+            throw new Exception("sameAAD: diff check failed!");
+        } else System.out.println("sameAAD: passed");
+
+        encCipher.init(Cipher.ENCRYPT_MODE, key);
+        encCipher.updateAAD(aad2);
+        recovered = test(encCipher, decCipher, plainText);
+        if (recovered != null && recovered.length != 0) {
+            throw new Exception("diffAAD: no data should be returned!");
+        } else System.out.println("diffAAD: passed");
+   }
+
+   private static byte[] test(Cipher encCipher, Cipher decCipher, byte[] plainText)
+            throws Exception {
+        //init cipher streams
+        ByteArrayInputStream baInput = new ByteArrayInputStream(plainText);
+        CipherInputStream ciInput = new CipherInputStream(baInput, encCipher);
+        ByteArrayOutputStream baOutput = new ByteArrayOutputStream();
+        CipherOutputStream ciOutput = new CipherOutputStream(baOutput, decCipher);
+
+        //do test
+        byte[] buffer = new byte[200];
+        int len = ciInput.read(buffer);
+        System.out.println("read " + len + " bytes from input buffer");
+
+        while (len != -1) {
+            ciOutput.write(buffer, 0, len);
+            System.out.println("wite " + len + " bytes to output buffer");
+            len = ciInput.read(buffer);
+            if (len != -1) {
+                System.out.println("read " + len + " bytes from input buffer");
+            } else {
+                System.out.println("finished reading");
+            }
+        }
+
+        ciOutput.flush();
+        ciInput.close();
+        ciOutput.close();
+
+        return baOutput.toByteArray();
+    }
+}
--- a/test/com/sun/jdi/NoLaunchOptionTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/com/sun/jdi/NoLaunchOptionTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -142,7 +142,7 @@
         NoLaunchOptionTest myTest = new NoLaunchOptionTest();
         String results [] = myTest.run(VMConnection.insertDebuggeeVMOptions(cmds));
         if ((results[RETSTAT].equals("1")) &&
-            (results[STDERR].startsWith("ERROR:"))) {
+            (results[STDERR].contains("ERROR:"))) {
             System.out.println("Test passed: status = 1 with warning messages " +
                                "is expected and normal for this test");
         } else {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/Class/forName/arrayClass/Class1.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.
+ */
+
+public class Class1 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/Class/forName/arrayClass/Class2.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.
+ */
+
+public class Class2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/Class/forName/arrayClass/Class3.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.
+ */
+
+public class Class3 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/Class/forName/arrayClass/Class4.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.
+ */
+
+public class Class4 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/Class/forName/arrayClass/ExceedMaxDim.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,129 @@
+/*
+ * 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 7044282
+ * @build Class1 Class2 Class3 Class4
+ * @run main ExceedMaxDim
+ * @summary Make sure you can't get an array class of dimension > 255.
+ */
+
+// Class1, Class2, Class3 and Class4 should not have been loaded prior to the
+// calls to forName
+
+public class ExceedMaxDim {
+                             //0123456789012345678901234567890123456789
+    private String brackets = "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[" +
+                              "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[" +
+                              "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[" +
+                              "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[" +
+                              "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[" +
+                              "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[" +
+                              "[[[[[[[[[[[[[[";
+    private String name254 = brackets + "Ljava.lang.String;";
+    private String name255 = "[" + name254;
+    private String name256 = "[" + name255;
+    private String name1 = "[Ljava.lang.String;";
+    private String bigName;
+    private int error = 0;
+
+    private static final ClassLoader IMPLICIT_LOADER = null;
+
+    public ExceedMaxDim() {
+        super();
+
+        StringBuilder sb = new StringBuilder(Short.MAX_VALUE + 50);
+        for (int i = 0; i < Short.MAX_VALUE + 20; i++)
+            sb.append('[');
+        sb.append("Ljava.lang.String;");
+        bigName = sb.toString();
+
+        if (name256.lastIndexOf('[') != 255) // 256:th [
+            throw new RuntimeException("Test broken");
+    }
+
+    public static void main(String[] args) throws Exception {
+        ExceedMaxDim test = new ExceedMaxDim();
+        test.testImplicitLoader();
+        test.testOtherLoader();
+
+        if (test.error != 0)
+            throw new RuntimeException("Test failed, was able to create array with dim > 255." +
+                    " See log for details.");
+    }
+
+    private void testImplicitLoader() throws Exception {
+        // These four should succeed
+        assertSucceedForName(name1, IMPLICIT_LOADER);
+        assertSucceedForName(name254, IMPLICIT_LOADER);
+        assertSucceedForName(name255, IMPLICIT_LOADER);
+        assertSucceedForName(brackets + "[LClass1;", IMPLICIT_LOADER);
+
+        // The following three should fail
+        assertFailForName(name256, IMPLICIT_LOADER);
+        assertFailForName(bigName, IMPLICIT_LOADER);
+        assertFailForName(brackets + "[[LClass2;", IMPLICIT_LOADER);
+    }
+
+    private void testOtherLoader() throws Exception {
+        ClassLoader cl = ExceedMaxDim.class.getClassLoader();
+
+        // These four should succeed
+        assertSucceedForName(name1, cl);
+        assertSucceedForName(name254,cl);
+        assertSucceedForName(name255, cl);
+        assertSucceedForName(brackets + "[LClass3;", cl);
+
+        // The following three should fail
+        assertFailForName(name256, cl);
+        assertFailForName(bigName, cl);
+        assertFailForName(brackets + "[[Class4;", cl);
+    }
+
+    private void assertFailForName(String name, ClassLoader cl) {
+        Class<?> c;
+        try {
+            if (cl == null)
+                c = Class.forName(name);
+            else
+                c = Class.forName(name, true, cl);
+            error++;
+            System.err.println("ERROR: could create " + c);
+        } catch (ClassNotFoundException e) {
+            ;// ok
+        }
+    }
+
+    private void assertSucceedForName(String name, ClassLoader cl) {
+        Class<?> c;
+        try {
+            if (cl == null)
+                c = Class.forName(name);
+            else
+                c = Class.forName(name, true, cl);
+        } catch (ClassNotFoundException e) {
+            error++;
+            System.err.println("ERROR: could not create " + name);
+        }
+    }
+}
--- a/test/java/lang/SecurityManager/CheckPackageAccess.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/lang/SecurityManager/CheckPackageAccess.java	Fri Oct 25 10:39:13 2013 -0700
@@ -47,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.",
@@ -96,6 +97,16 @@
         List<String> jspkgs =
             getPackages(Security.getProperty("package.access"));
 
+        if (!isOpenJDKOnly()) {
+            String lastPkg = pkgs.get(pkgs.size() - 1);
+
+            // Remove any closed packages from list before comparing
+            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
         Collections.sort(pkgs);
         Collections.sort(jspkgs);
@@ -151,4 +162,9 @@
         }
         return packages;
     }
+
+    private static boolean isOpenJDKOnly() {
+        String prop = System.getProperty("java.runtime.name");
+        return prop != null && prop.startsWith("OpenJDK");
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/MethodHandleConstants.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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/LogGeneratedClassesTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,212 @@
+/*
+ * 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 8023524
+ * @summary tests logging generated classes for lambda
+ * @library /java/nio/file
+ * @run testng LogGeneratedClassesTest
+ */
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.nio.file.Files;
+import java.nio.file.LinkOption;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.PosixFileAttributeView;
+import java.util.stream.Stream;
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import org.testng.SkipException;
+
+import static java.nio.file.attribute.PosixFilePermissions.*;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+public class LogGeneratedClassesTest extends LUtils {
+    String longFQCN;
+
+    @BeforeClass
+    public void setup() throws IOException {
+        final List<String> scratch = new ArrayList<>();
+        scratch.clear();
+        scratch.add("package com.example;");
+        scratch.add("public class TestLambda {");
+        scratch.add("    interface I {");
+        scratch.add("        int foo();");
+        scratch.add("    }");
+        scratch.add("    public static void main(String[] args) {");
+        scratch.add("        I lam = () -> 10;");
+        scratch.add("        Runnable r = () -> {");
+        scratch.add("            System.out.println(\"Runnable\");");
+        scratch.add("        };");
+        scratch.add("        r.run();");
+        scratch.add("        System.out.println(\"Finish\");");
+        scratch.add("    }");
+        scratch.add("}");
+
+        File test = new File("TestLambda.java");
+        createFile(test, scratch);
+        compile("-d", ".", test.getName());
+
+        scratch.remove(0);
+        scratch.remove(0);
+        scratch.add(0, "public class LongPackageName {");
+        StringBuilder sb = new StringBuilder("com.example.");
+        // longer than 255 which exceed max length of most filesystems
+        for (int i = 0; i < 30; i++) {
+            sb.append("nonsense.");
+        }
+        sb.append("enough");
+        longFQCN = sb.toString() + ".LongPackageName";
+        sb.append(";");
+        sb.insert(0, "package ");
+        scratch.add(0, sb.toString());
+        test = new File("LongPackageName.java");
+        createFile(test, scratch);
+        compile("-d", ".", test.getName());
+
+        // create target
+        Files.createDirectory(Paths.get("dump"));
+        Files.createDirectories(Paths.get("dumpLong/com/example/nonsense"));
+        Files.createFile(Paths.get("dumpLong/com/example/nonsense/nonsense"));
+        Files.createFile(Paths.get("file"));
+    }
+
+    @AfterClass
+    public void cleanup() throws IOException {
+        Files.delete(Paths.get("TestLambda.java"));
+        Files.delete(Paths.get("LongPackageName.java"));
+        Files.delete(Paths.get("file"));
+        TestUtil.removeAll(Paths.get("com"));
+        TestUtil.removeAll(Paths.get("dump"));
+        TestUtil.removeAll(Paths.get("dumpLong"));
+    }
+
+    @Test
+    public void testNotLogging() {
+        TestResult tr = doExec(JAVA_CMD.getAbsolutePath(),
+                               "-cp", ".",
+                               "-Djava.security.manager",
+                               "com.example.TestLambda");
+        tr.assertZero("Should still return 0");
+    }
+
+    @Test
+    public void testLogging() throws IOException {
+        assertTrue(Files.exists(Paths.get("dump")));
+        TestResult tr = doExec(JAVA_CMD.getAbsolutePath(),
+                               "-cp", ".",
+                               "-Djdk.internal.lambda.dumpProxyClasses=dump",
+                               "-Djava.security.manager",
+                               "com.example.TestLambda");
+        // dump/com/example + 2 class files
+        assertEquals(Files.walk(Paths.get("dump")).count(), 5, "Two lambda captured");
+        tr.assertZero("Should still return 0");
+    }
+
+    @Test
+    public void testDumpDirNotExist() throws IOException {
+        assertFalse(Files.exists(Paths.get("notExist")));
+        TestResult tr = doExec(JAVA_CMD.getAbsolutePath(),
+                               "-cp", ".",
+                               "-Djdk.internal.lambda.dumpProxyClasses=notExist",
+                               "-Djava.security.manager",
+                               "com.example.TestLambda");
+        assertEquals(tr.testOutput.stream()
+                                  .filter(s -> s.startsWith("WARNING"))
+                                  .peek(s -> assertTrue(s.contains("does not exist")))
+                                  .count(),
+                     1, "only show error once");
+        tr.assertZero("Should still return 0");
+    }
+
+    @Test
+    public void testDumpDirIsFile() throws IOException {
+        assertTrue(Files.isRegularFile(Paths.get("file")));
+        TestResult tr = doExec(JAVA_CMD.getAbsolutePath(),
+                               "-cp", ".",
+                               "-Djdk.internal.lambda.dumpProxyClasses=file",
+                               "-Djava.security.manager",
+                               "com.example.TestLambda");
+        assertEquals(tr.testOutput.stream()
+                                  .filter(s -> s.startsWith("WARNING"))
+                                  .peek(s -> assertTrue(s.contains("not a directory")))
+                                  .count(),
+                     1, "only show error once");
+        tr.assertZero("Should still return 0");
+    }
+
+    @Test
+    public void testDumpDirNotWritable() throws IOException {
+        if (! Files.getFileStore(Paths.get("."))
+                   .supportsFileAttributeView(PosixFileAttributeView.class)) {
+            // 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"),
+                              asFileAttribute(fromString("r-xr-xr-x")));
+
+        TestResult tr = doExec(JAVA_CMD.getAbsolutePath(),
+                               "-cp", ".",
+                               "-Djdk.internal.lambda.dumpProxyClasses=readOnly",
+                               "-Djava.security.manager",
+                               "com.example.TestLambda");
+        assertEquals(tr.testOutput.stream()
+                                  .filter(s -> s.startsWith("WARNING"))
+                                  .peek(s -> assertTrue(s.contains("not writable")))
+                                  .count(),
+                     1, "only show error once");
+        tr.assertZero("Should still return 0");
+
+        TestUtil.removeAll(Paths.get("readOnly"));
+    }
+
+    @Test
+    public void testLoggingException() throws IOException {
+        assertTrue(Files.exists(Paths.get("dumpLong")));
+        TestResult tr = doExec(JAVA_CMD.getAbsolutePath(),
+                               "-cp", ".",
+                               "-Djdk.internal.lambda.dumpProxyClasses=dumpLong",
+                               "-Djava.security.manager",
+                               longFQCN);
+        assertEquals(tr.testOutput.stream()
+                                  .filter(s -> s.startsWith("WARNING: Exception"))
+                                  .count(),
+                     2, "show error each capture");
+        // dumpLong/com/example/nosense/nosense
+        assertEquals(Files.walk(Paths.get("dumpLong")).count(), 5, "Two lambda captured failed to log");
+        tr.assertZero("Should still return 0");
+    }
+}
--- a/test/java/lang/management/MemoryMXBean/LowMemoryTest2.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/lang/management/MemoryMXBean/LowMemoryTest2.java	Fri Oct 25 10:39:13 2013 -0700
@@ -26,7 +26,7 @@
  *
  * The test set a listener to be notified when any of the non-heap pools
  * exceed 80%. It then starts a thread that continuously loads classes.
- * In the HotSpot implementation this causes perm space to be consumed.
+ * In the HotSpot implementation this causes metaspace to be consumed.
  * Test completes when we the notification is received or an OutOfMemory
  * is generated.
  */
@@ -100,7 +100,14 @@
 
             // TestNNNNNN
 
-            String name = "Test" + Integer.toString(count++);
+            int load_count = count++;
+            if (load_count > 999999) {
+                // The test will create a corrupt class file if the count
+                // exceeds 999999. Fix the test if this exception is thrown.
+                throw new RuntimeException("Load count exceeded");
+            }
+
+            String name = "Test" + Integer.toString(load_count);
 
             byte value[];
             try {
@@ -133,8 +140,9 @@
          * Note: Once the usage threshold has been exceeded the low memory
          * detector thread will attempt to deliver its notification - this can
          * potentially create a race condition with this thread contining to
-         * fill up perm space. To avoid the low memory detector getting an OutOfMemory
-         * we throttle this thread once the threshold has been exceeded.
+         * fill up metaspace. To avoid the low memory detector getting an
+         * OutOfMemory we throttle this thread once the threshold has been
+         * exceeded.
          */
         public void run() {
             List pools = ManagementFactory.getMemoryPoolMXBeans();
@@ -180,7 +188,7 @@
 
         // Set threshold of 80% of all NON_HEAP memory pools
         // In the Hotspot implementation this means we should get a notification
-        // if the CodeCache or perm generation fills up.
+        // if the CodeCache or metaspace fills up.
 
         while (iter.hasNext()) {
             MemoryPoolMXBean p = (MemoryPoolMXBean) iter.next();
@@ -188,7 +196,12 @@
 
                 // set threshold
                 MemoryUsage mu = p.getUsage();
-                long threshold = (mu.getMax() * 80) / 100;
+                long max = mu.getMax();
+                if (max < 0) {
+                    throw new RuntimeException("There is no maximum set for "
+                            + p.getName() + " memory pool so the test is invalid");
+                }
+                long threshold = (max * 80) / 100;
 
                 p.setUsageThreshold(threshold);
 
--- a/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh	Fri Oct 25 10:39:13 2013 -0700
@@ -51,14 +51,17 @@
 
 # Run test with each GC configuration
 # 
-# Notes: To ensure that perm gen fills up we disable class unloading.
-# Also we set the max perm space to 8MB - otherwise the test takes too
+# Notes: To ensure that metaspace fills up we disable class unloading.
+# Also we set the max metaspace to 8MB - otherwise the test takes too
 # long to run. 
 
-go -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseSerialGC LowMemoryTest2
-go -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseParallelGC LowMemoryTest2
-go -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC \
-    LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseSerialGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParallelGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC LowMemoryTest2
+
+# Test class metaspace - might hit MaxMetaspaceSize instead if
+# UseCompressedClassPointers is off or if 32 bit.
+go -noclassgc -XX:MaxMetaspaceSize=16m -XX:CompressedClassSpaceSize=4m LowMemoryTest2
 
 echo ''
 if [ $failures -gt 0 ];
--- a/test/java/lang/reflect/Array/ExceedMaxDim.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/lang/reflect/Array/ExceedMaxDim.java	Fri Oct 25 10:39:13 2013 -0700
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4100814
+ * @bug 4100814 7044282
  * @summary Make sure you can't create an array of dimension > 256.
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 8026213
+ * @summary Reflection support for private methods in interfaces
+ * @author  Robert Field
+ * @run main TestPrivateInterfaceMethodReflect
+ */
+
+import java.lang.reflect.*;
+
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.MethodVisitor;
+import jdk.internal.org.objectweb.asm.Opcodes;
+
+public class TestPrivateInterfaceMethodReflect {
+
+    static final String INTERFACE_NAME = "PrivateInterfaceMethodReflectTest_Interface";
+    static final String CLASS_NAME = "PrivateInterfaceMethodReflectTest_Class";
+    static final int EXPECTED = 1234;
+
+    static class TestClassLoader extends ClassLoader implements Opcodes {
+
+        @Override
+        public Class findClass(String name) throws ClassNotFoundException {
+            byte[] b;
+            try {
+                b = loadClassData(name);
+            } catch (Throwable th) {
+                // th.printStackTrace();
+                throw new ClassNotFoundException("Loading error", th);
+            }
+            return defineClass(name, b, 0, b.length);
+        }
+
+        private byte[] loadClassData(String name) throws Exception {
+            ClassWriter cw = new ClassWriter(0);
+            MethodVisitor mv;
+            switch (name) {
+                case INTERFACE_NAME:
+                    cw.visit(V1_8, ACC_ABSTRACT | ACC_INTERFACE | ACC_PUBLIC, INTERFACE_NAME, null, "java/lang/Object", null);
+                    {
+                        mv = cw.visitMethod(ACC_PRIVATE, "privInstance", "()I", null, null);
+                        mv.visitCode();
+                        mv.visitLdcInsn(EXPECTED);
+                        mv.visitInsn(IRETURN);
+                        mv.visitMaxs(1, 1);
+                        mv.visitEnd();
+                    }
+                    break;
+                case CLASS_NAME:
+                    cw.visit(52, ACC_SUPER | ACC_PUBLIC, CLASS_NAME, null, "java/lang/Object", new String[]{INTERFACE_NAME});
+                    {
+                        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
+                        mv.visitCode();
+                        mv.visitVarInsn(ALOAD, 0);
+                        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
+                        mv.visitInsn(RETURN);
+                        mv.visitMaxs(1, 1);
+                        mv.visitEnd();
+                    }
+                    break;
+                default:
+                    break;
+            }
+            cw.visitEnd();
+
+            return cw.toByteArray();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        TestClassLoader tcl = new TestClassLoader();
+        Class<?> itf = tcl.loadClass(INTERFACE_NAME);
+        Class<?> k = tcl.loadClass(CLASS_NAME);
+        Object inst = k.newInstance();
+        Method[] meths = itf.getDeclaredMethods();
+        if (meths.length != 1) {
+            throw new Exception("Expected one method in " + INTERFACE_NAME + " instead " + meths.length);
+        }
+
+        Method m = meths[0];
+        int mod = m.getModifiers();
+        if ((mod & Modifier.PRIVATE) == 0) {
+            throw new Exception("Expected " + m + " to be private");
+        }
+        if ((mod & Modifier.STATIC) != 0) {
+            throw new Exception("Expected " + m + " to be instance method");
+        }
+
+        m.setAccessible(true);
+        for (int i = 1; i < 200; i++) {
+            if (!m.invoke(inst).equals(EXPECTED)) {
+                throw new Exception("Expected " + EXPECTED + " from " + m);
+            }
+        }
+
+        System.out.println("Passed.");
+    }
+}
--- a/test/java/net/HttpURLPermission/HttpURLPermissionTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +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.
- */
-
-import java.net.HttpURLPermission;
-import java.io.*;
-
-/**
- * @test
- * @bug 8010464
- */
-
-public class HttpURLPermissionTest {
-
-    // super class for all test types
-    abstract static class Test {
-        boolean expected;
-        abstract boolean execute();
-    };
-
-    // Tests URL part of implies() method. This is the main test.
-    static class URLImpliesTest extends Test {
-        String arg1, arg2;
-
-        URLImpliesTest(String arg1, String arg2, boolean expected) {
-            this.arg1 = arg1;
-            this.arg2 = arg2;
-            this.expected = expected;
-        }
-
-          boolean execute() {
-            HttpURLPermission p1 = new HttpURLPermission (arg1, "GET:*");
-            HttpURLPermission p2 = new HttpURLPermission (arg2, "GET:*");
-            boolean result = p1.implies(p2);
-            return result == expected;
-        }
-    };
-
-    static URLImpliesTest imtest(String arg1, String arg2, boolean expected) {
-        return new URLImpliesTest(arg1, arg2, expected);
-    }
-
-    static class ActionImpliesTest extends Test {
-        String arg1, arg2;
-
-        ActionImpliesTest(String arg1, String arg2, boolean expected) {
-            this.arg1 = arg1;
-            this.arg2 = arg2;
-            this.expected = expected;
-        }
-
-          boolean execute() {
-            String url1 = "http://www.foo.com/-";
-            String url2 = "http://www.foo.com/a/b";
-            HttpURLPermission p1 = new HttpURLPermission(url1, arg1);
-            HttpURLPermission p2 = new HttpURLPermission(url2, arg2);
-            boolean result = p1.implies(p2);
-            return result == expected;
-        }
-    }
-
-    static ActionImpliesTest actest(String arg1, String arg2, boolean expected) {
-        return new ActionImpliesTest(arg1, arg2, expected);
-    }
-
-    static Test[] pathImplies = {
-        // single
-        imtest("http://www.foo.com/", "http://www.foo.com/", true),
-        imtest("http://www.bar.com/", "http://www.foo.com/", false),
-        imtest("http://www.foo.com/a/b", "http://www.foo.com/", false),
-        imtest("http://www.foo.com/a/b", "http://www.foo.com/a/b/c", false),
-        // wildcard
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/*", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c#frag", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c#frag?foo=foo", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/b/b/c", false),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c.html", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c.html", true),
-        imtest("http://www.foo.com/a/b/*", "https://www.foo.com/a/b/c", false),
-        // recursive
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/-", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c#frag", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c#frag?foo=foo", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/b/b/c", false),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c.html", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c.html", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e.html", true),
-        imtest("https://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e.html", false),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e#frag", true),
-        imtest("http://www.foo.com/a/b/-", "https://www.foo.com/a/b/c", false),
-        // special cases
-        imtest("http:*", "https://www.foo.com/a/b/c", false),
-        imtest("http:*", "http://www.foo.com/a/b/c", true),
-        imtest("http:*", "http://foo/bar", true),
-        imtest("http://foo/bar", "https://foo/bar", false)
-    };
-
-    static Test[] actionImplies = {
-        actest("GET", "GET", true),
-        actest("GET", "POST", false),
-        actest("GET:", "PUT", false),
-        actest("GET:", "GET", true),
-        actest("GET,POST", "GET", true),
-        actest("GET,POST:", "GET", true),
-        actest("GET:X-Foo", "GET:x-foo", true),
-        actest("GET:X-Foo,X-bar", "GET:x-foo", true),
-        actest("GET:X-Foo", "GET:x-boo", false),
-        actest("GET:X-Foo,X-Bar", "GET:x-bar,x-foo", true),
-        actest("GET:X-Bar,X-Foo,X-Bar,Y-Foo", "GET:x-bar,x-foo", true),
-        actest("GET:*", "GET:x-bar,x-foo", true),
-        actest("*:*", "GET:x-bar,x-foo", true)
-    };
-
-    static boolean failed = false;
-
-    public static void main(String args[]) throws Exception {
-        for (int i=0; i<pathImplies.length ; i++) {
-            URLImpliesTest test = (URLImpliesTest)pathImplies[i];
-            Exception caught = null;
-            boolean result = false;
-            try {
-                result = test.execute();
-            } catch (Exception e) {
-                caught = e;
-                e.printStackTrace();
-            }
-            if (!result) {
-                failed = true;
-                System.out.println ("test failed: " + test.arg1 + ": " +
-                        test.arg2 + " Exception: " + caught);
-            }
-            System.out.println ("path test " + i + " OK");
-
-        }
-        for (int i=0; i<actionImplies.length ; i++) {
-            ActionImpliesTest test = (ActionImpliesTest)actionImplies[i];
-            Exception caught = null;
-            boolean result = false;
-            try {
-                result = test.execute();
-            } catch (Exception e) {
-                caught = e;
-                e.printStackTrace();
-            }
-            if (!result) {
-                failed = true;
-                System.out.println ("test failed: " + test.arg1 + ": " +
-                        test.arg2 + " Exception: " + caught);
-            }
-            System.out.println ("action test " + i + " OK");
-        }
-
-        serializationTest("http://www.foo.com/-", "GET,DELETE:*");
-        serializationTest("https://www.foo.com/-", "POST:X-Foo");
-        serializationTest("https:*", "*:*");
-        serializationTest("http://www.foo.com/a/b/s/", "POST:X-Foo");
-        serializationTest("http://www.foo.com/a/b/s/*", "POST:X-Foo");
-
-        if (failed) {
-            throw new RuntimeException("some tests failed");
-        }
-
-    }
-
-    static void serializationTest(String name, String actions)
-        throws Exception {
-
-        HttpURLPermission out = new HttpURLPermission(name, actions);
-
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream o = new ObjectOutputStream(baos);
-        o.writeObject(out);
-        ByteArrayInputStream bain = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream i = new ObjectInputStream(bain);
-        HttpURLPermission in = (HttpURLPermission)i.readObject();
-        if (!in.equals(out)) {
-            System.out.println ("FAIL");
-            System.out.println ("in = " + in);
-            System.out.println ("out = " + out);
-            failed = true;
-        }
-    }
-}
--- a/test/java/net/HttpURLPermission/URLTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,240 +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.
- */
-
-import java.net.HttpURLPermission;
-/*
- * Run the tests once without security manager and once with
- *
- * @test
- * @bug 8010464
- * @compile ../../../com/sun/net/httpserver/SimpleSSLContext.java
- * @run main/othervm/policy=policy.1 URLTest one
- * @run main/othervm URLTest one
- * @run main/othervm/policy=policy.2 URLTest two
- * @run main/othervm URLTest two
- * @run main/othervm/policy=policy.3 URLTest three
- * @run main/othervm URLTest three
- */
-
-import java.net.*;
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.logging.*;
-import com.sun.net.httpserver.*;
-import javax.net.ssl.*;
-
-public class URLTest {
-    static boolean failed = false;
-
-    public static void main (String[] args) throws Exception {
-        boolean no = false, yes = true;
-
-        if (System.getSecurityManager() == null) {
-            yes = false;
-        }
-        createServers();
-        InetSocketAddress addr1 = httpServer.getAddress();
-        int port1 = addr1.getPort();
-        InetSocketAddress addr2 = httpsServer.getAddress();
-        int port2 = addr2.getPort();
-
-          // each of the following cases is run with a different policy file
-
-        switch (args[0]) {
-          case "one":
-            String url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
-            String url2 = "https://127.0.0.1:"+ port2 + "/foo.html";
-            String url3 = "http://127.0.0.1:"+ port1 + "/bar.html";
-            String url4 = "https://127.0.0.1:"+ port2 + "/bar.html";
-
-            // simple positive test. Should succceed
-            test(url1, "GET", "X-Foo", no);
-            test(url1, "GET", "Z-Bar", "X-Foo", no);
-            test(url1, "GET", "X-Foo", "Z-Bar", no);
-            test(url1, "GET", "Z-Bar", no);
-            test(url2, "POST", "X-Fob", no);
-
-            // reverse the methods, should fail
-            test(url1, "POST", "X-Foo", yes);
-            test(url2, "GET", "X-Fob", yes);
-
-            // different URLs, should fail
-            test(url3, "GET", "X-Foo", yes);
-            test(url4, "POST", "X-Fob", yes);
-            break;
-
-          case "two":
-            url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
-            url2 = "https://127.0.0.1:"+ port2 + "/foo.html";
-            url3 = "http://127.0.0.1:"+ port1 + "/bar.html";
-            url4 = "https://127.0.0.1:"+ port2 + "/bar.html";
-
-            // simple positive test. Should succceed
-            test(url1, "GET", "X-Foo", no);
-            test(url2, "POST", "X-Fob", no);
-            test(url3, "GET", "X-Foo", no);
-            test(url4, "POST", "X-Fob", no);
-            break;
-
-          case "three":
-            url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
-            url2 = "https://127.0.0.1:"+ port2 + "/a/c/d/e/foo.html";
-            url3 = "http://127.0.0.1:"+ port1 + "/a/b/c";
-            url4 = "https://127.0.0.1:"+ port2 + "/a/b/c";
-
-            test(url1, "GET", "X-Foo", yes);
-            test(url2, "POST", "X-Zxc", no);
-            test(url3, "DELETE", "Y-Foo", no);
-            test(url4, "POST", "Y-Foo", yes);
-            break;
-        }
-        shutdown();
-        if (failed) {
-            throw new RuntimeException("Test failed");
-        }
-    }
-
-    public static void test (
-        String u, String method,
-        String header, boolean exceptionExpected
-    )
-        throws Exception
-    {
-        test(u, method, header, null, exceptionExpected);
-    }
-
-    public static void test (
-        String u, String method,
-        String header1, String header2, boolean exceptionExpected
-    )
-        throws Exception
-    {
-        URL url = new URL(u);
-        System.out.println ("url=" + u + " method="+method + " header1="+header1
-                +" header2 = " + header2
-                +" exceptionExpected="+exceptionExpected);
-        HttpURLConnection urlc = (HttpURLConnection)url.openConnection();
-        if (urlc instanceof HttpsURLConnection) {
-            HttpsURLConnection ssl = (HttpsURLConnection)urlc;
-            ssl.setHostnameVerifier(new HostnameVerifier() {
-                public boolean verify(String host, SSLSession sess) {
-                    return true;
-                }
-            });
-            ssl.setSSLSocketFactory (ctx.getSocketFactory());
-        }
-        urlc.setRequestMethod(method);
-        if (header1 != null) {
-            urlc.addRequestProperty(header1, "foo");
-        }
-        if (header2 != null) {
-            urlc.addRequestProperty(header2, "bar");
-        }
-        try {
-            int g = urlc.getResponseCode();
-            if (exceptionExpected) {
-                failed = true;
-                System.out.println ("FAIL");
-                return;
-            }
-            if (g != 200) {
-                String s = Integer.toString(g);
-                throw new RuntimeException("unexpected response "+ s);
-            }
-            InputStream is = urlc.getInputStream();
-            int c,count=0;
-            byte[] buf = new byte[1024];
-            while ((c=is.read(buf)) != -1) {
-                count += c;
-            }
-            is.close();
-        } catch (RuntimeException e) {
-            if (! (e instanceof SecurityException) &&
-                        !(e.getCause() instanceof SecurityException)  ||
-                        !exceptionExpected)
-            {
-                System.out.println ("FAIL");
-                //e.printStackTrace();
-                failed = true;
-            }
-        }
-        System.out.println ("OK");
-    }
-
-    static HttpServer httpServer;
-    static HttpsServer httpsServer;
-    static HttpContext c, cs;
-    static ExecutorService e, es;
-    static SSLContext ctx;
-
-    // These ports need to be hard-coded until we support port number
-    // ranges in the permission class
-
-    static final int PORT1 = 12567;
-    static final int PORT2 = 12568;
-
-    static void createServers() throws Exception {
-        InetSocketAddress addr1 = new InetSocketAddress (PORT1);
-        InetSocketAddress addr2 = new InetSocketAddress (PORT2);
-        httpServer = HttpServer.create (addr1, 0);
-        httpsServer = HttpsServer.create (addr2, 0);
-
-        MyHandler h = new MyHandler();
-
-        c = httpServer.createContext ("/", h);
-        cs = httpsServer.createContext ("/", h);
-        e = Executors.newCachedThreadPool();
-        es = Executors.newCachedThreadPool();
-        httpServer.setExecutor (e);
-        httpsServer.setExecutor (es);
-
-        // take the keystore from elsewhere in test hierarchy
-        String keysdir = System.getProperty("test.src")
-                + "/../../../com/sun/net/httpserver/";
-        ctx = new SimpleSSLContext(keysdir).get();
-        httpsServer.setHttpsConfigurator(new HttpsConfigurator (ctx));
-
-        httpServer.start();
-        httpsServer.start();
-    }
-
-    static void shutdown() {
-        httpServer.stop(1);
-        httpsServer.stop(1);
-        e.shutdown();
-        es.shutdown();
-    }
-
-    static class MyHandler implements HttpHandler {
-
-        MyHandler() {
-        }
-
-        public void handle(HttpExchange x) throws IOException {
-            x.sendResponseHeaders(200, -1);
-            x.close();
-        }
-    }
-
-}
--- a/test/java/net/HttpURLPermission/policy.1	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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.
-//
-
-grant {
-    permission java.net.HttpURLPermission "http://127.0.0.1:12567/foo.html", "GET:X-Foo,Z-Bar";
-    permission java.net.HttpURLPermission "https://127.0.0.1:12568/foo.html", "POST:X-Fob,T-Bar";
-
-    // needed for HttpServer
-    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
-    permission "java.util.PropertyPermission" "test.src", "read";
-    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
-
-    //permission "java.util.logging.LoggingPermission" "control";
-    //permission "java.io.FilePermission" "/tmp/-", "read,write";
-    permission "java.lang.RuntimePermission" "modifyThread";
-    permission "java.lang.RuntimePermission" "setFactory";
-};
-
-// 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;
-};
-
--- a/test/java/net/HttpURLPermission/policy.2	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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.
-//
-
-grant {
-    permission java.net.HttpURLPermission "http://127.0.0.1:12567/*", "GET:X-Foo";
-    permission java.net.HttpURLPermission "https://127.0.0.1:12568/*", "POST:X-Fob";
-
-    // needed for HttpServer
-    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
-    permission "java.util.PropertyPermission" "test.src", "read";
-    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
-
-    //permission "java.util.logging.LoggingPermission" "control";
-    //permission "java.io.FilePermission" "/tmp/-", "read,write";
-    permission "java.lang.RuntimePermission" "modifyThread";
-    permission "java.lang.RuntimePermission" "setFactory";
-};
-
-grant codeBase "file:${{java.ext.dirs}}/*" {
-        permission java.security.AllPermission;
-};
-
-grant codeBase "file:///export/repos/jdk8/build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/jre/lib/rt.jar" {
-        permission java.security.AllPermission;
-};
-
--- a/test/java/net/HttpURLPermission/policy.3	Fri Oct 25 19:51:54 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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.
-//
-
-grant {
-    permission java.net.HttpURLPermission "http://127.0.0.1:12567/a/b/-", "DELETE,GET:X-Foo,Y-Foo";
-    permission java.net.HttpURLPermission "https://127.0.0.1:12568/a/c/-", "POST:*";
-
-    // needed for HttpServer
-    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
-    permission "java.util.PropertyPermission" "test.src", "read";
-    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
-
-    //permission "java.util.logging.LoggingPermission" "control";
-    //permission "java.io.FilePermission" "/tmp/-", "read,write";
-    permission "java.lang.RuntimePermission" "modifyThread";
-    permission "java.lang.RuntimePermission" "setFactory";
-};
-
-// 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;
-};
-
--- a/test/java/net/Inet6Address/serialize/Serialize.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/net/Inet6Address/serialize/Serialize.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/net/InetAddress/GetLocalHostWithSM.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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/Socket/GetLocalAddress.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/net/Socket/GetLocalAddress.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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
  *
  */
--- a/test/java/net/Socks/SocksProxyVersion.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/net/Socks/SocksProxyVersion.java	Fri Oct 25 10:39:13 2013 -0700
@@ -41,6 +41,10 @@
     volatile boolean failed;
 
     public static void main(String[] args) throws Exception {
+        if (InetAddress.getLocalHost().isLoopbackAddress()) {
+            System.out.println("Test cannot run. getLocalHost returns a loopback address");
+            return;
+        }
         new SocksProxyVersion();
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/URLPermissionTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,388 @@
+/*
+ * 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.net.URLPermission;
+import java.io.*;
+
+/**
+ * @test
+ * @bug 8010464
+ */
+
+public class URLPermissionTest {
+
+    // super class for all test types
+    abstract static class Test {
+        boolean expected;
+        abstract boolean execute();
+    };
+
+    // Should throw an IAE on construction
+    static class ExTest extends Test {
+        String arg;
+        ExTest(String arg) {
+            this.arg = arg;
+        }
+
+        @Override
+        boolean execute() {
+            try {
+                URLPermission p = new URLPermission(arg);
+                return false;
+            } catch (IllegalArgumentException e) {
+                return true;
+            }
+        }
+    };
+
+    static ExTest extest(String arg) {
+        return new ExTest(arg);
+    }
+
+    // Tests URL part of implies() method. This is the main test.
+    static class URLImpliesTest extends Test {
+        String arg1, arg2;
+
+        URLImpliesTest(String arg1, String arg2, boolean expected) {
+            this.arg1 = arg1;
+            this.arg2 = arg2;
+            this.expected = expected;
+        }
+
+          boolean execute() {
+            URLPermission p1 = new URLPermission (arg1, "GET:*");
+            URLPermission p2 = new URLPermission (arg2, "GET:*");
+            boolean result = p1.implies(p2);
+            if (result != expected) {
+                System.out.println("p1 = " + p1);
+                System.out.println("p2 = " + p2);
+            }
+            return result == expected;
+        }
+    };
+
+    static URLImpliesTest imtest(String arg1, String arg2, boolean expected) {
+        return new URLImpliesTest(arg1, arg2, expected);
+    }
+
+    static class ActionImpliesTest extends Test {
+        String arg1, arg2;
+
+        ActionImpliesTest(String arg1, String arg2, boolean expected) {
+            this.arg1 = arg1;
+            this.arg2 = arg2;
+            this.expected = expected;
+        }
+
+        @Override
+          boolean execute() {
+            String url1 = "http://www.foo.com/-";
+            String url2 = "http://www.foo.com/a/b";
+            URLPermission p1 = new URLPermission(url1, arg1);
+            URLPermission p2 = new URLPermission(url2, arg2);
+            boolean result = p1.implies(p2);
+
+            return result == expected;
+        }
+    }
+
+    static ActionImpliesTest actest(String arg1, String arg2, boolean expected) {
+        return new ActionImpliesTest(arg1, arg2, expected);
+    }
+
+    static class URLEqualityTest extends Test {
+        String arg1, arg2;
+
+        URLEqualityTest(String arg1, String arg2, boolean expected) {
+            this.arg1 = arg1;
+            this.arg2 = arg2;
+            this.expected = expected;
+        }
+
+        @Override
+          boolean execute() {
+            URLPermission p1 = new URLPermission(arg1);
+            URLPermission p2 = new URLPermission(arg2);
+            boolean result = p1.equals(p2);
+
+            return result == expected;
+        }
+    }
+
+    static URLEqualityTest eqtest(String arg1, String arg2, boolean expected) {
+        return new URLEqualityTest(arg1, arg2, expected);
+    }
+
+    static Test[] pathImplies = {
+        // single
+        imtest("http://www.foo.com/", "http://www.foo.com/", true),
+        imtest("http://www.bar.com/", "http://www.foo.com/", false),
+        imtest("http://www.foo.com/a/b", "http://www.foo.com/", false),
+        imtest("http://www.foo.com/a/b", "http://www.foo.com/a/b/c", false),
+        // wildcard
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/*", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c#frag", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c#frag?foo=foo", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/b/b/c", false),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c.html", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c.html", true),
+        imtest("http://www.foo.com/a/b/*", "https://www.foo.com/a/b/c", false),
+        // recursive
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/-", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c#frag", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c#frag?foo=foo", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/b/b/c", false),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c.html", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c.html", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e.html", true),
+        imtest("https://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e.html", false),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e#frag", true),
+        imtest("http://www.foo.com/a/b/-", "https://www.foo.com/a/b/c", false),
+        // special cases
+        imtest("http:*", "https://www.foo.com/a/b/c", false),
+        imtest("http:*", "http://www.foo.com/a/b/c", true),
+        imtest("http:*", "http://foo/bar", true),
+        imtest("http://foo/bar", "https://foo/bar", false)
+    };
+
+    // new functionality
+
+    static Test[] exceptionTests = {
+        extest("http://1.2.3.4.5/a/b/c"),
+        extest("http://www.*.com"),
+        //extest("http://www.foo.com:1-X"),
+        extest("http://[foo.com]:99"),
+        extest("http://[fec0::X]:99"),
+        extest("http:")
+    };
+
+    static Test[] pathImplies2 = {
+        imtest("http://[FE80::]:99", "http://[fe80:0::]:99", true),
+
+        // hostnames
+        imtest("http://*.foo.com/a/b/-", "http://www.foo.com/a/b/c/d", true),
+        imtest("http://*.foo.com/a/b/-", "http://www.bar.com/a/b/c/d", false),
+        imtest("http://*.foo.com/a/b/-", "http://www.biz.bar.foo.com/a/b/c/d", true),
+        imtest("http://*.foo.com/a/b/-", "http://www.biz.bar.foo.como/a/b/c/d", false),
+        imtest("http://*/a/b/-", "http://www.biz.bar.foo.fuzz/a/b/c/d", true),
+        imtest("http://*/a/b/-", "http://*/a/b/c/d", true),
+        imtest("http://*.foo.com/a/b/-", "http://*/a/b/c/d", false),
+        imtest("http:*", "http://*/a/b/c/d", true),
+
+        // literal IPv4 addresses
+        imtest("http://1.2.3.4/a/b/-", "http://www.biz.bar.foo.com/a/b/c/d", false),
+        imtest("http://1.2.3.4/a/b/-", "http://1.2.3.4/a/b/c/d", true),
+        imtest("http://1.2.3.4/a/b/-", "http://1.2.88.4/a/b/c/d", false),
+        imtest("http:*", "http://1.2.88.4/a/b/c/d", true),
+
+        // literal IPv6 addresses
+        imtest("http://[fe80::]/a/b/-", "http://[fe80::0]/a/b/c", true),
+        imtest("http://[fe80::]/a/b/-", "http://[fe80::3]/a/b/c", false),
+        imtest("http://[1:2:3:4:5:6:7:8]/a/b/-","http://[1:002:03:4:0005:6:07:8]/a/b/c", true),
+        imtest("http://[1:2:3:4:5:6:7:8]/a/b/-","http://[1:002:03:4:0033:6:07:8]/a/b/c", false),
+        imtest("http://[1::2]/a/b/-", "http://[1:0:0:0::2]/a/b/c", true),
+        imtest("http://[1::2]/a/b/-", "http://[1:0:0:0::3]/a/b/c", false),
+        imtest("http://[FE80::]:99", "http://[fe80:0::]:99", true),
+        imtest("http:*", "http://[fe80:0::]:99", true),
+
+        // portranges
+        imtest("http://*.foo.com:1-2/a/b/-", "http://www.foo.com:1/a/b/c/d", true),
+        imtest("http://*.foo.com:1-2/a/b/-", "http://www.foo.com:3/a/b/c/d", false),
+        imtest("http://*.foo.com:3-/a/b/-", "http://www.foo.com:1/a/b/c/d", false),
+        imtest("http://*.foo.com:3-/a/b/-", "http://www.foo.com:4-5/a/b/c/d", true),
+        imtest("http://*.foo.com:3-/a/b/-", "http://www.foo.com:3-3/a/b/c/d", true),
+        imtest("http://*.foo.com:3-99/a/b/-", "http://www.foo.com:55-100/a/b/c/d", false),
+        imtest("http://*.foo.com:-44/a/b/-", "http://www.foo.com:1/a/b/c/d", true),
+        imtest("http://*.foo.com:-44/a/b/-", "http://www.foo.com:1-10/a/b/c/d", true),
+        imtest("http://*.foo.com:-44/a/b/-", "http://www.foo.com:44/a/b/c/d", true),
+        imtest("http://*.foo.com:-44/a/b/-", "http://www.foo.com:45/a/b/c/d", false),
+        imtest("http://www.foo.com:70-90/a/b", "http://www.foo.com/a/b", true),
+        imtest("https://www.foo.com/a/b", "https://www.foo.com:80/a/b", false),
+        imtest("https://www.foo.com:70-90/a/b", "https://www.foo.com/a/b", false),
+        imtest("https://www.foo.com/a/b", "https://www.foo.com:443/a/b", true),
+        imtest("https://www.foo.com:200-500/a/b", "https://www.foo.com/a/b", true),
+        imtest("http://www.foo.com:*/a/b", "http://www.foo.com:1-12345/a/b", true),
+
+        // misc
+        imtest("https:*", "http://www.foo.com", false),
+        imtest("https:*", "http:*", false)
+    };
+
+    static Test[] actionImplies = {
+        actest("GET", "GET", true),
+        actest("GET", "POST", false),
+        actest("GET:", "PUT", false),
+        actest("GET:", "GET", true),
+        actest("GET,POST", "GET", true),
+        actest("GET,POST:", "GET", true),
+        actest("GET:X-Foo", "GET:x-foo", true),
+        actest("GET:X-Foo,X-bar", "GET:x-foo", true),
+        actest("GET:X-Foo", "GET:x-boo", false),
+        actest("GET:X-Foo,X-Bar", "GET:x-bar,x-foo", true),
+        actest("GET:X-Bar,X-Foo,X-Bar,Y-Foo", "GET:x-bar,x-foo", true),
+        actest("GET:*", "GET:x-bar,x-foo", true),
+        actest("*:*", "GET:x-bar,x-foo", true)
+    };
+
+    static Test[] equalityTests = {
+        eqtest("http://www.foo.com", "http://www.FOO.CoM", true),
+        eqtest("http://[fe80:0:0::]:1-2", "HTTP://[FE80::]:1-2", true),
+        eqtest("HTTP://1.2.3.5/A/B/C", "http://1.2.3.5/A/b/C", false),
+        eqtest("HTTP://1.2.3.5/A/B/C", "HTTP://1.2.3.5/A/b/C", false),
+        eqtest("http:*", "http:*", true),
+        eqtest("http://www.foo.com/a/b", "https://www.foo.com/a/b", false),
+        eqtest("http://w.foo.com", "http://w.foo.com/", false),
+        eqtest("http://*.foo.com", "http://*.foo.com", true),
+        eqtest("http://www.foo.com/a/b", "http://www.foo.com:80/a/b", true),
+        eqtest("http://www.foo.com/a/b", "http://www.foo.com:82/a/b", false),
+        eqtest("https://www.foo.com/a/b", "https://www.foo.com:443/a/b", true),
+        eqtest("https://www.foo.com/a/b", "https://www.foo.com:444/a/b", false),
+    };
+
+    static boolean failed = false;
+
+    public static void main(String args[]) throws Exception {
+        for (int i=0; i<pathImplies.length ; i++) {
+            URLImpliesTest test = (URLImpliesTest)pathImplies[i];
+            Exception caught = null;
+            boolean result = false;
+            try {
+                result = test.execute();
+            } catch (Exception e) {
+                caught = e;
+                e.printStackTrace();
+            }
+            if (!result) {
+                failed = true;
+                System.out.printf("path test %d failed: %s : %s\n", i, test.arg1,
+                        test.arg2);
+            } else {
+                System.out.println ("path test " + i + " OK");
+            }
+
+        }
+
+        // new tests for functionality added in revision of API
+
+        for (int i=0; i<pathImplies2.length ; i++) {
+            URLImpliesTest test = (URLImpliesTest)pathImplies2[i];
+            Exception caught = null;
+            boolean result = false;
+            try {
+                result = test.execute();
+            } catch (Exception e) {
+                caught = e;
+                e.printStackTrace();
+            }
+            if (!result) {
+                failed = true;
+                System.out.printf("path2 test %d failed: %s : %s\n", i, test.arg1,
+                        test.arg2);
+            } else {
+                System.out.println ("path2 test " + i + " OK");
+            }
+
+        }
+
+        for (int i=0; i<equalityTests.length ; i++) {
+            URLEqualityTest test = (URLEqualityTest)equalityTests[i];
+            Exception caught = null;
+            boolean result = false;
+            try {
+                result = test.execute();
+            } catch (Exception e) {
+                caught = e;
+                e.printStackTrace();
+            }
+            if (!result) {
+                failed = true;
+                System.out.printf("equality test %d failed: %s : %s\n", i, test.arg1,
+                        test.arg2);
+            } else {
+                System.out.println ("equality test " + i + " OK");
+            }
+
+        }
+
+        for (int i=0; i<exceptionTests.length; i++) {
+            ExTest test = (ExTest)exceptionTests[i];
+            boolean result = test.execute();
+            if (!result) {
+                System.out.println ("test failed: " + test.arg);
+                failed = true;
+            } else {
+                System.out.println ("exception test " + i + " OK");
+            }
+        }
+
+        for (int i=0; i<actionImplies.length ; i++) {
+            ActionImpliesTest test = (ActionImpliesTest)actionImplies[i];
+            Exception caught = null;
+            boolean result = false;
+            try {
+                result = test.execute();
+            } catch (Exception e) {
+                caught = e;
+                e.printStackTrace();
+            }
+            if (!result) {
+                failed = true;
+                System.out.println ("test failed: " + test.arg1 + ": " +
+                        test.arg2 + " Exception: " + caught);
+            }
+            System.out.println ("action test " + i + " OK");
+        }
+
+        serializationTest("http://www.foo.com/-", "GET,DELETE:*");
+        serializationTest("https://www.foo.com/-", "POST:X-Foo");
+        serializationTest("https:*", "*:*");
+        serializationTest("http://www.foo.com/a/b/s/", "POST:X-Foo");
+        serializationTest("http://www.foo.com/a/b/s/*", "POST:X-Foo");
+
+        if (failed) {
+            throw new RuntimeException("some tests failed");
+        }
+
+    }
+
+    static void serializationTest(String name, String actions)
+        throws Exception {
+
+        URLPermission out = new URLPermission(name, actions);
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream o = new ObjectOutputStream(baos);
+        o.writeObject(out);
+        ByteArrayInputStream bain = new ByteArrayInputStream(baos.toByteArray());
+        ObjectInputStream i = new ObjectInputStream(bain);
+        URLPermission in = (URLPermission)i.readObject();
+        if (!in.equals(out)) {
+            System.out.println ("FAIL");
+            System.out.println ("in = " + in);
+            System.out.println ("out = " + out);
+            failed = true;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/URLTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.net.URLPermission;
+/*
+ * Run the tests once without security manager and once with
+ *
+ * @test
+ * @bug 8010464
+ * @compile ../../../com/sun/net/httpserver/SimpleSSLContext.java
+ * @run main/othervm/policy=policy.1 URLTest one
+ * @run main/othervm URLTest one
+ * @run main/othervm/policy=policy.2 URLTest two
+ * @run main/othervm URLTest two
+ * @run main/othervm/policy=policy.3 URLTest three
+ * @run main/othervm URLTest three
+ */
+
+import java.net.*;
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.logging.*;
+import com.sun.net.httpserver.*;
+import javax.net.ssl.*;
+
+public class URLTest {
+    static boolean failed = false;
+
+    public static void main (String[] args) throws Exception {
+        boolean no = false, yes = true;
+
+        if (System.getSecurityManager() == null) {
+            yes = false;
+        }
+        createServers();
+        InetSocketAddress addr1 = httpServer.getAddress();
+        int port1 = addr1.getPort();
+        InetSocketAddress addr2 = httpsServer.getAddress();
+        int port2 = addr2.getPort();
+
+          // each of the following cases is run with a different policy file
+
+        switch (args[0]) {
+          case "one":
+            String url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
+            String url2 = "https://127.0.0.1:"+ port2 + "/foo.html";
+            String url3 = "http://127.0.0.1:"+ port1 + "/bar.html";
+            String url4 = "https://127.0.0.1:"+ port2 + "/bar.html";
+
+            // simple positive test. Should succceed
+            test(url1, "GET", "X-Foo", no);
+            test(url1, "GET", "Z-Bar", "X-Foo", no);
+            test(url1, "GET", "X-Foo", "Z-Bar", no);
+            test(url1, "GET", "Z-Bar", no);
+            test(url2, "POST", "X-Fob", no);
+
+            // reverse the methods, should fail
+            test(url1, "POST", "X-Foo", yes);
+            test(url2, "GET", "X-Fob", yes);
+
+            // different URLs, should fail
+            test(url3, "GET", "X-Foo", yes);
+            test(url4, "POST", "X-Fob", yes);
+            break;
+
+          case "two":
+            url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
+            url2 = "https://127.0.0.1:"+ port2 + "/foo.html";
+            url3 = "http://127.0.0.1:"+ port1 + "/bar.html";
+            url4 = "https://127.0.0.1:"+ port2 + "/bar.html";
+
+            // simple positive test. Should succceed
+            test(url1, "GET", "X-Foo", no);
+            test(url2, "POST", "X-Fob", no);
+            test(url3, "GET", "X-Foo", no);
+            test(url4, "POST", "X-Fob", no);
+            break;
+
+          case "three":
+            url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
+            url2 = "https://127.0.0.1:"+ port2 + "/a/c/d/e/foo.html";
+            url3 = "http://127.0.0.1:"+ port1 + "/a/b/c";
+            url4 = "https://127.0.0.1:"+ port2 + "/a/b/c";
+
+            test(url1, "GET", "X-Foo", yes);
+            test(url2, "POST", "X-Zxc", no);
+            test(url3, "DELETE", "Y-Foo", no);
+            test(url4, "POST", "Y-Foo", yes);
+            break;
+        }
+        shutdown();
+        if (failed) {
+            throw new RuntimeException("Test failed");
+        }
+    }
+
+    public static void test (
+        String u, String method,
+        String header, boolean exceptionExpected
+    )
+        throws Exception
+    {
+        test(u, method, header, null, exceptionExpected);
+    }
+
+    public static void test (
+        String u, String method,
+        String header1, String header2, boolean exceptionExpected
+    )
+        throws Exception
+    {
+        URL url = new URL(u);
+        System.out.println ("url=" + u + " method="+method + " header1="+header1
+                +" header2 = " + header2
+                +" exceptionExpected="+exceptionExpected);
+        HttpURLConnection urlc = (HttpURLConnection)url.openConnection();
+        if (urlc instanceof HttpsURLConnection) {
+            HttpsURLConnection ssl = (HttpsURLConnection)urlc;
+            ssl.setHostnameVerifier(new HostnameVerifier() {
+                public boolean verify(String host, SSLSession sess) {
+                    return true;
+                }
+            });
+            ssl.setSSLSocketFactory (ctx.getSocketFactory());
+        }
+        urlc.setRequestMethod(method);
+        if (header1 != null) {
+            urlc.addRequestProperty(header1, "foo");
+        }
+        if (header2 != null) {
+            urlc.addRequestProperty(header2, "bar");
+        }
+        try {
+            int g = urlc.getResponseCode();
+            if (exceptionExpected) {
+                failed = true;
+                System.out.println ("FAIL");
+                return;
+            }
+            if (g != 200) {
+                String s = Integer.toString(g);
+                throw new RuntimeException("unexpected response "+ s);
+            }
+            InputStream is = urlc.getInputStream();
+            int c,count=0;
+            byte[] buf = new byte[1024];
+            while ((c=is.read(buf)) != -1) {
+                count += c;
+            }
+            is.close();
+        } catch (RuntimeException e) {
+            if (! (e instanceof SecurityException) &&
+                        !(e.getCause() instanceof SecurityException)  ||
+                        !exceptionExpected)
+            {
+                System.out.println ("FAIL");
+                //e.printStackTrace();
+                failed = true;
+            }
+        }
+        System.out.println ("OK");
+    }
+
+    static HttpServer httpServer;
+    static HttpsServer httpsServer;
+    static HttpContext c, cs;
+    static ExecutorService e, es;
+    static SSLContext ctx;
+
+    // These ports need to be hard-coded until we support port number
+    // ranges in the permission class
+
+    static final int PORT1 = 12567;
+    static final int PORT2 = 12568;
+
+    static void createServers() throws Exception {
+        InetSocketAddress addr1 = new InetSocketAddress (PORT1);
+        InetSocketAddress addr2 = new InetSocketAddress (PORT2);
+        httpServer = HttpServer.create (addr1, 0);
+        httpsServer = HttpsServer.create (addr2, 0);
+
+        MyHandler h = new MyHandler();
+
+        c = httpServer.createContext ("/", h);
+        cs = httpsServer.createContext ("/", h);
+        e = Executors.newCachedThreadPool();
+        es = Executors.newCachedThreadPool();
+        httpServer.setExecutor (e);
+        httpsServer.setExecutor (es);
+
+        // take the keystore from elsewhere in test hierarchy
+        String keysdir = System.getProperty("test.src")
+                + "/../../../com/sun/net/httpserver/";
+        ctx = new SimpleSSLContext(keysdir).get();
+        httpsServer.setHttpsConfigurator(new HttpsConfigurator (ctx));
+
+        httpServer.start();
+        httpsServer.start();
+    }
+
+    static void shutdown() {
+        httpServer.stop(1);
+        httpsServer.stop(1);
+        e.shutdown();
+        es.shutdown();
+    }
+
+    static class MyHandler implements HttpHandler {
+
+        MyHandler() {
+        }
+
+        public void handle(HttpExchange x) throws IOException {
+            x.sendResponseHeaders(200, -1);
+            x.close();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/policy.1	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,48 @@
+//
+// Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+//
+// This code is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License version 2 only, as
+// published by the Free Software Foundation.
+//
+// This code is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// version 2 for more details (a copy is included in the LICENSE file that
+// accompanied this code).
+//
+// You should have received a copy of the GNU General Public License version
+// 2 along with this work; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// Please 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://127.0.0.1:12567/foo.html", "GET:X-Foo,Z-Bar";
+    permission java.net.URLPermission "https://127.0.0.1:12568/foo.html", "POST:X-Fob,T-Bar";
+
+    // needed for HttpServer
+    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
+    permission "java.util.PropertyPermission" "test.src", "read";
+    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
+
+    //permission "java.util.logging.LoggingPermission" "control";
+    //permission "java.io.FilePermission" "/tmp/-", "read,write";
+    permission "java.lang.RuntimePermission" "modifyThread";
+    permission "java.lang.RuntimePermission" "setFactory";
+};
+
+// 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/net/URLPermission/policy.2	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,46 @@
+//
+// 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://127.0.0.1:12567/*", "GET:X-Foo";
+    permission java.net.URLPermission "https://127.0.0.1:12568/*", "POST:X-Fob";
+
+    // needed for HttpServer
+    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
+    permission "java.util.PropertyPermission" "test.src", "read";
+    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
+
+    //permission "java.util.logging.LoggingPermission" "control";
+    //permission "java.io.FilePermission" "/tmp/-", "read,write";
+    permission "java.lang.RuntimePermission" "modifyThread";
+    permission "java.lang.RuntimePermission" "setFactory";
+};
+
+grant codeBase "file:${{java.ext.dirs}}/*" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:///export/repos/jdk8/build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/jre/lib/rt.jar" {
+        permission java.security.AllPermission;
+};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URLPermission/policy.3	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,48 @@
+//
+// Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+//
+// This code is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License version 2 only, as
+// published by the Free Software Foundation.
+//
+// This code is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// version 2 for more details (a copy is included in the LICENSE file that
+// accompanied this code).
+//
+// You should have received a copy of the GNU General Public License version
+// 2 along with this work; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// Please 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://127.0.0.1:12567/a/b/-", "DELETE,GET:X-Foo,Y-Foo";
+    permission java.net.URLPermission "https://127.0.0.1:12568/a/c/-", "POST:*";
+
+    // needed for HttpServer
+    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
+    permission "java.util.PropertyPermission" "test.src", "read";
+    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
+
+    //permission "java.util.logging.LoggingPermission" "control";
+    //permission "java.io.FilePermission" "/tmp/-", "read,write";
+    permission "java.lang.RuntimePermission" "modifyThread";
+    permission "java.lang.RuntimePermission" "setFactory";
+};
+
+// 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;
+};
+
--- a/test/java/nio/file/Files/BytesAndLines.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/nio/file/Files/BytesAndLines.java	Fri Oct 25 10:39:13 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,262 +22,318 @@
  */
 
 /* @test
- * @bug 7006126 8020669 8024788
+ * @bug 7006126 8020669 8024788 8019526
  * @build BytesAndLines PassThroughFileSystem
- * @run main BytesAndLines
+ * @run testng BytesAndLines
  * @summary Unit test for methods for Files readAllBytes, readAllLines and
  *     and write methods.
  */
 
-import java.nio.file.*;
-import static java.nio.file.Files.*;
-import java.io.*;
-import java.util.*;
-import java.nio.charset.*;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.OpenOption;
+import static java.nio.file.StandardOpenOption.*;
+import java.nio.charset.Charset;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.MalformedInputException;
+import java.nio.charset.UnmappableCharacterException;
+import static java.nio.charset.StandardCharsets.*;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.io.IOException;
 
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test(groups = "unit")
 public class BytesAndLines {
-    static final Random rand = new Random();
+
+    // data for text files
+    private static final String EN_STRING = "The quick brown fox jumps over the lazy dog";
+    private static final String JA_STRING = "\u65e5\u672c\u8a9e\u6587\u5b57\u5217";
 
-    static final Charset US_ASCII = Charset.forName("US-ASCII");
+    // used for random byte content
+    private static Random RAND = new Random();
+
+    // file used by most tests
+    private Path tmpfile;
 
-    public static void main(String[] args) throws IOException {
-        testReadAndWriteBytes();
-        testReadLines();
-        testWriteLines();
+    @BeforeClass
+    void setup() throws IOException {
+        tmpfile = Files.createTempFile("blah", null);
+    }
+
+    @AfterClass
+    void cleanup() throws IOException {
+        Files.deleteIfExists(tmpfile);
+    }
+
+    /**
+     * Returns a byte[] of the given size with random content
+     */
+    private byte[] genBytes(int size) {
+        byte[] arr = new byte[size];
+        RAND.nextBytes(arr);
+        return arr;
     }
 
     /**
-     * Test readAllBytes(Path) and write(Path, byte[], OpenOption...)
+     * Exercise NullPointerException
      */
-    static void testReadAndWriteBytes() throws IOException {
-        // exercise methods with various sizes
-        testReadAndWriteBytes(0);
-        for (int i=0; i<100; i++) {
-            testReadAndWriteBytes(rand.nextInt(32000));
-        }
-
-        // NullPointerException
+    public void testNulls() {
         Path file = Paths.get("foo");
+        byte[] bytes = new byte[100];
         List<String> lines = Collections.emptyList();
-        try {
-            readAllBytes(null);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-        try {
-            write(null, lines, Charset.defaultCharset());
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-        try {
-            write(file, null, Charset.defaultCharset());
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
+
+        checkNullPointerException(() -> Files.readAllBytes(null));
+
+        checkNullPointerException(() -> Files.write(null, bytes));
+        checkNullPointerException(() -> Files.write(file, (byte[])null));
+        checkNullPointerException(() -> Files.write(file, bytes, (OpenOption[])null));
+        checkNullPointerException(() -> Files.write(file, bytes, new OpenOption[] { null } ));
+
+        checkNullPointerException(() -> Files.readAllLines(null));
+        checkNullPointerException(() -> Files.readAllLines(file, (Charset)null));
+        checkNullPointerException(() -> Files.readAllLines(null, Charset.defaultCharset()));
+
+        checkNullPointerException(() -> Files.write(null, lines));
+        checkNullPointerException(() -> Files.write(file, (List<String>)null));
+        checkNullPointerException(() -> Files.write(file, lines, (OpenOption[])null));
+        checkNullPointerException(() -> Files.write(file, lines, new OpenOption[] { null } ));
+        checkNullPointerException(() -> Files.write(null, lines, Charset.defaultCharset()));
+        checkNullPointerException(() -> Files.write(file, null, Charset.defaultCharset()));
+        checkNullPointerException(() -> Files.write(file, lines, (Charset)null));
+        checkNullPointerException(() -> Files.write(file, lines, Charset.defaultCharset(), (OpenOption[])null));
+        checkNullPointerException(() -> Files.write(file, lines, Charset.defaultCharset(), new OpenOption[] { null } ));
+    }
+
+    private void checkNullPointerException(Callable<?> c) {
         try {
-            write(file, lines, null);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-        try {
-            write(file, lines, Charset.defaultCharset(), (OpenOption[])null);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-        try {
-            OpenOption[] opts = { null };
-            write(file, lines, Charset.defaultCharset(), opts);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-
-        // read from procfs
-        if (System.getProperty("os.name").equals("Linux")) {
-            // Refer to the Linux proc(5) man page for details about /proc/self/stat file
-            // procfs reports it to be zero sized, even though data can be read from it
-            String statFile = "/proc/self/stat";
-            Path pathStat = Paths.get(statFile);
-            byte[] data = Files.readAllBytes(pathStat);
-            assertTrue(data.length > 0, "Files.readAllBytes('" + statFile + "') failed to read");
-        }
-
-        // test readAllBytes on custom file system
-        Path myfile = PassThroughFileSystem.create().getPath(file.toString());
-        for (int size=0; size<=1024; size+=512) {
-            byte[] b1 = new byte[size];
-            rand.nextBytes(b1);
-            Files.write(myfile, b1);
-            byte[] b2 = Files.readAllBytes(myfile);
-            assertTrue(Arrays.equals(b1, b2), "bytes not equal");
+            c.call();
+            fail("NullPointerException expected");
+        } catch (NullPointerException ignore) {
+        } catch (Exception e) {
+            fail(e + " not expected");
         }
     }
 
-
-    static void testReadAndWriteBytes(int size) throws IOException {
-        Path path = createTempFile("blah", null);
-        try {
-            boolean append = rand.nextBoolean();
-
-            byte[] b1 = new byte[size];
-            rand.nextBytes(b1);
+    /**
+     * Exercise Files.readAllBytes(Path) on varied file sizes
+     */
+    public void testReadAllBytes() throws IOException {
+        int size = 0;
+        while (size <= 16*1024) {
+            testReadAllBytes(size);
+            size += 512;
+        }
+    }
 
-            byte[] b2 = (append) ? new byte[size] : new byte[0];
-            rand.nextBytes(b2);
-
-            // write method should create file if it doesn't exist
-            if (rand.nextBoolean())
-                delete(path);
-
-            // write bytes to file
-            Path target = write(path, b1);
-            assertTrue(target==path, "Unexpected path");
-            assertTrue(size(path) == b1.length, "Unexpected file size");
+    private void testReadAllBytes(int size) throws IOException {
+        // write bytes to file (random content)
+        byte[] expected = genBytes(size);
+        Files.write(tmpfile, expected);
 
-            // append bytes to file (might be 0 bytes)
-            write(path, b2, StandardOpenOption.APPEND);
-            assertTrue(size(path) == b1.length + b2.length, "Unexpected file size");
-
-            // read entire file
-            byte[] read = readAllBytes(path);
+        // check expected bytes are read
+        byte[] read = Files.readAllBytes(tmpfile);
+        assertTrue(Arrays.equals(read, expected), "Bytes read not the same as written");
+    }
 
-            // check bytes are correct
-            byte[] expected;
-            if (append) {
-                expected = new byte[b1.length + b2.length];
-                System.arraycopy(b1, 0, expected, 0, b1.length);
-                System.arraycopy(b2, 0, expected, b1.length, b2.length);
-            } else {
-                expected = b1;
-            }
-            assertTrue(Arrays.equals(read, expected),
-                       "Bytes read not the same as bytes written");
-        } finally {
-            deleteIfExists(path);
+    /**
+     * Linux specific test to exercise Files.readAllBytes on /proc. This is
+     * special because file sizes are reported as 0 even though the file
+     * has content.
+     */
+    public void testReadAllBytesOnProcFS() throws IOException {
+        // read from procfs
+        if (System.getProperty("os.name").equals("Linux")) {
+            Path statFile = Paths.get("/proc/self/stat");
+            byte[] data = Files.readAllBytes(statFile);
+            assertTrue(data.length > 0, "Files.readAllBytes('" + statFile + "') failed to read");
         }
     }
 
     /**
-     * Test readAllLines(Path,Charset)
+     * Exercise Files.readAllBytes(Path) on custom file system. This is special
+     * because readAllBytes was originally implemented to use FileChannel
+     * and so may not be supported by custom file system providers.
      */
-    static void testReadLines() throws IOException {
-        Path tmpfile = createTempFile("blah", "txt");
+    public void testReadAllBytesOnCustomFS() throws IOException {
+        Path myfile = PassThroughFileSystem.create().getPath("myfile");
         try {
-            List<String> lines;
-
-            // zero lines
-            assertTrue(size(tmpfile) == 0, "File should be empty");
-            lines = readAllLines(tmpfile, US_ASCII);
-            assertTrue(lines.isEmpty(), "No line expected");
-
-            // one line
-            byte[] hi = { (byte)'h', (byte)'i' };
-            write(tmpfile, hi);
-            lines = readAllLines(tmpfile, US_ASCII);
-            assertTrue(lines.size() == 1, "One line expected");
-            assertTrue(lines.get(0).equals("hi"), "'Hi' expected");
-
-            // two lines using platform's line separator
-            List<String> expected = Arrays.asList("hi", "there");
-            write(tmpfile, expected, US_ASCII);
-            assertTrue(size(tmpfile) > 0, "File is empty");
-            lines = readAllLines(tmpfile, US_ASCII);
-            assertTrue(lines.equals(expected), "Unexpected lines");
-
-            // MalformedInputException
-            byte[] bad = { (byte)0xff, (byte)0xff };
-            write(tmpfile, bad);
-            try {
-                readAllLines(tmpfile, US_ASCII);
-                throw new RuntimeException("MalformedInputException expected");
-            } catch (MalformedInputException ignore) { }
-
-
-            // NullPointerException
-            try {
-                readAllLines(null, US_ASCII);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                readAllLines(tmpfile, null);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-
-            // read from procfs
-            if (System.getProperty("os.name").equals("Linux")) {
-                // Refer to the Linux proc(5) man page for details about /proc/self/status file
-                // procfs reports this file to be zero sized, even though data can be read from it
-                String statusFile = "/proc/self/status";
-                Path pathStatus = Paths.get(statusFile);
-                lines = Files.readAllLines(pathStatus, US_ASCII);
-                assertTrue(lines.size() > 0, "Files.readAllLines('" + pathStatus + "') failed to read");
+            int size = 0;
+            while (size <= 1024) {
+                byte[] b1 = genBytes(size);
+                Files.write(myfile, b1);
+                byte[] b2 = Files.readAllBytes(myfile);
+                assertTrue(Arrays.equals(b1, b2), "bytes not equal");
+                size += 512;
             }
-
         } finally {
-            delete(tmpfile);
+            Files.deleteIfExists(myfile);
         }
     }
 
     /**
-     * Test write(Path,Iterable<? extends CharSequence>,Charset,OpenOption...)
+     * Exercise Files.write(Path, byte[], OpenOption...) on various sizes
      */
-    static void testWriteLines() throws IOException {
-        Path tmpfile = createTempFile("blah", "txt");
-        try {
-            // write method should create file if it doesn't exist
-            if (rand.nextBoolean())
-                delete(tmpfile);
-
-            // zero lines
-            Path result = write(tmpfile, Collections.<String>emptyList(), US_ASCII);
-            assert(size(tmpfile) == 0);
-            assert(result == tmpfile);
-
-            // two lines
-            List<String> lines = Arrays.asList("hi", "there");
-            write(tmpfile, lines, US_ASCII);
-            List<String> actual = readAllLines(tmpfile, US_ASCII);
-            assertTrue(actual.equals(lines), "Unexpected lines");
-
-            // append two lines
-            write(tmpfile, lines, US_ASCII, StandardOpenOption.APPEND);
-            List<String> expected = new ArrayList<String>();
-            expected.addAll(lines);
-            expected.addAll(lines);
-            assertTrue(expected.size() == 4, "List should have 4 elements");
-            actual = readAllLines(tmpfile, US_ASCII);
-            assertTrue(actual.equals(expected), "Unexpected lines");
-
-            // UnmappableCharacterException
-            try {
-                String s = "\u00A0\u00A1";
-                write(tmpfile, Arrays.asList(s), US_ASCII);
-                throw new RuntimeException("UnmappableCharacterException expected");
-            } catch (UnmappableCharacterException ignore) { }
-
-            // NullPointerException
-            try {
-                write(null, lines, US_ASCII);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                write(tmpfile, null, US_ASCII);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                write(tmpfile, lines, null);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                write(tmpfile, lines, US_ASCII, (OpenOption[])null);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                OpenOption[] opts = { (OpenOption)null };
-                write(tmpfile, lines, US_ASCII, opts);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-
-        } finally {
-            delete(tmpfile);
+    public void testWriteBytes() throws IOException {
+        int size = 0;
+        while (size < 16*1024) {
+            testWriteBytes(size, false);
+            testWriteBytes(size, true);
+            size += 512;
         }
     }
 
-    static void assertTrue(boolean expr, String errmsg) {
-        if (!expr)
-            throw new RuntimeException(errmsg);
+    private void testWriteBytes(int size, boolean append) throws IOException {
+        byte[] bytes = genBytes(size);
+        Path result = Files.write(tmpfile, bytes);
+        assertTrue(result == tmpfile);
+        if (append) {
+            Files.write(tmpfile, bytes, APPEND);
+            assertTrue(Files.size(tmpfile) == size*2);
+        }
+
+        byte[] expected;
+        if (append) {
+            expected = new byte[size << 1];
+            System.arraycopy(bytes, 0, expected, 0, bytes.length);
+            System.arraycopy(bytes, 0, expected, bytes.length, bytes.length);
+        } else {
+            expected = bytes;
+        }
+
+        byte[] read = Files.readAllBytes(tmpfile);
+        assertTrue(Arrays.equals(read, expected), "Bytes read not the same as written");
+    }
+
+    /**
+     * Exercise Files.readAllLines(Path, Charset)
+     */
+    public void testReadAllLines() throws IOException {
+        // zero lines
+        Files.write(tmpfile, new byte[0]);
+        List<String> lines = Files.readAllLines(tmpfile, US_ASCII);
+            assertTrue(lines.isEmpty(), "No line expected");
+
+        // one line
+        byte[] hi = { (byte)'h', (byte)'i' };
+        Files.write(tmpfile, hi);
+        lines = Files.readAllLines(tmpfile, US_ASCII);
+        assertTrue(lines.size() == 1, "One line expected");
+        assertTrue(lines.get(0).equals("hi"), "'Hi' expected");
+
+        // two lines using platform's line separator
+        List<String> expected = Arrays.asList("hi", "there");
+        Files.write(tmpfile, expected, US_ASCII);
+        assertTrue(Files.size(tmpfile) > 0, "File is empty");
+        lines = Files.readAllLines(tmpfile, US_ASCII);
+        assertTrue(lines.equals(expected), "Unexpected lines");
+
+        // MalformedInputException
+        byte[] bad = { (byte)0xff, (byte)0xff };
+        Files.write(tmpfile, bad);
+        try {
+            Files.readAllLines(tmpfile, US_ASCII);
+            fail("MalformedInputException expected");
+        } catch (MalformedInputException ignore) { }
+    }
+
+    /**
+     * Linux specific test to exercise Files.readAllLines(Path) on /proc. This
+     * is special because file sizes are reported as 0 even though the file
+     * has content.
+     */
+    public void testReadAllLinesOnProcFS() throws IOException {
+        if (System.getProperty("os.name").equals("Linux")) {
+            Path statFile = Paths.get("/proc/self/stat");
+            List<String> lines = Files.readAllLines(statFile);
+            assertTrue(lines.size() > 0, "Files.readAllLines('" + statFile + "') failed to read");
+        }
+    }
+
+    /**
+     * Exercise Files.readAllLines(Path)
+     */
+    public void testReadAllLinesUTF8() throws IOException {
+        Files.write(tmpfile, encodeAsUTF8(EN_STRING + "\n" + JA_STRING));
+
+        List<String> lines = Files.readAllLines(tmpfile);
+        assertTrue(lines.size() == 2, "Read " + lines.size() + " lines instead of 2");
+        assertTrue(lines.get(0).equals(EN_STRING));
+        assertTrue(lines.get(1).equals(JA_STRING));
+
+        // a sample of malformed sequences
+        testReadAllLinesMalformedUTF8((byte)0xFF); // one-byte sequence
+        testReadAllLinesMalformedUTF8((byte)0xC0, (byte)0x80);  // invalid first byte
+        testReadAllLinesMalformedUTF8((byte)0xC2, (byte)0x00); // invalid second byte
+    }
+
+    private byte[] encodeAsUTF8(String s) throws CharacterCodingException {
+        // not using s.getBytes here so as to catch unmappable characters
+        ByteBuffer bb = UTF_8.newEncoder().encode(CharBuffer.wrap(s));
+        byte[] result = new byte[bb.limit()];
+        bb.get(result);
+        assertTrue(bb.remaining() == 0);
+        return result;
+    }
+
+    private void testReadAllLinesMalformedUTF8(byte... bytes) throws IOException {
+        Files.write(tmpfile, bytes);
+        try {
+            Files.readAllLines(tmpfile);
+            fail("MalformedInputException expected");
+        } catch (MalformedInputException ignore) { }
+    }
+
+    /**
+     * Exercise Files.write(Path, Iterable<? extends CharSequence>, Charset, OpenOption...)
+     */
+    public void testWriteLines() throws IOException {
+        // zero lines
+        Path result = Files.write(tmpfile, Collections.<String>emptyList(), US_ASCII);
+        assert(Files.size(tmpfile) == 0);
+        assert(result == tmpfile);
+
+        // two lines
+        List<String> lines = Arrays.asList("hi", "there");
+        Files.write(tmpfile, lines, US_ASCII);
+        List<String> actual = Files.readAllLines(tmpfile, US_ASCII);
+        assertTrue(actual.equals(lines), "Unexpected lines");
+
+        // append two lines
+        Files.write(tmpfile, lines, US_ASCII, APPEND);
+        List<String> expected = new ArrayList<>();
+        expected.addAll(lines);
+        expected.addAll(lines);
+        assertTrue(expected.size() == 4, "List should have 4 elements");
+        actual = Files.readAllLines(tmpfile, US_ASCII);
+        assertTrue(actual.equals(expected), "Unexpected lines");
+
+        // UnmappableCharacterException
+        try {
+            String s = "\u00A0\u00A1";
+            Files.write(tmpfile, Arrays.asList(s), US_ASCII);
+            fail("UnmappableCharacterException expected");
+        } catch (UnmappableCharacterException ignore) { }
+    }
+
+    /**
+     * Exercise Files.write(Path, Iterable<? extends CharSequence>, OpenOption...)
+     */
+    public void testWriteLinesUTF8() throws IOException {
+        List<String> lines = Arrays.asList(EN_STRING, JA_STRING);
+        Files.write(tmpfile, lines);
+        List<String> actual = Files.readAllLines(tmpfile, UTF_8);
+        assertTrue(actual.equals(lines), "Unexpected lines");
     }
 }
--- a/test/java/nio/file/Files/StreamTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/nio/file/Files/StreamTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -22,11 +22,10 @@
  */
 
 /* @test
- * @bug 8006884
- * @summary Unit test for java.nio.file.Files
- * @library ..
+ * @bug 8006884 8019526
  * @build PassThroughFileSystem FaultyFileSystem
  * @run testng StreamTest
+ * @summary Unit test for java.nio.file.Files methods that return a Stream
  */
 
 import java.io.IOException;
@@ -43,11 +42,13 @@
 import java.nio.file.Paths;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
 import java.util.TreeSet;
+import java.util.concurrent.Callable;
 import java.util.function.BiPredicate;
 import java.util.stream.Stream;
 import java.util.stream.Collectors;
@@ -316,56 +317,80 @@
         try {
             // zero lines
             assertTrue(Files.size(tmpfile) == 0, "File should be empty");
+            try (Stream<String> s = Files.lines(tmpfile)) {
+                checkLines(s, Collections.emptyList());
+            }
             try (Stream<String> s = Files.lines(tmpfile, US_ASCII)) {
-                assertEquals(s.mapToInt(l -> 1).reduce(0, Integer::sum), 0, "No line expected");
+                checkLines(s, Collections.emptyList());
             }
 
             // one line
-            byte[] hi = { (byte)'h', (byte)'i' };
-            Files.write(tmpfile, hi);
+            List<String> oneLine = Arrays.asList("hi");
+            Files.write(tmpfile, oneLine, US_ASCII);
+            try (Stream<String> s = Files.lines(tmpfile)) {
+                checkLines(s, oneLine);
+            }
             try (Stream<String> s = Files.lines(tmpfile, US_ASCII)) {
-                List<String> lines = s.collect(Collectors.toList());
-                assertTrue(lines.size() == 1, "One line expected");
-                assertTrue(lines.get(0).equals("hi"), "'Hi' expected");
+                checkLines(s, oneLine);
             }
 
             // two lines using platform's line separator
-            List<String> expected = Arrays.asList("hi", "there");
-            Files.write(tmpfile, expected, US_ASCII);
-            assertTrue(Files.size(tmpfile) > 0, "File is empty");
+            List<String> twoLines = Arrays.asList("hi", "there");
+            Files.write(tmpfile, twoLines, US_ASCII);
+            try (Stream<String> s = Files.lines(tmpfile)) {
+                checkLines(s, twoLines);
+            }
             try (Stream<String> s = Files.lines(tmpfile, US_ASCII)) {
-                List<String> lines = s.collect(Collectors.toList());
-                assertTrue(lines.equals(expected), "Unexpected lines");
+                checkLines(s, twoLines);
             }
 
             // MalformedInputException
             byte[] bad = { (byte)0xff, (byte)0xff };
             Files.write(tmpfile, bad);
+            try (Stream<String> s = Files.lines(tmpfile)) {
+                checkMalformedInputException(s);
+            }
             try (Stream<String> s = Files.lines(tmpfile, US_ASCII)) {
-                try {
-                    List<String> lines = s.collect(Collectors.toList());
-                    throw new RuntimeException("UncheckedIOException expected");
-                } catch (UncheckedIOException ex) {
-                    assertTrue(ex.getCause() instanceof MalformedInputException,
-                               "MalformedInputException expected");
-                }
+                checkMalformedInputException(s);
             }
 
             // NullPointerException
-            try {
-                Files.lines(null, US_ASCII);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                Files.lines(tmpfile, null);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
+            checkNullPointerException(() -> Files.lines(null));
+            checkNullPointerException(() -> Files.lines(null, US_ASCII));
+            checkNullPointerException(() -> Files.lines(tmpfile, null));
 
         } finally {
             Files.delete(tmpfile);
         }
     }
 
+    private void checkLines(Stream<String> s, List<String> expected) {
+        List<String> lines = s.collect(Collectors.toList());
+        assertTrue(lines.size() == expected.size(), "Unexpected number of lines");
+        assertTrue(lines.equals(expected), "Unexpected content");
+    }
+
+    private void checkMalformedInputException(Stream<String> s) {
+        try {
+            List<String> lines = s.collect(Collectors.toList());
+            fail("UncheckedIOException expected");
+        } catch (UncheckedIOException ex) {
+            IOException cause = ex.getCause();
+            assertTrue(cause instanceof MalformedInputException,
+                "MalformedInputException expected");
+        }
+    }
+
+    private void checkNullPointerException(Callable<?> c) {
+        try {
+            c.call();
+            fail("NullPointerException expected");
+        } catch (NullPointerException ignore) {
+        } catch (Exception e) {
+            fail(e + " not expected");
+        }
+    }
+
     public void testDirectoryIteratorException() throws IOException {
         Path dir = testFolder.resolve("dir2");
         Path trigger = dir.resolve("DirectoryIteratorException");
--- a/test/java/time/tck/java/time/TCKDayOfWeek.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKDayOfWeek.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKInstant.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKLocalDate.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKLocalDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKLocalTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKMonth.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKMonthDay.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKOffsetDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKOffsetTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKYear.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKYearMonth.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKZoneId.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -559,7 +560,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKZoneOffset.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TCKZonedDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/TestIsoChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/chrono/CopticChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/chrono/CopticDate.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/chrono/TCKIsoChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/TCKDateTimeFormatterBuilder.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java	Fri Oct 25 10:39:13 2013 -0700
@@ -190,8 +190,69 @@
 
     //-----------------------------------------------------------------------
     @Test(expectedExceptions=NullPointerException.class)
-    public void test_appendValueReduced_null() throws Exception {
-        builder.appendValueReduced(null, 2, 2000);
+    public void test_appendValueReduced_int_nullField() throws Exception {
+        builder.appendValueReduced(null, 2, 2, 2000);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_int_minWidthTooSmall() throws Exception {
+        builder.appendValueReduced(YEAR, 0, 2, 2000);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_int_minWidthTooBig() throws Exception {
+        builder.appendValueReduced(YEAR, 11, 2, 2000);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_int_maxWidthTooSmall() throws Exception {
+        builder.appendValueReduced(YEAR, 2, 0, 2000);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_int_maxWidthTooBig() throws Exception {
+        builder.appendValueReduced(YEAR, 2, 11, 2000);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_int_maxWidthLessThanMin() throws Exception {
+        builder.appendValueReduced(YEAR, 2, 1, 2000);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_appendValueReduced_date_nullField() throws Exception {
+        builder.appendValueReduced(null, 2, 2, LocalDate.of(2000, 1, 1));
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_appendValueReduced_date_nullDate() throws Exception {
+        builder.appendValueReduced(YEAR, 2, 2, null);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_date_minWidthTooSmall() throws Exception {
+        builder.appendValueReduced(YEAR, 0, 2, LocalDate.of(2000, 1, 1));
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_date_minWidthTooBig() throws Exception {
+        builder.appendValueReduced(YEAR, 11, 2, LocalDate.of(2000, 1, 1));
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_date_maxWidthTooSmall() throws Exception {
+        builder.appendValueReduced(YEAR, 2, 0, LocalDate.of(2000, 1, 1));
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_date_maxWidthTooBig() throws Exception {
+        builder.appendValueReduced(YEAR, 2, 11, LocalDate.of(2000, 1, 1));
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_appendValueReduced_date_maxWidthLessThanMin() throws Exception {
+        builder.appendValueReduced(YEAR, 2, 1, LocalDate.of(2000, 1, 1));
     }
 
     //-----------------------------------------------------------------------
--- a/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -126,9 +127,10 @@
     @Test
     public void test_pattern_String() {
         DateTimeFormatter test = DateTimeFormatter.ofPattern("d MMM yyyy");
+        Locale fmtLocale = Locale.getDefault(Locale.Category.FORMAT);
         assertEquals(test.format(LocalDate.of(2012, 6, 30)), "30 " +
-                Month.JUNE.getDisplayName(TextStyle.SHORT, Locale.getDefault()) + " 2012");
-        assertEquals(test.getLocale(), Locale.getDefault());
+                Month.JUNE.getDisplayName(TextStyle.SHORT, fmtLocale) + " 2012");
+        assertEquals(test.getLocale(), fmtLocale, "Locale.Category.FORMAT");
     }
 
     @Test(expectedExceptions=IllegalArgumentException.class)
@@ -1404,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);
     }
 
     //-------------------------------------------------------------------------
@@ -1470,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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/temporal/TCKTemporalAdjusters.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/tck/java/time/temporal/TCKTemporalAdjusters.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestCharLiteralParser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/TestDateTimeFormatter.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestDateTimeFormatter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -61,12 +61,32 @@
 
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
 import static org.testng.Assert.assertSame;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
 
-import java.time.format.DecimalStyle;
+import java.time.DateTimeException;
+import java.time.DayOfWeek;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.Month;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.chrono.ThaiBuddhistChronology;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.DecimalStyle;
 import java.time.format.SignStyle;
+import java.time.temporal.TemporalAccessor;
 import java.util.Locale;
+import java.util.function.Function;
 
 import org.testng.annotations.Test;
 
@@ -87,4 +107,93 @@
         assertSame(test, base);
     }
 
+    @Test
+    public void test_parse_errorMessage() throws Exception {
+        assertGoodErrorDate(DayOfWeek::from, "DayOfWeek");
+        assertGoodErrorDate(Month::from, "Month");
+        assertGoodErrorDate(YearMonth::from, "YearMonth");
+        assertGoodErrorDate(MonthDay::from, "MonthDay");
+        assertGoodErrorDate(LocalDate::from, "LocalDate");
+        assertGoodErrorDate(LocalTime::from, "LocalTime");
+        assertGoodErrorDate(LocalDateTime::from, "LocalDateTime");
+        assertGoodErrorDate(OffsetTime::from, "OffsetTime");
+        assertGoodErrorDate(OffsetDateTime::from, "OffsetDateTime");
+        assertGoodErrorDate(ZonedDateTime::from, "ZonedDateTime");
+        assertGoodErrorDate(Instant::from, "Instant");
+        assertGoodErrorDate(ZoneOffset::from, "ZoneOffset");
+        assertGoodErrorDate(ZoneId::from, "ZoneId");
+        assertGoodErrorDate(ThaiBuddhistChronology.INSTANCE::date, "");
+
+        assertGoodErrorTime(DayOfWeek::from, "DayOfWeek");
+        assertGoodErrorTime(Month::from, "Month");
+        assertGoodErrorTime(Year::from, "Year");
+        assertGoodErrorTime(YearMonth::from, "YearMonth");
+        assertGoodErrorTime(MonthDay::from, "MonthDay");
+        assertGoodErrorTime(LocalDate::from, "LocalDate");
+        assertGoodErrorTime(LocalTime::from, "LocalTime");
+        assertGoodErrorTime(LocalDateTime::from, "LocalDateTime");
+        assertGoodErrorTime(OffsetTime::from, "OffsetTime");
+        assertGoodErrorTime(OffsetDateTime::from, "OffsetDateTime");
+        assertGoodErrorTime(ZonedDateTime::from, "ZonedDateTime");
+        assertGoodErrorTime(Instant::from, "Instant");
+        assertGoodErrorTime(ZoneOffset::from, "ZoneOffset");
+        assertGoodErrorTime(ZoneId::from, "ZoneId");
+        assertGoodErrorTime(ThaiBuddhistChronology.INSTANCE::date, "");
+    }
+
+    private void assertGoodErrorDate(Function<TemporalAccessor, Object> function, String expectedText) {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyy-mm-dd");
+        TemporalAccessor temporal = f.parse("2010-06-30");
+        try {
+            function.apply(temporal);
+            fail("Should have failed");
+        } catch (DateTimeException ex) {
+            String msg = ex.getMessage();
+            assertTrue(msg.contains(expectedText), msg);
+            assertTrue(msg.contains("Year"), msg);
+            assertTrue(msg.contains("MinuteOfHour"), msg);
+            assertTrue(msg.contains("DayOfMonth"), msg);
+        }
+    }
+
+    private void assertGoodErrorTime(Function<TemporalAccessor, Object> function, String expectedText) {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("HH:MM:ss");
+        TemporalAccessor temporal = f.parse("11:30:56");
+        try {
+            function.apply(temporal);
+            fail("Should have failed");
+        } catch (DateTimeException ex) {
+            String msg = ex.getMessage();
+            assertTrue(msg.contains(expectedText), msg);
+            assertTrue(msg.contains("HourOfDay"), msg);
+            assertTrue(msg.contains("MonthOfYear"), msg);
+            assertTrue(msg.contains("SecondOfMinute"), msg);
+        }
+    }
+
+    @Test
+    public void test_parsed_toString_resolvedTime() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("HH:mm:ss");
+        TemporalAccessor temporal = f.parse("11:30:56");
+        String msg = temporal.toString();
+        assertTrue(msg.contains("11:30:56"), msg);
+    }
+
+    @Test
+    public void test_parsed_toString_resolvedDate() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        TemporalAccessor temporal = f.parse("2010-06-30");
+        String msg = temporal.toString();
+        assertTrue(msg.contains("2010-06-30"), msg);
+    }
+
+    @Test
+    public void test_parsed_toString_resolvedDateTime() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        TemporalAccessor temporal = f.parse("2010-06-30 11:30:56");
+        String msg = temporal.toString();
+        assertTrue(msg.contains("2010-06-30"), msg);
+        assertTrue(msg.contains("11:30:56"), msg);
+    }
+
 }
--- a/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java	Fri Oct 25 10:39:13 2013 -0700
@@ -267,12 +267,12 @@
     //-----------------------------------------------------------------------
     @Test(expectedExceptions=NullPointerException.class)
     public void test_appendValueReduced_null() throws Exception {
-        builder.appendValueReduced(null, 2, 2000);
+        builder.appendValueReduced(null, 2, 2, 2000);
     }
 
     @Test
     public void test_appendValueReduced() throws Exception {
-        builder.appendValueReduced(YEAR, 2, 2000);
+        builder.appendValueReduced(YEAR, 2, 2, 2000);
         DateTimeFormatter f = builder.toFormatter();
         assertEquals(f.toString(), "ReducedValue(Year,2,2,2000)");
         TemporalAccessor parsed = f.parseUnresolved("12", new ParsePosition(0));
@@ -281,7 +281,7 @@
 
     @Test
     public void test_appendValueReduced_subsequent_parse() throws Exception {
-        builder.appendValue(MONTH_OF_YEAR, 1, 2, SignStyle.NORMAL).appendValueReduced(YEAR, 2, 2000);
+        builder.appendValue(MONTH_OF_YEAR, 1, 2, SignStyle.NORMAL).appendValueReduced(YEAR, 2, 2, 2000);
         DateTimeFormatter f = builder.toFormatter();
         assertEquals(f.toString(), "Value(MonthOfYear,1,2,NORMAL)ReducedValue(Year,2,2,2000)");
         ParsePosition ppos = new ParsePosition(0);
@@ -654,19 +654,19 @@
             {"GGGGG", "Text(Era,NARROW)"},
 
             {"u", "Value(Year)"},
-            {"uu", "ReducedValue(Year,2,2,2000)"},
+            {"uu", "ReducedValue(Year,2,2,2000-01-01)"},
             {"uuu", "Value(Year,3,19,NORMAL)"},
             {"uuuu", "Value(Year,4,19,EXCEEDS_PAD)"},
             {"uuuuu", "Value(Year,5,19,EXCEEDS_PAD)"},
 
             {"y", "Value(YearOfEra)"},
-            {"yy", "ReducedValue(YearOfEra,2,2,2000)"},
+            {"yy", "ReducedValue(YearOfEra,2,2,2000-01-01)"},
             {"yyy", "Value(YearOfEra,3,19,NORMAL)"},
             {"yyyy", "Value(YearOfEra,4,19,EXCEEDS_PAD)"},
             {"yyyyy", "Value(YearOfEra,5,19,EXCEEDS_PAD)"},
 
             {"Y", "Localized(WeekBasedYear)"},
-            {"YY", "Localized(ReducedValue(WeekBasedYear,2,2000))"},
+            {"YY", "Localized(ReducedValue(WeekBasedYear,2,2,2000-01-01))"},
             {"YYY", "Localized(WeekBasedYear,3,19,NORMAL)"},
             {"YYYY", "Localized(WeekBasedYear,4,19,EXCEEDS_PAD)"},
             {"YYYYY", "Localized(WeekBasedYear,5,19,EXCEEDS_PAD)"},
--- a/test/java/time/test/java/time/format/TestNonIsoFormatter.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestNonIsoFormatter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestNumberParser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestReducedParser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -64,11 +64,20 @@
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.assertNotNull;
 
 import java.text.ParsePosition;
+import java.time.LocalDate;
+import java.time.chrono.Chronology;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.ThaiBuddhistChronology;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.temporal.TemporalAccessor;
@@ -86,13 +95,17 @@
     private static final boolean LENIENT = false;
 
     private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) {
-        return builder.appendValueReduced(field, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
+        return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
     }
 
     private DateTimeFormatter getFormatter0(TemporalField field, int minWidth, int maxWidth, int baseValue) {
         return builder.appendValueReduced(field, minWidth, maxWidth, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
     }
 
+    private DateTimeFormatter getFormatterBaseDate(TemporalField field, int minWidth, int maxWidth, int baseValue) {
+        return builder.appendValueReduced(field, minWidth, maxWidth, LocalDate.of(baseValue, 1, 1)).toFormatter(locale).withDecimalStyle(decimalStyle);
+    }
+
     //-----------------------------------------------------------------------
     @DataProvider(name="error")
     Object[][] data_error() {
@@ -243,6 +256,10 @@
 
             // Negative baseValue
             {YEAR, 2, 4, -2005, "123", 0, strict(3, 123), lenient(3, 123)},
+
+            // Basics
+            {YEAR, 2, 4, 2010, "10", 0, strict(2, 2010), lenient(2, 2010)},
+            {YEAR, 2, 4, 2010, "09", 0, strict(2, 2109), lenient(2, 2109)},
         };
     }
 
@@ -264,6 +281,21 @@
         }
     }
 
+    @Test(dataProvider="ParseLenientSensitive")
+    public void test_parseStrict_baseDate(TemporalField field, int minWidth, int maxWidth, int baseValue, String input, int pos,
+                                 Pair strict, Pair lenient) {
+        ParsePosition ppos = new ParsePosition(pos);
+        setStrict(true);
+        TemporalAccessor parsed = getFormatterBaseDate(field, minWidth, maxWidth, baseValue).parseUnresolved(input, ppos);
+        if (ppos.getErrorIndex() != -1) {
+            assertEquals(ppos.getErrorIndex(), strict.parseLen, "error case parse position");
+            assertEquals(parsed, strict.parseVal, "unexpected parse result");
+        } else {
+            assertEquals(ppos.getIndex(), strict.parseLen, "parse position");
+            assertParsed(parsed, YEAR, strict.parseVal != null ? (long) strict.parseVal : null);
+        }
+    }
+
     //-----------------------------------------------------------------------
     // Parsing tests for lenient mode
     //-----------------------------------------------------------------------
@@ -282,6 +314,21 @@
         }
     }
 
+    @Test(dataProvider="ParseLenientSensitive")
+    public void test_parseLenient_baseDate(TemporalField field, int minWidth, int maxWidth, int baseValue, String input, int pos,
+                                  Pair strict, Pair lenient) {
+        ParsePosition ppos = new ParsePosition(pos);
+        setStrict(false);
+        TemporalAccessor parsed = getFormatterBaseDate(field, minWidth, maxWidth, baseValue).parseUnresolved(input, ppos);
+        if (ppos.getErrorIndex() != -1) {
+            assertEquals(ppos.getErrorIndex(), lenient.parseLen, "error case parse position");
+            assertEquals(parsed, lenient.parseVal, "unexpected parse result");
+        } else {
+            assertEquals(ppos.getIndex(), lenient.parseLen, "parse position");
+            assertParsed(parsed, YEAR, lenient.parseVal != null ? (long) lenient.parseVal : null);
+        }
+    }
+
     private void assertParsed(TemporalAccessor parsed, TemporalField field, Long value) {
         if (value == null) {
             assertEquals(parsed, null, "Parsed Value");
@@ -335,6 +382,68 @@
     }
 
     //-----------------------------------------------------------------------
+    // Cases and values in reduced value parsing mode
+    //-----------------------------------------------------------------------
+    @DataProvider(name="ReducedWithChrono")
+    Object[][] provider_reducedWithChrono() {
+        LocalDate baseYear = LocalDate.of(2000, 1, 1);
+        return new Object[][] {
+            {IsoChronology.INSTANCE.date(baseYear)},
+            {IsoChronology.INSTANCE.date(baseYear).plus(1, YEARS)},
+            {IsoChronology.INSTANCE.date(baseYear).plus(99, YEARS)},
+            {HijrahChronology.INSTANCE.date(baseYear)},
+            {HijrahChronology.INSTANCE.date(baseYear).plus(1, YEARS)},
+            {HijrahChronology.INSTANCE.date(baseYear).plus(99, YEARS)},
+            {JapaneseChronology.INSTANCE.date(baseYear)},
+            {JapaneseChronology.INSTANCE.date(baseYear).plus(1, YEARS)},
+            {JapaneseChronology.INSTANCE.date(baseYear).plus(99, YEARS)},
+            {MinguoChronology.INSTANCE.date(baseYear)},
+            {MinguoChronology.INSTANCE.date(baseYear).plus(1, YEARS)},
+            {MinguoChronology.INSTANCE.date(baseYear).plus(99, YEARS)},
+            {ThaiBuddhistChronology.INSTANCE.date(baseYear)},
+            {ThaiBuddhistChronology.INSTANCE.date(baseYear).plus(1, YEARS)},
+            {ThaiBuddhistChronology.INSTANCE.date(baseYear).plus(99, YEARS)},
+        };
+    }
+
+    @Test(dataProvider="ReducedWithChrono")
+    public void test_reducedWithChronoYear(ChronoLocalDate date) {
+        Chronology chrono = date.getChronology();
+        DateTimeFormatter df
+                = new DateTimeFormatterBuilder().appendValueReduced(YEAR, 2, 2, LocalDate.of(2000, 1, 1))
+                .toFormatter()
+                .withChronology(chrono);
+        int expected = date.get(YEAR);
+        String input = df.format(date);
+
+        ParsePosition pos = new ParsePosition(0);
+        TemporalAccessor parsed = df.parseUnresolved(input, pos);
+        int actual = parsed.get(YEAR);
+        assertEquals(actual, expected,
+                String.format("Wrong date parsed, chrono: %s, input: %s",
+                chrono, input));
+
+    }
+    @Test(dataProvider="ReducedWithChrono")
+    public void test_reducedWithChronoYearOfEra(ChronoLocalDate date) {
+        Chronology chrono = date.getChronology();
+        DateTimeFormatter df
+                = new DateTimeFormatterBuilder().appendValueReduced(YEAR_OF_ERA, 2, 2, LocalDate.of(2000, 1, 1))
+                .toFormatter()
+                .withChronology(chrono);
+        int expected = date.get(YEAR_OF_ERA);
+        String input = df.format(date);
+
+        ParsePosition pos = new ParsePosition(0);
+        TemporalAccessor parsed = df.parseUnresolved(input, pos);
+        int actual = parsed.get(YEAR_OF_ERA);
+        assertEquals(actual, expected,
+                String.format("Wrong date parsed, chrono: %s, input: %s",
+                chrono, input));
+
+    }
+
+    //-----------------------------------------------------------------------
     // Class to structure the test data
     //-----------------------------------------------------------------------
 
--- a/test/java/time/test/java/time/format/TestReducedPrinter.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestReducedPrinter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -59,19 +59,15 @@
  */
 package test.java.time.format;
 
-import java.text.ParsePosition;
 import static java.time.temporal.ChronoField.YEAR;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 
 import java.time.DateTimeException;
 import java.time.LocalDate;
+import java.time.chrono.MinguoDate;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
-import static java.time.temporal.ChronoField.DAY_OF_MONTH;
-import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
-import static java.time.temporal.ChronoField.YEAR_OF_ERA;
-import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 
 import org.testng.annotations.DataProvider;
@@ -85,13 +81,17 @@
 public class TestReducedPrinter extends AbstractTestPrinterParser {
 
     private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) {
-        return builder.appendValueReduced(field, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
+        return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
     }
 
     private DateTimeFormatter getFormatter0(TemporalField field, int minWidth, int maxWidth, int baseValue) {
         return builder.appendValueReduced(field, minWidth, maxWidth, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
     }
 
+    private DateTimeFormatter getFormatterBaseDate(TemporalField field, int minWidth, int maxWidth, int baseValue) {
+        return builder.appendValueReduced(field, minWidth, maxWidth, LocalDate.of(baseValue, 1, 1)).toFormatter(locale).withDecimalStyle(decimalStyle);
+    }
+
     //-----------------------------------------------------------------------
     @Test(expectedExceptions=DateTimeException.class)
     public void test_print_emptyCalendrical() throws Exception {
@@ -192,6 +192,58 @@
         }
     }
 
+    @Test(dataProvider="Pivot")
+    public void test_pivot_baseDate(int minWidth, int maxWidth, int baseValue, int value, String result) throws Exception {
+        try {
+            getFormatterBaseDate(YEAR, minWidth, maxWidth, baseValue).formatTo(new MockFieldValue(YEAR, value), buf);
+            if (result == null) {
+                fail("Expected exception");
+            }
+            assertEquals(buf.toString(), result);
+        } catch (DateTimeException ex) {
+            if (result == null || value < 0) {
+                assertEquals(ex.getMessage().contains(YEAR.toString()), true);
+            } else {
+                throw ex;
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    public void test_minguoChrono_fixedWidth() throws Exception {
+        // ISO 2021 is Minguo 110
+        DateTimeFormatter f = getFormatterBaseDate(YEAR, 2, 2, 2021);
+        MinguoDate date = MinguoDate.of(109, 6, 30);
+        assertEquals(f.format(date), "09");
+        date = MinguoDate.of(110, 6, 30);
+        assertEquals(f.format(date), "10");
+        date = MinguoDate.of(199, 6, 30);
+        assertEquals(f.format(date), "99");
+        date = MinguoDate.of(200, 6, 30);
+        assertEquals(f.format(date), "00");
+        date = MinguoDate.of(209, 6, 30);
+        assertEquals(f.format(date), "09");
+        date = MinguoDate.of(210, 6, 30);
+        assertEquals(f.format(date), "10");
+    }
+
+    public void test_minguoChrono_extendedWidth() throws Exception {
+        // ISO 2021 is Minguo 110
+        DateTimeFormatter f = getFormatterBaseDate(YEAR, 2, 4, 2021);
+        MinguoDate date = MinguoDate.of(109, 6, 30);
+        assertEquals(f.format(date), "109");
+        date = MinguoDate.of(110, 6, 30);
+        assertEquals(f.format(date), "10");
+        date = MinguoDate.of(199, 6, 30);
+        assertEquals(f.format(date), "99");
+        date = MinguoDate.of(200, 6, 30);
+        assertEquals(f.format(date), "00");
+        date = MinguoDate.of(209, 6, 30);
+        assertEquals(f.format(date), "09");
+        date = MinguoDate.of(210, 6, 30);
+        assertEquals(f.format(date), "210");
+    }
+
     //-----------------------------------------------------------------------
     public void test_toString() throws Exception {
         assertEquals(getFormatter0(YEAR, 2, 2, 2005).toString(), "ReducedValue(Year,2,2,2005)");
--- a/test/java/time/test/java/time/format/TestStringLiteralParser.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestStringLiteralParser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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;
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/time/test/java/util/TestFormatter.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/Collection/MOAT.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/util/Collection/MOAT.java	Fri Oct 25 10:39:13 2013 -0700
@@ -26,7 +26,7 @@
  * @bug     6207984 6272521 6192552 6269713 6197726 6260652 5073546 4137464
  *          4155650 4216399 4294891 6282555 6318622 6355327 6383475 6420753
  *          6431845 4802633 6570566 6570575 6570631 6570924 6691185 6691215
- *          4802647 7123424
+ *          4802647 7123424 8024709
  * @summary Run many tests on many Collection and Map implementations
  * @author  Martin Buchholz
  * @run main MOAT
@@ -1171,9 +1171,46 @@
             THROWS(NoSuchElementException.class,
                    new Fun(){void f(){it.next();}});
         }
+
+        prepMapForDescItrTests(m);
+        checkDescItrRmFirst(m.keySet(), m.navigableKeySet().descendingIterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmMid(m.keySet(), m.navigableKeySet().descendingIterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmLast(m.keySet(), m.navigableKeySet().descendingIterator());
+
+        prepMapForDescItrTests(m);
+        checkDescItrRmFirst(m.keySet(), m.descendingMap().keySet().iterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmMid(m.keySet(), m.descendingMap().keySet().iterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmLast(m.keySet(), m.descendingMap().keySet().iterator());
+
+        prepMapForDescItrTests(m);
+        checkDescItrRmFirst(m.keySet(), m.descendingKeySet().iterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmMid(m.keySet(), m.descendingKeySet().iterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmLast(m.keySet(), m.descendingKeySet().iterator());
+
+        prepMapForDescItrTests(m);
+        checkDescItrRmFirst(m.values(), m.descendingMap().values().iterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmMid(m.values(), m.descendingMap().values().iterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmLast(m.values(), m.descendingMap().values().iterator());
+
+        prepMapForDescItrTests(m);
+        checkDescItrRmFirst((Collection)m.entrySet(),
+                            m.descendingMap().entrySet().iterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmMid((Collection)m.entrySet(),
+                          m.descendingMap().entrySet().iterator());
+        prepMapForDescItrTests(m);
+        checkDescItrRmLast((Collection)m.entrySet(),
+                           m.descendingMap().entrySet().iterator());
     }
 
-
     private static void testNavigableSet(NavigableSet<Integer> s) {
         clear(s);
         checkNavigableSetKeys(s, 1, null, null, null, null);
@@ -1205,6 +1242,87 @@
             THROWS(NoSuchElementException.class,
                    new Fun(){void f(){it.next();}});
         }
+
+        prepSetForDescItrTests(s);
+        checkDescItrRmFirst(s, s.descendingIterator());
+        prepSetForDescItrTests(s);
+        checkDescItrRmMid(s, s.descendingIterator());
+        prepSetForDescItrTests(s);
+        checkDescItrRmLast(s, s.descendingIterator());
+
+        prepSetForDescItrTests(s);
+        checkDescItrRmFirst(s, s.descendingSet().iterator());
+        prepSetForDescItrTests(s);
+        checkDescItrRmMid(s, s.descendingSet().iterator());
+        prepSetForDescItrTests(s);
+        checkDescItrRmLast(s, s.descendingSet().iterator());
+    }
+
+    private static void prepSetForDescItrTests(Set s) {
+        clear(s);
+        check(s.add(1));
+        check(s.add(3));
+        check(s.add(5));
+    }
+
+    private static void prepMapForDescItrTests(Map m) {
+        clear(m);
+        equal(m.put(1, 2), null);
+        equal(m.put(3, 4), null);
+        equal(m.put(5, 9), null);
+    }
+
+    //--------------------------------------------------------------------
+    // Check behavior of descending iterator when first element is removed
+    //--------------------------------------------------------------------
+    private static <T> void checkDescItrRmFirst(Collection<T> ascColl,
+                                                Iterator<T> descItr) {
+        T[] expected = (T[]) ascColl.toArray();
+        int idx = expected.length -1;
+
+        equalNext(descItr, expected[idx--]);
+        descItr.remove();
+        while(idx >= 0 && descItr.hasNext()) {
+            equalNext(descItr, expected[idx--]);
+        }
+        equal(descItr.hasNext(), false);
+        equal(idx, -1);
+    }
+
+    //-----------------------------------------------------------------------
+    // Check behavior of descending iterator when a middle element is removed
+    //-----------------------------------------------------------------------
+    private static <T> void checkDescItrRmMid(Collection<T> ascColl,
+                                              Iterator<T> descItr) {
+        T[] expected = (T[]) ascColl.toArray();
+        int idx = expected.length -1;
+
+        while (idx >= expected.length / 2) {
+            equalNext(descItr, expected[idx--]);
+        }
+        descItr.remove();
+        while (idx >= 0 && descItr.hasNext()) {
+            equalNext(descItr, expected[idx--]);
+        }
+        equal(descItr.hasNext(), false);
+        equal(idx, -1);
+    }
+
+    //-----------------------------------------------------------------------
+    // Check behavior of descending iterator when the last element is removed
+    //-----------------------------------------------------------------------
+    private static <T> void checkDescItrRmLast(Collection<T> ascColl,
+                                               Iterator<T> descItr) {
+        T[] expected = (T[]) ascColl.toArray();
+        int idx = expected.length -1;
+
+        while (idx >= 0 && descItr.hasNext()) {
+            equalNext(descItr, expected[idx--]);
+        }
+        equal(idx, -1);
+        equal(descItr.hasNext(), false);
+        descItr.remove();
+        equal(ascColl.contains(expected[0]), false);
     }
 
     //--------------------- Infrastructure ---------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/HashSet/Serialization.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,111 @@
+/*
+ * 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.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.HashSet;
+import java.util.Random;
+import java.util.concurrent.ThreadLocalRandom;
+
+/*
+ * @test
+ * @bug 8016252
+ * @summary Verify that a serialized HashSet may successfully be deserialized.
+ */
+public class Serialization {
+
+    private static final int NUM_SETS = 43;
+    private static final int MAX_CAPACITY = 257;
+    private static final float MAX_LOAD_FACTOR = 100.0F;
+
+    private static final Random rnd = ThreadLocalRandom.current();
+
+    private static HashSet<Integer> createHashSet() {
+        int capacity = rnd.nextInt(MAX_CAPACITY);
+        float loadFactor = Float.MIN_VALUE + rnd.nextFloat()*MAX_LOAD_FACTOR;
+        HashSet<Integer> hashSet = new HashSet<Integer>(capacity, loadFactor);
+        float multiplier = 2*rnd.nextFloat(); // range [0,2]
+        int size = (int)(capacity*loadFactor*multiplier);
+        for (int i = 0; i < size; i++) {
+            hashSet.add(rnd.nextInt());
+        }
+        return hashSet;
+    }
+
+    private static HashSet<Integer> serDeser(HashSet<Integer> hashSet) throws IOException, ClassNotFoundException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream oos = new ObjectOutputStream(baos);
+        oos.writeObject(hashSet);
+        oos.flush();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ObjectInputStream ois = new ObjectInputStream(bais);
+        HashSet<Integer> result = (HashSet<Integer>)ois.readObject();
+
+        oos.close();
+        ois.close();
+
+        return result;
+    }
+
+    private static void printHashSet(HashSet<Integer> hashSet) {
+        System.err.println("Size: "+hashSet.size());
+        for (Object o : hashSet) {
+            System.err.println(o);
+        }
+    }
+
+    public static void main(String[] args) {
+        int failures = 0;
+
+        for (int i = 0; i < NUM_SETS; i++) {
+            HashSet<Integer> hashSet = createHashSet();
+
+            HashSet<Integer> result = null;
+            try {
+                result = serDeser(hashSet);
+            } catch (IOException ioe) {
+                System.err.println(ioe);
+                failures++;
+            } catch (ClassNotFoundException cnfe) {
+                System.err.println(cnfe);
+                failures++;
+            }
+
+            if (!hashSet.equals(result)) {
+                System.err.println("Unequal HashSets!");
+                printHashSet(hashSet);
+                System.err.println();
+                failures++;
+            }
+        }
+
+        if (failures != 0) {
+            throw new RuntimeException("HashSet/Serialzation failed with "+
+                    failures+" failures!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Locale/Bug8025703.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/util/Locale/tools/language-subtag-registry.txt	Fri Oct 25 10:39:13 2013 -0700
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/ResourceBundle/getBaseBundleName/TestGetBaseBundleName.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+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	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/concurrent/forkjoin/FJExceptionTableLeak.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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) {}
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Level/CustomLevel.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.*;
+import java.util.*;
+import java.util.logging.*;
+
+/*
+ * @test
+ * @bug 8026027
+ * @summary Test Level.parse to look up custom levels by name and its
+ *          localized name
+ *
+ * @run main/othervm CustomLevel
+ */
+
+public class CustomLevel extends Level {
+    public CustomLevel(String name, int value, String resourceBundleName) {
+        super(name, value, resourceBundleName);
+    }
+
+    private static final List<Level> levels = new ArrayList<>();
+    private static final String RB_NAME = "myresource";
+    public static void main(String[] args) throws Exception {
+        setupCustomLevels();
+
+        // Level.parse will return the custom Level instance
+        ResourceBundle rb = ResourceBundle.getBundle(RB_NAME);
+        for (Level level : levels) {
+            String name = level.getName();
+            if (!name.equals("WARNING") && !name.equals("INFO")) {
+                // custom level whose name doesn't conflict with any standard one
+                checkCustomLevel(Level.parse(name), level);
+            }
+            String localizedName = rb.getString(level.getName());
+            Level l = Level.parse(localizedName);
+            if (l != level) {
+                throw new RuntimeException("Unexpected level " + l + " " + l.getClass());
+            }
+        }
+    }
+
+    private static void setupCustomLevels() throws IOException {
+        levels.add(new CustomLevel("EMERGENCY", 1090, RB_NAME));
+        levels.add(new CustomLevel("ALERT", 1060, RB_NAME));
+        levels.add(new CustomLevel("CRITICAL", 1030, RB_NAME));
+        levels.add(new CustomLevel("WARNING", 1010, RB_NAME));
+        levels.add(new CustomLevel("INFO", 1000, RB_NAME));
+    }
+    static void checkCustomLevel(Level level, Level expected) {
+        // Level value must be the same
+        if (!level.equals(expected)) {
+            throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected));
+        }
+
+        if (!level.getName().equals(expected.getName())) {
+            throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected));
+        }
+
+        // Level.parse is expected to return the custom Level
+        if (level != expected) {
+            throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected));
+        }
+
+        ResourceBundle rb = ResourceBundle.getBundle(RB_NAME);
+        String name = rb.getString(level.getName());
+        if (!level.getLocalizedName().equals(name)) {
+            // must have the same localized name
+            throw new RuntimeException(level.getLocalizedName() + " != " + name);
+        }
+    }
+
+    static String formatLevel(Level l) {
+        return l + ":" + l.intValue() + ":" + l.getClass().getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Level/myresource.properties	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,5 @@
+EMERGENCY=localized.emergency
+ALERT=localized.alert
+CRITICAL=localized.critical
+WARNING=localized.warning
+INFO=localized.info
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/logrb/TestLogrbResourceBundle.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+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	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+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	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/util/stream/boottest/java/util/stream/SpinedBufferTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/util/stream/test/org/openjdk/tests/java/util/stream/InfiniteStreamWithLimitOpTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/util/stream/test/org/openjdk/tests/java/util/stream/IntSliceOpTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/java/util/zip/GZIP/GZIPInZip.java	Fri Oct 25 10:39:13 2013 -0700
@@ -22,12 +22,15 @@
  */
 
 /* @test
- * @bug 7021870
- * @summary Reading last gzip chain member must not close the input stream
+ * @bug 7021870 8023431
+ * @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.IOException;
+import java.io.InputStream;
+import java.io.PipedInputStream;
+import java.io.PipedOutputStream;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
 import java.util.zip.ZipEntry;
@@ -40,6 +43,15 @@
     private static volatile Throwable trouble;
 
     public static void main(String[] args) throws Throwable {
+        doTest(false, false);
+        doTest(false, true);
+        doTest(true, false);
+        doTest(true, true);
+    }
+
+    private static void doTest(final boolean appendGarbage,
+                               final boolean limitGISBuff)
+            throws Throwable {
 
         final PipedOutputStream pos = new PipedOutputStream();
         final PipedInputStream pis = new PipedInputStream(pos);
@@ -47,17 +59,23 @@
         Thread compressor = new Thread() {
             public void run() {
                 final byte[] xbuf = { 'x' };
-                try {
-                    ZipOutputStream zos = new ZipOutputStream(pos);
+                try (ZipOutputStream zos = new ZipOutputStream(pos)) {
 
                     zos.putNextEntry(new ZipEntry("a.gz"));
-                    GZIPOutputStream gos1 = new GZIPOutputStream(zos);
-                    gos1.write(xbuf); gos1.finish();
+                    try (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();
+                    try (GZIPOutputStream gos2 = new GZIPOutputStream(zos)) {
+                        gos2.write(xbuf);
+                        gos2.finish();
+                    }
                     zos.closeEntry();
 
                 } catch (Throwable t) {
@@ -68,19 +86,20 @@
 
         Thread uncompressor = new Thread() {
             public void run() {
-                try {
-                    ZipInputStream zis = new ZipInputStream(pis);
+                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 (InputStream gis = limitGISBuff ?
+                            new GZIPInputStream(zis, 4) :
+                            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;
                 }
--- a/test/javax/management/monitor/CounterMonitorThresholdTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/javax/management/monitor/CounterMonitorThresholdTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6229368
+ * @bug 6229368 8025207
  * @summary Wrong threshold value in CounterMonitor with offset and modulus.
  * @author Luis-Miguel Alventosa
  * @run clean CounterMonitorThresholdTest
@@ -144,16 +144,14 @@
         for (int i = 0; i < counter.length; i++) {
             mbean.setCounter(counter[i]);
             System.out.println("\nCounter = " + mbean.getCounter());
-            Thread.sleep(300);
-            Integer derivedGaugeValue = (Integer) cm.getDerivedGauge(name);
-            System.out.println("Derived Gauge = " + derivedGaugeValue);
-            if (derivedGaugeValue.intValue() != derivedGauge[i]) {
-                System.out.println("Wrong derived gauge! Current value = " +
-                    derivedGaugeValue + " Expected value = " + derivedGauge[i]);
-                System.out.println("\nStop monitoring...");
-                cm.stop();
-                throw new IllegalArgumentException("wrong derived gauge");
-            }
+            Integer derivedGaugeValue;
+            // either pass or test timeout (killed by test harness)
+            // see 8025207
+            do {
+                Thread.sleep(150);
+                derivedGaugeValue = (Integer) cm.getDerivedGauge(name);
+            } while (derivedGaugeValue.intValue() != derivedGauge[i]);
+
             Number thresholdValue = cm.getThreshold(name);
             System.out.println("Threshold = " + thresholdValue);
             if (thresholdValue.intValue() != threshold[i]) {
@@ -163,7 +161,6 @@
                 cm.stop();
                 throw new IllegalArgumentException("wrong threshold");
             }
-            Thread.sleep(300);
         }
 
         // Stop the monitor
--- a/test/javax/management/monitor/NullAttributeValueTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/javax/management/monitor/NullAttributeValueTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -23,11 +23,12 @@
 
 /*
  * @test
- * @bug 6200031
+ * @bug 6200031 8025206
  * @summary Test that the counter/gauge/string monitors emit a
  *          jmx.monitor.error.type notification when the attribute
  *          being monitored returns a null value.
  * @author Luis-Miguel Alventosa
+ * @author Shanliang JIANG
  * @run clean NullAttributeValueTest
  * @run build NullAttributeValueTest
  * @run main NullAttributeValueTest
@@ -39,7 +40,7 @@
 public class NullAttributeValueTest implements NotificationListener {
 
     // Flag to notify that a message has been received
-    private boolean messageReceived = false;
+    private volatile boolean messageReceived = false;
 
     // MBean class
     public class ObservedObject implements ObservedObjectMBean {
@@ -83,7 +84,6 @@
      * Update the counter and check for notifications
      */
     public int counterMonitorNotification() throws Exception {
-
         CounterMonitor counterMonitor = null;
         try {
             MBeanServer server = MBeanServerFactory.newMBeanServer();
@@ -134,31 +134,17 @@
             echo(">>> START the CounterMonitor");
             counterMonitor.start();
 
-            // Wait for granularity period (multiplied by 2 for sure)
-            //
-            Thread.sleep(granularityperiod * 2);
-
-            // Check if notification was received
-            //
-            if (messageReceived) {
-                echo("\tOK: CounterMonitor notification received");
-            } else {
-                echo("\tKO: CounterMonitor notification missed or not emitted");
-                return 1;
-            }
+            return checkReceived(granularityperiod, "CounterMonitor");
         } finally {
             if (counterMonitor != null)
                 counterMonitor.stop();
         }
-
-        return 0;
     }
 
     /**
      * Update the gauge and check for notifications
      */
     public int gaugeMonitorNotification() throws Exception {
-
         GaugeMonitor gaugeMonitor = null;
         try {
             MBeanServer server = MBeanServerFactory.newMBeanServer();
@@ -212,31 +198,17 @@
             echo(">>> START the GaugeMonitor");
             gaugeMonitor.start();
 
-            // Wait for granularity period (multiplied by 2 for sure)
-            //
-            Thread.sleep(granularityperiod * 2);
-
-            // Check if notification was received
-            //
-            if (messageReceived) {
-                echo("\tOK: GaugeMonitor notification received");
-            } else {
-                echo("\tKO: GaugeMonitor notification missed or not emitted");
-                return 1;
-            }
+            return checkReceived(granularityperiod, "GaugeMonitor");
         } finally {
             if (gaugeMonitor != null)
                 gaugeMonitor.stop();
         }
-
-        return 0;
     }
 
     /**
      * Update the string and check for notifications
      */
     public int stringMonitorNotification() throws Exception {
-
         StringMonitor stringMonitor = null;
         try {
             MBeanServer server = MBeanServerFactory.newMBeanServer();
@@ -289,24 +261,11 @@
             echo(">>> START the StringMonitor");
             stringMonitor.start();
 
-            // Wait for granularity period (multiplied by 2 for sure)
-            //
-            Thread.sleep(granularityperiod * 2);
-
-            // Check if notification was received
-            //
-            if (messageReceived) {
-                echo("\tOK: StringMonitor notification received");
-            } else {
-                echo("\tKO: StringMonitor notification missed or not emitted");
-                return 1;
-            }
+            return checkReceived(granularityperiod, "StringMonitor");
         } finally {
             if (stringMonitor != null)
                 stringMonitor.stop();
         }
-
-        return 0;
     }
 
     /**
@@ -326,6 +285,21 @@
         return error;
     }
 
+    private int checkReceived(long granularityperiod, String caller) throws InterruptedException {
+        int i = 100;
+        do {
+            Thread.sleep(granularityperiod);
+        } while (!messageReceived && i-- > 0);
+
+        if (messageReceived) {
+            echo("\tOK: " + caller + " notification received");
+        } else {
+            echo("\tKO: " + caller + " notification missed or not emitted");
+        }
+
+        return messageReceived ? 0 : 1;
+    }
+
     /*
      * Print message
      */
--- a/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4940957
+ * @bug 4940957 8025205
  * @summary Tests behaviour when connections break
  * @author Eamonn McManus
  * @run clean BrokenConnectionTest
@@ -485,14 +485,13 @@
             }
             if (thisok) {
                 System.out.println("Waiting for failure notif");
-                long deadline = System.currentTimeMillis() + 5000;
-                while (failureListener.count < 1
-                       && System.currentTimeMillis() < deadline)
-                    Thread.sleep(500);
-                if (failureListener.count < 1) {
-                    System.out.println("Did not get failure notif!");
-                    thisok = false;
-                } else if (failureListener.count > 1) {
+                // pass or test timeout. see 8025205
+                do {
+                    Thread.sleep(100);
+                } while (failureListener.count < 1);
+
+                Thread.sleep(1000); // if more notif coming ...
+                if (failureListener.count > 1) {
                     System.out.println("Got too many failure notifs: " +
                                        failureListener.count);
                     thisok = false;
--- a/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4886838 4886830
+ * @bug 4886838 4886830 8025204
  * @summary Tests that idle timeouts happen at appropriate times
  * @author Eamonn McManus
  * @run clean IdleTimeoutTest
@@ -278,19 +278,11 @@
                 }
 
                 System.out.println("Waiting for id list to drop ours");
-                deadline = System.currentTimeMillis() + timeout*2 + 10000;
-                while (true) {
-                    ids = Arrays.asList(server.getConnectionIds());
-                    if (!ids.contains(connId)
-                        || System.currentTimeMillis() >= deadline)
-                        break;
-                    Thread.sleep(500);
-                }
-                if (ids.contains(connId)) {
-                    System.out.println("Client id still in list after " +
-                                       "deadline: " + ids);
-                    return false;
-                }
+                // pass or timed out by test harness - see 8025204
+                do {
+                   Thread.sleep(100);
+                   ids = Arrays.asList(server.getConnectionIds());
+                } while (ids.contains(connId));
 
                 conn.getDefaultDomain();
                 if (connId.equals(client.getConnectionId())) {
--- a/test/javax/management/remote/mandatory/loading/MissingClassTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/javax/management/remote/mandatory/loading/MissingClassTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/validation/8015092/XPathWhiteSpaceTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 10:39:13 2013 -0700
@@ -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/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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.*;
--- a/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/security/pkcs11/KeyPairGenerator/TestDH2048.java	Fri Oct 25 10:39:13 2013 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 7196382
+ * @summary Ensure that 2048-bit DH key pairs can be generated
+ * @author Valerie Peng
+ * @library ..
+ */
+
+import java.io.*;
+import java.util.*;
+
+import java.security.*;
+
+import javax.crypto.*;
+
+public class TestDH2048 extends PKCS11Test {
+
+    private static void checkUnsupportedKeySize(KeyPairGenerator kpg, int ks)
+        throws Exception {
+        try {
+            kpg.initialize(ks);
+            throw new Exception("Expected IPE not thrown for " + ks);
+        } catch (InvalidParameterException ipe) {
+        }
+    }
+
+    public void main(Provider p) throws Exception {
+        if (p.getService("KeyPairGenerator", "DH") == null) {
+            System.out.println("KPG for DH not supported, skipping");
+            return;
+        }
+        KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH", p);
+        kpg.initialize(2048);
+        KeyPair kp1 = kpg.generateKeyPair();
+        checkUnsupportedKeySize(kpg, 1536);
+        checkUnsupportedKeySize(kpg, 2176);
+        checkUnsupportedKeySize(kpg, 3072);
+    }
+
+    public static void main(String[] args) throws Exception {
+        main(new TestDH2048());
+    }
+}
--- a/test/sun/security/provider/KeyStore/DKSTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/security/provider/KeyStore/DKSTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -81,8 +81,7 @@
         int expected;
         KeyStore keystore = KeyStore.getInstance("DKS");
         // load entries
-        keystore.load(
-            new KeyStore.DomainLoadStoreParameter(config, PASSWORDS));
+        keystore.load(new DomainLoadStoreParameter(config, PASSWORDS));
         cacertsCount = expected = keystore.size();
         System.out.println("\nLoading domain keystore: " + config + "\t[" +
             expected + " entries]");
@@ -95,8 +94,7 @@
         expected = cacertsCount + 1;
         keystore = KeyStore.getInstance("DKS");
         // load entries
-        keystore.load(
-            new KeyStore.DomainLoadStoreParameter(config, PASSWORDS));
+        keystore.load(new DomainLoadStoreParameter(config, PASSWORDS));
         System.out.println("\nLoading domain keystore: " + config + "\t[" +
             expected + " entries]");
         checkEntries(keystore, expected);
@@ -109,7 +107,7 @@
         keystore = KeyStore.getInstance("DKS");
         // load entries
         keystore.load(
-            new KeyStore.DomainLoadStoreParameter(config,
+            new DomainLoadStoreParameter(config,
                 Collections.<String, KeyStore.ProtectionParameter>emptyMap()));
         System.out.println("\nLoading domain keystore: " + config + "\t[" +
             expected + " entries]");
@@ -129,8 +127,7 @@
         expected = 0;
         keystore = KeyStore.getInstance("DKS");
         // load entries
-        keystore.load(
-            new KeyStore.DomainLoadStoreParameter(config, PASSWORDS));
+        keystore.load(new DomainLoadStoreParameter(config, PASSWORDS));
         System.out.println("\nLoading domain keystore: " + config + "\t[" +
             expected + " entries]");
         checkEntries(keystore, expected);
@@ -142,8 +139,7 @@
         expected = 2 + 1 + 1 + 1;
         keystore = KeyStore.getInstance("DKS");
         // load entries
-        keystore.load(
-            new KeyStore.DomainLoadStoreParameter(config, PASSWORDS));
+        keystore.load(new DomainLoadStoreParameter(config, PASSWORDS));
         System.out.println("\nLoading domain keystore: " + config + "\t[" +
             expected + " entries]");
         checkEntries(keystore, expected);
@@ -158,12 +154,10 @@
         config = new URI(CONFIG + "#keystores_tmp");
         System.out.println("Storing domain keystore: " + config + "\t[" +
             expected + " entries]");
-        keystore.store(
-            new KeyStore.DomainLoadStoreParameter(config, PASSWORDS));
+        keystore.store(new DomainLoadStoreParameter(config, PASSWORDS));
         keystore = KeyStore.getInstance("DKS");
         // reload entries
-        keystore.load(
-            new KeyStore.DomainLoadStoreParameter(config, PASSWORDS));
+        keystore.load(new DomainLoadStoreParameter(config, PASSWORDS));
         System.out.println("Reloading domain keystore: " + config + "\t[" +
             expected + " entries]");
         checkEntries(keystore, expected);
--- a/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java	Fri Oct 25 10:39:13 2013 -0700
@@ -111,7 +111,15 @@
 
 public class DHEKeySizing {
 
-    private static boolean debug = true;
+    private final static boolean debug = true;
+
+    // key length bias because of the stripping of leading zero bytes of
+    // negotiated DH keys.
+    //
+    // This is an effort to mimum intermittent failure when we cannot
+    // estimate what's the exact number of leading zero bytes of
+    // negotiated DH keys.
+    private final static int KEY_LEN_BIAS = 6;
 
     private SSLContext sslc;
     private SSLEngine ssle1;    // client
@@ -269,7 +277,8 @@
         twoToOne.flip();
 
         log("Message length of ServerHello series: " + twoToOne.remaining());
-        if (lenServerKeyEx != twoToOne.remaining()) {
+        if (twoToOne.remaining() < (lenServerKeyEx - KEY_LEN_BIAS) ||
+                twoToOne.remaining() > lenServerKeyEx) {
             throw new Exception(
                 "Expected to generate ServerHello series messages of " +
                 lenServerKeyEx + " bytes, but not " + twoToOne.remaining());
@@ -289,7 +298,8 @@
         oneToTwo.flip();
 
         log("Message length of ClientKeyExchange: " + oneToTwo.remaining());
-        if (lenClientKeyEx != oneToTwo.remaining()) {
+        if (oneToTwo.remaining() < (lenClientKeyEx - KEY_LEN_BIAS) ||
+                oneToTwo.remaining() > lenClientKeyEx) {
             throw new Exception(
                 "Expected to generate ClientKeyExchange message of " +
                 lenClientKeyEx + " bytes, but not " + oneToTwo.remaining());
--- a/test/sun/security/tools/keytool/StorePasswords.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/security/tools/keytool/StorePasswords.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/autotest.sh	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/security/tools/keytool/autotest.sh	Fri Oct 25 10:39:13 2013 -0700
@@ -53,6 +53,15 @@
   done
 }
 
+FS="/"
+${TESTJAVA}${FS}bin${FS}java -XshowSettings:properties -version 2> allprop
+cat allprop | grep sun.arch.data.model | grep 32
+if [ "$?" != "0" ]; then
+  B32=false
+else
+  B32=true
+fi
+
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
@@ -61,17 +70,16 @@
     LIBNAME="/usr/lib/mps/`isainfo -n`/libsoftokn3.so"
     ;;
   Linux )
-    FS="/"
-    ${TESTJAVA}${FS}bin${FS}java -XshowSettings:properties -version 2> allprop
-    cat allprop | grep os.arch | grep 64
-    if [ "$?" != "0" ]; then
+    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
     ;;
   * )
@@ -82,7 +90,7 @@
 
 if [ "$LIBNAME" = "" ]; then
   echo "Cannot find libsoftokn3.so"
-  exit 1
+  exit 0
 fi
 
 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . -XDignore.symbol.file \
--- a/test/sun/security/tools/policytool/Alias.html	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/security/tools/policytool/Alias.html	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/security/tools/policytool/OpenPolicy.html	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/security/tools/policytool/UpdatePermissions.html	Fri Oct 25 10:39:13 2013 -0700
@@ -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/tools/jstat/gcCauseOutput1.awk	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/tools/jstat/gcCauseOutput1.awk	Fri Oct 25 10:39:13 2013 -0700
@@ -23,7 +23,7 @@
 # or more letters and spaces. It also provides for the ".", "(", and ")"
 # characters to allow for the string "System.gc()".
 #
-/^[ ]*[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]+[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*$/	{
+/^[ ]*[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]+[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*$/	{
 	    datalines++;
 	}
 
--- a/test/sun/tools/jstat/lineCounts1.awk	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/tools/jstat/lineCounts1.awk	Fri Oct 25 10:39:13 2013 -0700
@@ -18,7 +18,7 @@
 	    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]+$/	{
+/^[ ]*[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++;
 	}
 
--- a/test/sun/tools/jstat/lineCounts2.awk	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/tools/jstat/lineCounts2.awk	Fri Oct 25 10:39:13 2013 -0700
@@ -14,7 +14,7 @@
 	    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]+$/	{
+/^[ ]*[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++;
 	}
 
--- a/test/sun/tools/jstat/lineCounts3.awk	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/tools/jstat/lineCounts3.awk	Fri Oct 25 10:39:13 2013 -0700
@@ -23,7 +23,7 @@
 	    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]+$/	{
+/^[ ]*[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++;
 	}
 
--- a/test/sun/tools/jstat/lineCounts4.awk	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/tools/jstat/lineCounts4.awk	Fri Oct 25 10:39:13 2013 -0700
@@ -26,7 +26,7 @@
 	    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]+$/	{
+/^[ ]*[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]+$/	{
 	    if (headerlines == 2) {
 	        datalines2++;
 	    }
--- a/test/sun/tools/jstat/timeStamp1.awk	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/tools/jstat/timeStamp1.awk	Fri Oct 25 10:39:13 2013 -0700
@@ -14,7 +14,7 @@
 	    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]+[ ]*[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]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/	{
 	    datalines++;
 	}
 
--- a/test/sun/tools/jstatd/jstatGcutilOutput1.awk	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/tools/jstatd/jstatGcutilOutput1.awk	Fri Oct 25 10:39:13 2013 -0700
@@ -18,7 +18,7 @@
 	    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]+$/	{
+/^[ ]*[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++;
 	}
 
--- a/test/sun/util/calendar/zi/tzdata/VERSION	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/VERSION	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/africa	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/antarctica	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/asia	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/australasia	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/backward	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/etcetera	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/europe	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/iso3166.tab	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/leapseconds	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/northamerica	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/southamerica	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/calendar/zi/tzdata/zone.tab	Fri Oct 25 10:39:13 2013 -0700
@@ -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	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/sun/util/logging/PlatformLoggerTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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/tools/launcher/RunpathTest.java	Fri Oct 25 19:51:54 2013 +0400
+++ b/test/tools/launcher/RunpathTest.java	Fri Oct 25 10:39:13 2013 -0700
@@ -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);
     }